Solved

HTML 5 video player

Posted on 2013-01-25
3
336 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

747 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

13 Experts available now in Live!

Get 1:1 Help Now