?
Solved

HTML 5 video player

Posted on 2013-01-25
3
Medium Priority
?
345 Views
Last Modified: 2013-01-28
I have a page that plays an mp4 (or ogg) video. Video element set up like this:

  <video id="video1" width="800" autoplay>
    <source src="Aquascape Webinar.mp4" type="video/mp4">
    <source src="Aquascape Webinar.ogg" type="video/ogg">
    Your browser does not support HTML5 video.
  </video><br> <button onclick="ac='p'; vid_play_pause();">Play/Pause</button>

Will this play in Safari & Chrome?

It's not easy to test because of other restrictions.

Thanks
0
Comment
Question by:Richard Korts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Expert Comment

by:webtechgal
ID: 38821082
I pasted your code in a page and tried to open in Chrome and Firefox. I get the Play/Pause button, but nothing else. I am thinking that is because you don't have a url to the file...
0
 
LVL 4

Expert Comment

by:webtechgal
ID: 38823356
rkorts - can you add a specific url and I will be happy to try it again....
0
 
LVL 7

Accepted Solution

by:
Element1910 earned 2000 total points
ID: 38823609
You need to set your codecs attribute for your ogg:
  <video id="video1" width="800" autoplay>
    <source src="Aquascape Webinar.mp4" type="video/mp4">
    <source src="Aquascape Webinar.ogg" type="video/ogg; codecs=theora,vorbis">
    Your browser does not support HTML5 video.
  </video><br> <button onclick="ac='p'; vid_play_pause();">Play/Pause</button> 

Open in new window

0

Featured Post

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question