General HTML/Web Design Programming Q`s/mp4 video

Advertisement


Question
Hi Sir,

I tried alot but couldn't find any solution. I am using video tag to play mp4 video but video is not showing up for android mobiles(desktop working fine). Could you please give some solution ?

Answer
Hello Pankaj,

Different browsers require different video formats;
When I code, I always use all the formats to ensure the video will play.
There are online video transfer resources which will create copies of your Mp3 video in the other formats. You can then add them in your assets files.
The browser will use the first recognized format.

Currently, there are 3 supported video formats for the <video> element: MP4, WebM, and Ogg:

Browser          MP4    WebM   Ogg
Internet Explorer   YES   NO   NO
Chrome          YES   YES   YES
Firefox          YES   YES   YES
Safari          YES   NO   NO
Opera          YES     YES   YES

It would look like this:

<video width="320" height="240" controls>
 <source src="movie.mp4" type="video/mp4">
 <source src="movie.ogg" type="video/ogg">
 <source src="movie.WebM" type="video/WebM">

  Your browser does not support the video tag.
</video>

I do not know the android platform well enough to go further into this. I suggest you contact them or find an android forum.

Hope this helps,

Gaston

General HTML/Web Design Programming Q`s

All Answers


Answers by Expert:


Ask Experts

Volunteer


Gaston Michel Côté

Expertise

Anything related to web design, gamification, color psychology, and ELearning. Codes: HTML5, CSS3.

Experience

Three years as a web consultant and designer

Organizations
Self-employed

Education/Credentials
College Education Certificate in Multimedia Productions

©2016 About.com. All rights reserved.