tag <video> does not work on android phones

Asked

Viewed 662 times

0

I am developing a responsive site that has a video, when access this site on mobile the video is not displayed, if insert the video through the tag it works.

Could someone help me?

  • You could post your code.

  • Yes of course, it’s a simple video tag:

  • <video autoplay src="test.mp4"></video>

  • I don’t know a conclusive solution to this, but I could look at this article ?

  • Thank you Everson! I’ll read the article.

1 answer

0


Without the code it’s hard, but come on..

1) Script to add simple video file on page

<!DOCTYPE html>
<html>
<head>
<title>HTML Video Tag Example</title>
</head>
<body>
<video width="320" height="240" controls="controls" autoplay="autoplay">
<source src="Yes Bank Advertisment.mp4" type="video/mp4">
<object data="" width="320" height="240">
<embed width="320" height="240" src="Yes Bank Advertisment.mp4">
</object>
</video>
</body>
</html>

Figura 1

Figure 1: This figure is the simple video output of embedding in the HTML page.

Here we saw that the control attribute adds video controls, like play, pause, and volume adjustment. It can also be seen that the video is playing in a specific region on the page, reason is that we have included the width and height attributes for playback of the video. If height and width are set, the space required for the video is reserved when the page is loaded. However, without these attributes, browser will adapt or will display the full page.

There was no standard procedure for playing video on pages web. Most videos today are shown via flash or various plug-ins. However, different browsers may have several plug-ins. Without any standardized method it becomes difficult to provide various plug-ins for different browsers. As a remedy for HTML5 defines a new element, which specifies a standard form to embed a video/movie on a web page: the element . This tag is supported by all major browsers such as Internet explorer, Google Chrome, Safari, Opera etc..

The tag was proposed by Opera Software in February 2007. Opera also released a preview compilation that was shown on same date, and a manifesto that called for video to become first class of web citizen.

  • That’s true, it will consume a lot of band.

  • @Claudioperler , Munir asked how to insert a video on their website and running on mobile. He did not say if he uses any framework or not, or if he will consume band or not. If he wants to go into more detail on the subject, he should ask another type of question and use some framework that makes it much easier to insert a responsive video, without so much bandwidth consumption.

  • Thiago, I really did not specify framework usage or bandwidth consumption, thank you for the help!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.