Questions tagged [html5-video]
HTML5 video is an element introduced in the HTML5 draft specification for the purpose of creating a standards-compliant, plugin-free way for playing videos and movies, partially replacing the object element.
html5-video
8,004
questions
302
votes
7
answers
390k
views
Detect when an HTML5 video finishes
How do you detect when a HTML5 <video> element has finished playing?
281
votes
20
answers
550k
views
How to handle "Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first." on Desktop with Chrome 66?
I'm getting the error message..
Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.
..when trying to play video on desktop using Chrome ...
258
votes
17
answers
242k
views
Stop/Close webcam stream which is opened by navigator.mediaDevices.getUserMedia
I opened a webcam by using the following JavaScript code:
const stream = await navigator.mediaDevices.getUserMedia({ /* ... */ });
Is there any JavaScript code to stop or close the webcam?
248
votes
14
answers
377k
views
How to change the playing speed of videos in HTML5?
How to change the video play speed in HTML5? I've checked video tag's attributes in w3school but couldn't approach that.
242
votes
18
answers
587k
views
Play/pause HTML 5 video using JQuery
I am trying to control HTML5 videos using JQuery. I have two clips in a tabbed interface, there are six tabs in total, the others just have images. I am trying to make the video clips play when their ...
237
votes
28
answers
360k
views
Prevent HTML5 video from being downloaded (right-click saved)?
How can I disable "Save Video As..." from a browser's right-click menu to prevent clients from downloading a video?
Are there more complete solutions that prevent the client from accessing a file ...
232
votes
8
answers
332k
views
In Chrome 55, prevent showing Download button for HTML 5 video [duplicate]
I am getting this download button with <video> tags in Chrome 55, but not on Chrome 54:
How can I remove this so no one can see the download button in Chrome 55?
I have used <video> tag ...
210
votes
4
answers
299k
views
Correct mime type for .mp4
I have two applications as mentioned below:
Admin application through which I am able to upload a .mp4 file to the server.
I am trying to download the .mp4 using mobile application in iPad.
The ...
198
votes
8
answers
371k
views
How to set the thumbnail image on HTML5 video?
Is there a way to set thumbnail image on HTML5 video?
I want to see some pictures before play.
My code looks like this:
<video width="470" height="255" controls>
<source src="video.mp4" ...
175
votes
32
answers
505k
views
HTML5 Video tag not working in Safari , iPhone and iPad
I am trying to create an html5 web page in which there is a small video like 13s , I converted the flash version of this video into 3 format : .ogv using fireFogg , .webm using firefogg also and .mp4 ...
162
votes
21
answers
343k
views
Is there a way to make HTML5 video fullscreen?
Is there a way to play a video fullscreen using the HTML5 <video> tag?
And if this is not possible, does anybody know if there is a reason for this decision?
135
votes
7
answers
152k
views
HTML5 Video Dimensions
I'm trying to get the dimensions of a video of which I'm overlaying onto a page with JavaScript, however it is returning the dimensions of the poster image instead of the actual video as it seems it's ...
135
votes
7
answers
157k
views
How to tell if a <video> element is currently playing?
I see that the MediaElement interface exposes attributes like paused, seeking, and ended. Missing from the list, however, is playing.
I know there are playing events that fire when an element starts ...
131
votes
4
answers
371k
views
Play infinitely looping video on-load in HTML5
I'm looking to place a video in an HTML5 page that will begin playing on page-load, and once completed, loop back to the beginning without a break. The video should also NOT have any controls ...
125
votes
5
answers
245k
views
Start HTML5 video at a particular position when loading?
I need HTML5 video to start at certain point. Let's say at time 50 seconds onward.
I tried but its not working as expected. is there something i am doing wrong?
Here is the code:
<video ...
122
votes
15
answers
245k
views
Make HTML5 video poster be same size as video itself
Does anyone know how to resize the HTML5 video poster such that it fits the exact dimensions of the video itself?
here's a jsfiddle which shows the problem: http://jsfiddle.net/zPacg/7/
here's that ...
108
votes
17
answers
235k
views
Detect if HTML5 Video element is playing [duplicate]
I've looked through a couple of questions to find out if an HTML5 element is playing, but can't find the answer. I've looked at the W3 documentation and it has an event named "playing" but I can't ...
106
votes
9
answers
178k
views
Playing HTML5 video on fullscreen in android webview
Well, I've been searching few days already, how to display HTML5 video in full-screen mode on android WebView.
I managed to play HTML5 videos on my webview. Problems are arising when displaying video ...
102
votes
4
answers
175k
views
Play local (hard-drive) video file with HTML5 video tag?
I want to achieve the following.
<video src="file:///Users/username/folder/video.webm">
</video>
The intent is that the user will be able to select a file from his/her hard drive.
And ...
94
votes
8
answers
472k
views
HTML5 live streaming
For school I need to set up an HTML5 live stream site. They have a flash stream-player they've been using but now they want it to use HTML5 instead. How can I do this? I tried using the video tag but ...
84
votes
7
answers
397k
views
Playing m3u8 Files with HTML Video Tag
I am trying to use HTTP Live Streaming (HLS) to stream video to my computers and my iPhone. After reading through the Apple 'HTTP Live Streaming Overview' as well as 'Best Practices for Creating and ...
80
votes
5
answers
74k
views
HTML5 frame-by-frame viewing / frame-seeking?
I'm looking for a way to view HTML5 <video>, frame-by-frame.
The scenario: Having a video, with an additional button that skips to the next frame when pressed.
What do you think is the best ...
78
votes
9
answers
104k
views
HTML5 video will not loop
I have a video as a background to a web page, and I am trying to get it to loop. Here is the code:
<video autoplay='true' loop='true' muted='true'>
<source src='/admin/wallpapers/linked/...
77
votes
11
answers
111k
views
How can I play a local video in my IPython notebook?
I've got a local video file (an .avi, but could be converted) that I would like to show a client (ie it is private and can't be published to the web), but I can't figure out how to play it in IPython ...
76
votes
8
answers
134k
views
Dynamically using the first frame as poster in HTML5 video?
I'm wondering if there's any straightforward way to achieve this effect, without needing backend code to extract a frame, save it as a jpg and database it somewhere.
An effect whereby the first frame ...
71
votes
15
answers
278k
views
Video 100% width and height
I have a video, and I want it to FILL 100% of the width, and 100% of the height. And keep the aspect ratio.
Is it possible that it at least fills 100% for both? And if a bit of the video has to be ...
71
votes
11
answers
89k
views
Disable download button for Google Chrome?
Google Chrome is now shipping with a download button for videos that are just embedded videos (i.e. not MSE):
I'm having a hard time find any documentation for Chrome's implementation of the <...
69
votes
12
answers
175k
views
Javascript to stop HTML5 video playback on modal window close
I've got a html5 video element on a modal window. When I close the window the video continues to play. I'm a total newbie to JS. Is there an easy way to tie a video playback stop function to the ...
69
votes
7
answers
90k
views
How can I set preview of video file, selecting from input type='file'
In one of my module, I need to browse video from input[type='file'], after that I need to show selected video before starting upload.
I am using basic HTML tag to show. but it is not working.
Here ...
68
votes
9
answers
193k
views
HTML5 video "autoplay" not automatically starting in Chrome
I have the following code:
<video controls autoplay>
<source src="video/myVideo.mp4" type="video/mp4">
<source src="video/myVideo.webm" type="...
65
votes
3
answers
49k
views
ffmpeg video editing command in milliseconds timestamp
I am editing a video with ffmpeg where I have to keep in view the timestamp further deep from seconds to milliseconds. I know such command : ffmpeg -i a.ogg -ss 00:01:02 -to 00:01:03 -c copy x2.ogg. ...
64
votes
7
answers
226k
views
How to open .mov format video in HTML video Tag?
I want to play .mov video like as this, but video doesn't play in any browser.
<video width="400" controls Autoplay=autoplay>
<source src="D:/mov1.mov" type="video/mov">
</video>
64
votes
3
answers
65k
views
How to prevent html5 video from loading before playing?
I have several html5 videos on one page and I've just realized that when you visit the page, all the videos start loading even though I haven't clicked play on any of them.
Is there a way to only ...
62
votes
10
answers
179k
views
Can I have a video with transparent background using HTML5 video tag?
We filmed a spokesperson on a green screen and have the video files ready in multiple formats.
With Flash we could use the wmode transparent within the param and embed tags, but is there something ...
61
votes
3
answers
156k
views
HTML5 video - show/hide controls programmatically
I am looking for a way to show or hide HTML5 video controls at will via javascript. The controls are currently only visible when the video starts to play
Is there a way to do this with the native ...
61
votes
3
answers
90k
views
seek to a point in html5 video
Is it possible to seek to a particular point in html5 video displayed in a web page? I mean ,can I input a particular time value (say 01:20:30:045 ) and have the player control (slider) move to that ...
59
votes
4
answers
157k
views
Wait until an HTML5 video loads
I have a video tag, that I dynamically change its source as I am letting the user to choose from a number of videos from the database. The problem is that when I change the src attribute the video ...
57
votes
4
answers
137k
views
video as site background? HTML 5
I want to use a video as a background instead of an image that automatically stretches to the whole screen (background).
I would also like to rotate videos and images.. so that there is a random ...
56
votes
7
answers
89k
views
Retrieving HTML5 video duration separately from the file
I am working on building a HTML5 video player with a custom interface, but I am having some problems getting the video duration information to display.
My HTML is simple:
<video id="video" poster=...
53
votes
8
answers
116k
views
Is there a way to set the default HTML5-Video volume?
HTML5 videos always start at 100% volume.
How can I make them start at 50% volume?
50
votes
6
answers
155k
views
current/duration time of html5 video?
I need a way of getting the total time length of the video and the current time with jquery and displaying it in a couple of <div> tags.
<div id="current">0:00</div>
<div id="...
49
votes
5
answers
63k
views
Checking if a html5 video is ready
is there an JavaScript event triggered, if a HTML5 video is ready for playback?
49
votes
6
answers
84k
views
ffmpeg convert mov file to mp4 for HTML5 video tag IE9
I looked everywhere here and on google - there is no valid command that works for IE9.
some how IE9 is missing something.
All that I tried worked everywhere else: chrome,safari,mobile device etc...
I ...
49
votes
11
answers
187k
views
Disable html5 video autoplay
How can I disable html5 video autoplay?
what I've tried:
<video width="640" height="480" controls="controls" type="video/mp4" autoplay="false" preload="none"><source src="http://mydomain....
47
votes
4
answers
184k
views
Overlaying a DIV On Top Of HTML 5 Video
I need to overlay a div ON TOP of a div containing an HTML 5 video. In the example below the overlaying div's id is "video_overlays". See example below:
<div id="video_box">
<div id="...
47
votes
5
answers
40k
views
How to detect whether HTML5 video has paused for buffering?
I'm trying to test whether a video is choppy. I have noticed that the pause event is not triggered when the video pauses for buffering. What is the best way to detect whether the video has paused for ...
47
votes
6
answers
39k
views
Why Safari on iOS is not showing my HTML5 video poster?
I have this webpage:
http://healthpad.net/dashboard/
It have 10 <video> elements on it.
For some reason, when I load the page on an iPad, it is not showing the video posters.
Try the ...
46
votes
5
answers
82k
views
How to take a snapshot of HTML5-JavaScript-based video player?
Actually, i have a HTML5 page with JavaScript function that allow me to play a wmv video file.
I need to take a snapshot when the video is playing (with pause or without) and saved in any image format ...
46
votes
19
answers
75k
views
rounded corners on html5 video
Is there a way I can cut off the corners of my html5 video element using the CSS3 border-radius attribute?
Check out this example. it's not working.
46
votes
3
answers
189k
views
use video as background for div
I would like to use a video as background in CSS3. I know that there is no background-video property, but is it possible to do this behavior. Using a fullsize video-tag doesn't give the wanted result, ...