Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Video not playing on some browsers (https://www.warriorforum.com/programming/756575-video-not-playing-some-browsers.html)

Okenyon 20th February 2013 04:13 PM

Video not playing on some browsers
 
Code:

<video id="my_video_1" class="video-js vjs-default-skin" controls
  preload="auto" autoplay width="640" height="360"
  data-setup="{}">
  <source src="video/thedojoaffiliatesystem.mp4" type='video/mp4'>
</video>

So this is my code however it only seems to play on chrome and safari

can anyone tell me why and also recommend a fix/different code?

thanks.

David V 20th February 2013 05:35 PM

Re: Video not playing on some browsers
 
Looks like your using the Videojs.com html5 code.
Browser support is likely the issue for the mp4.
This html5 test site will help you determine what will/won't work.

You may need a fallback type like ogg or use a different method to deliver the video like JWplayer, etc... that provides multiple types and fallbacks. Just an idea...

Just as a note:
If your .mp4 file uses MPEG-4 compression then you want to convert it using the more efficient H.264.

Okenyon 21st February 2013 03:19 AM

Re: Video not playing on some browsers
 
Using JWPlayer - thanks so much.

Michael71 21st February 2013 03:34 AM

Re: Video not playing on some browsers
 
Take a look here:

Can I use... Support tables for HTML5, CSS3, etc

You need a fallback or different video formats to play in most browsers.

Brandon Tanner 21st February 2013 09:37 AM

Re: Video not playing on some browsers
 
To cover all browsers, you need to specify multiple 'sources' (ie mp4 AND webm), and use Flash fallback for older browsers.

Read everything on this page...

Using the HTML5 Video Tag | LongTail Video | Home of the JW Player

Your code should look similar to the example at the bottom of that page.


All times are GMT -6. The time now is 10:05 AM.