Solved

HTML 5 video player

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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

695 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