html5-video

How to tell if a <video> element is currently playing?

佐手、 提交于 2019-11-26 10:33:41
问题 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 playing, and timeupdate events events periodically while playing, but I\'m looking for a way to determine whether a video is playing right now . Is there an easy way to determine this? The closest I\'ve got is: !(video.paused || video.ended || video.seeking || video.readyState < video.HAVE

how to make getUserMedia() work on all browsers

流过昼夜 提交于 2019-11-26 10:31:54
问题 I learn about web-rtc , it says that you can capture video-cam , i used demo , well this worked on chrome only.. when i open it on firefox i get message \"getUserMedia() not supported in your browser.\" on another hand when i open this HTML5-rocks-demo it worked 100%. what changes or plugins or something i miss that let getusermedia() works. 回答1: The issue is not just the prefixed function name; the stream provided works differently in different browsers. Here, I'll walk you through it. I

HTML5 <video> callbacks?

寵の児 提交于 2019-11-26 10:17:05
问题 I\'m working on a site for a client and they\'re insistent on using HTML5\'s video tag as the delivery method for some of their video content. I currently have it up and running with a little help from http://videojs.com/ to handle the Internet Explorer Flash fallback. One thing they\'ve asked me to do is, after the videos finish playing (they\'re all a different length), fade them out and then fade a picture in place of the video --- think of it like a poster frame after the video. Is this

video as site background? HTML 5

冷暖自知 提交于 2019-11-26 10:13:10
问题 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 video/image displayed in any order. It would also be nice to know how to delay video playback, so that the video only plays once 30 seconds after the site loaded. thx! 回答1: Take a look at my jquery videoBG plugin http://syddev.com/jquery.videoBG/ Make any HTML5 video a site background... has an image

HTML5 live streaming

时间秒杀一切 提交于 2019-11-26 10:09:30
问题 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 I can\'t get it working. Below is the code I have. Could someone point me in the correct direction? <!DOCTYPE html> <html lang=\"en\"> <head> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> <title>Deltion Live Streaming</title> <script language=\"javascript\" type=\

How to change the playing speed of videos in HTML5?

自古美人都是妖i 提交于 2019-11-26 10:08:37
问题 How to change the video play speed in HTML5? I\'ve checked video tag\'s attributes in w3school but couldn\'t approach that.Any help would be appreciated! 回答1: According to this site, this is supported in the playbackRate and defaultPlaybackRate attributes, accessible via the DOM. Example: /* play video twice as fast */ document.querySelector('video').defaultPlaybackRate = 2.0; document.querySelector('video').play(); /* now play three times as fast just for the heck of it */ document

html5 video not working on ipad

北城余情 提交于 2019-11-26 09:37:52
问题 I have an html5 video that should work on ipad. Controls must be hide and on user tap on the ipad, the html5 video must play. I am using html5video.js What I can see on ipad is only the poster image and when I tap the ipad, nothing happens. below is my code <!doctype html> <html> <head> <meta name=\"viewport\" content=\"width=768px, minimum-scale=1.0, maximum-scale=1.0\" /> <link href=\"http://vjs.zencdn.net/c/video-js.css\" rel=\"stylesheet\"> <script src=\"http://vjs.zencdn.net/c/video.js\"

current/duration time of html5 video?

寵の児 提交于 2019-11-26 09:30:36
问题 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=\"duration\">0:00</div> I\'ve been searching all day and I know how to get them I just can\'t display them. #jquerynoob 回答1: HTML: <video id="video-active" class="video-active" width="640" height="390" controls="controls"> <source src="myvideo.mp4" type="video/mp4"> </video> <div id="current">0:00</div> <div id=

setAttribute and video.src for changing video tag source not working in IE9

守給你的承諾、 提交于 2019-11-26 09:08:48
问题 I have literally read every stackoverflow thread regarding changing the video tag source dynamically via javascript in IE9, including the useful but not agreed upon posts here and here, but do feel like there is another solution. Here is the very basic example of what I\'m trying to do: var video = document.getElementById(\'video\'); //now, use either of the lines of code below to change source dynamically video.src = \"nameOfVideo\"; //or use... video.setAttribute(\"src\", \"nameOfVideo\");

Detect if HTML5 Video element is playing

半城伤御伤魂 提交于 2019-11-26 09:07:53
问题 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 seem to get it to work. This is my current code: var stream = document.getElementsByTagName(\'video\'); function pauseStream() { if (stream.playing) { for (var i = 0; i < stream.length; i++) { stream[i].pause(); $(\"body > header\").addClass(\"paused_note\"); $(\".paused_note\").text(\"Stream