html5-video

HTML5 Video - Percentage Loaded?

爷,独闯天下 提交于 2019-11-26 23:50:40
Does anyone know what event or property I need to query in order to get a percentage figure of the amount an HTML5 video has loaded? I want to draw a CSS styled "loaded" bar that's width represents this figure. Just like You Tube or any other video player. So just like you tube a video will play even if the whole video hasn't loaded and give the user feedback on how much of the video has loaded and is left to load. Just like the Red Bar on YouTube: Yann L. The progress event is fired when some data has been downloaded, up to three times per second. The browser provides a list of ranges of

Controlling Netflix (HTML5) playback with Tampermonkey/javascript

狂风中的少年 提交于 2019-11-26 22:59:37
问题 While watching a netflix video on a Netflix site, my goal is to have a userscript invoke the playback controls programmatically. Specifically, the volume, level, play/pause state, and time position of the video. I've been able to manipulate the html5 video element itself, but controlling that directly does not provide the needed netflix control bar feedback to the user. (i.e. video is paused, but the control bar still shows it as playing). My approach thus far has been to try and locate the

Safari on iPad (iOS6) does not scale HTML5 video to fill 100% of page width

泪湿孤枕 提交于 2019-11-26 22:33:57
问题 I am using the following CSS to display a video in full width (100%) on a responsive HTML5 page. The native size of the video is 480x270. The video is scaled to fill the full width of the page on all desktop browsers while maintaining the aspect ratio. However, Mobile Safari and Chrome on my iPad (iOS 6.0.1) shows a black rectangle with the same width as the page. The video is tiny and displayed in its native size (480x270) at the center of the black rectangle. video { width: 100%; max-width:

Overlay on HTML5 Fullscreen Video

久未见 提交于 2019-11-26 22:24:48
I want to add overlay hotspots on a html5 video which will help me give info about that video. I was able to successfully add it on HTML5 Video's normal mode. But, when i change the video mode to fullscreen, it disappears. Want someone to help me please!!!. The best way to do this is to have a <div> containing the <video> and your hotspots, and request fullscreen on the containing <div>. I implemented the fullscreen and (parts of the) <video> APIs in Firefox. This z-index hack isn't the specified behaviour, so it will stop working once we update our implementation to match the latest draft of

stop other video that is playing in background on play the new one

为君一笑 提交于 2019-11-26 22:10:01
问题 I am using Videogular to show video. could you please help me how to stop/pause other video when user click on play button to new one. So by this at a time user can play only one video at a time. The system should automatically stop other video that is playing in background and play the new one Thanks 回答1: You can get all the APIs separately for each player and listen for a change in the state: <videogular ng-repeat="config in ctrl.videoConfigs" vg-player-ready="ctrl.onPlayerReady($API,

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

瘦欲@ 提交于 2019-11-26 22:04:57
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"); Both of these lines of code are hated thoroughly by Internet Explorer, notably because the src is most

How to handle “Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.” on Desktop with Chrome 66?

吃可爱长大的小学妹 提交于 2019-11-26 21:50:17
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 version 66. I did find an ad that began playback automatically on a website however using the following HTML: <video title="Advertisement" webkit-playsinline="true" playsinline="true" style="background-color: rgb(0, 0, 0); position: absolute; width: 640px; height: 360px;" src="http://ds.serving-sys.com/BurstingRes/Site-2500/Type-16/1ff26f6a-aa27-4b30-a264-df2173c79623.mp4" autoplay=""></video> So is by

Javascript to stop HTML5 video playback on modal window close

﹥>﹥吖頭↗ 提交于 2019-11-26 19:56:09
问题 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 window close button? Below is my html page: <!DOCTYPE html > <html lang="en"> <head> <meta charset="utf-8" /> <title>Modal Test</title> <script type="text/javascript" src="jquery.js"> </script> <script type="text/javascript"> $(document).ready(function(){ $("#showSimpleModal").click(function() { $(

rounded corners on html5 video

一世执手 提交于 2019-11-26 19:42:39
问题 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. 回答1: Create a div container with rounded corners and overflow:hidden. Then place the video in it. <style> .video-mask{ width: 350px; border-radius: 10px; overflow: hidden; } </style> <div class="video-mask"> <video></video> </div> 回答2: It works in Firefox as long as you set the appropriate 180px height for the 320px width video (16:9 aspect ratio

Image placeholder fallback for HTML5 Video

a 夏天 提交于 2019-11-26 19:29:33
问题 I'm using the following code to implement an HTML5 video on a page <video autoplay> <source src="/resources/video/product-hero.mp4.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> <source src="/resources/video/product-hero.webmhd.webm" type='video/webm; codecs="vp8, vorbis"' /> </video> This works great, embedded on my page in FF, Safari, and Chrome. What I'd like, since this video has no controls, and is mean to be embedded in the page with no borders (white BG in the video) is to