HTML5 video element request stay pending forever (on chrome)

(This bug still exists in Chrome 38.0.2125.111, OS X 10.10) This may be a Chrome bug & you may solve it without any dummy ?time-suffix trick, just helping Chrome releasing sockets faster: I had the same bug on a RevealJs HTML presentation, with 20+ videos (one per slide, autoplayed on slide focus). As a side … Read more

Is it possible to check if the user has a camera and microphone and if the permissions have been granted with Javascript?

Live Demo: https://www.webrtc-experiment.com/DetectRTC/ If user didn’t allow webcam and/or microphone, then media-devices will be having “NULL” value for the “label” attribute. Above page will show this message: “Please invoke getUserMedia once.” PS. You can type “DetectRTC.MediaDevices” in the Chrome Console developers tool. Note: It works only in Chrome. Firefox isn’t supporting similar API yet. (Updated: … Read more

Disable html5 video autoplay

I’d remove the autoplay attribute, since if the browser encounters it, it autoplays! autoplay is a HTML boolean attribute, but be aware that the values true and false are not allowed. To represent a false value, you must omit the attribute. The values “true” and “false” are not allowed on boolean attributes. To represent a … Read more

current/duration time of html5 video?

HTML: <video id=”video-active” class=”video-active” width=”640″ height=”390″ controls=”controls”> <source src=”https://stackoverflow.com/questions/6380956/myvideo.mp4″ type=”video/mp4″> </video> <div id=”current”>0:00</div> <div id=”duration”>0:00</div> JavaScript: $(document).ready(function(){ $(“#video-active”).on( “timeupdate”, function(event){ onTrackedVideoFrame(this.currentTime, this.duration); }); }); function onTrackedVideoFrame(currentTime, duration){ $(“#current”).text(currentTime); //Change #current to currentTime $(“#duration”).text(duration) } Notes: Every 15 to 250ms, or whenever the MediaController’s media controller position changes, whichever happens least often, the user agent must … Read more