Solved

HTML 5 video player

Posted on 2013-01-25
3
339 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
  • 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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

813 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now