html5-video

Making HTML5 video draggable without losing the controls

空扰寡人 提交于 2019-12-21 02:03:30
问题 I have an HTML5 video player in this jsfiddle - http://jsfiddle.net/6B7w7/ that works fine. When you click the "Video1 - BranFerren" line the video loads and plays, and the controls work fine: <div id="video1" class="video_link">Video 1 - BranFerren &nbsp&nbsp<b>6:15</b></div> <div id="videoPlayer_wrapper"> <video id="videoPlayer" width="600" height="340" controls > </video> </div> But I want to be able to drag the player to a different part of the screen while it's playing. So I tried to

AudioContext panning audio of playing media

人盡茶涼 提交于 2019-12-21 01:23:05
问题 I wonder if is there a way to pan the audio of a video with JavaScript. The same way you can adjust volume, I need to pan an stereo audio left to right or right to left. This feature would be useful for multilingual events where you can produce a video in two languages using stereo, for instance, pan english audio to left and german translation to right. Then the player could transform the stereo track into mono muting one of the languages depending on user election. I already implemented

Disable html5 video download at CSS breakpoint

最后都变了- 提交于 2019-12-20 23:32:13
问题 I have a short looping html5 video that plays automatically in the browser. When the browser width is reduced to 870px the video disappears thanks to a css media query and display:none; How do I ensure the video does not download if the window starts at a smaller size like on a mobile device? The video is 1.8mb and I don't want to unnecessarily tax my user's data usage. Thanks! <video id="video_background" preload="none" autoplay="false" loop="loop" muted="muted" volume="0"> <source src=

Make HTML5 video stop at indicated time

邮差的信 提交于 2019-12-20 18:04:11
问题 I have a HTML5 video element in my page. The video I want to play is having a duration of 10 minutes. I have to play the part of the video from minute 1 to minute 5 . I can start it from a particular time by setting its currentTime property. But how can I stop the video at a particular time jQuery or JavaScript? 回答1: TL;DR: Simply listen on "timeupdate": video.addEventListener("timeupdate", function(){ if(this.currentTime >= 5 * 60) { this.pause(); } }); The usual way to wait for something in

Mobile Safari makes multiple video requests

依然范特西╮ 提交于 2019-12-20 11:49:53
问题 I am designing a web application for iPad which makes use of HTML5 in mobile safari. I am transmitting the file manually through an ASP.NET .ashx file hosted on IIS 7 running .NET Framework v2.0. The essential code looks partly like this: // If we receive range header only transmit partial file if (context.Request.Headers["Range"] != null) { var fi = new FileInfo(filePath); long fileSize = fi.Length; // Read start/end index string headerRange = context.Request.Headers["Range"].Replace("bytes=

How to play MKV file in browser?

☆樱花仙子☆ 提交于 2019-12-20 11:30:56
问题 I have a video file in MKV format, i want to play that file in the browser without converting, how can i play this file format in browser? <video width="320" height="240" controls> <source src="movie.mkv" type="video/mkv"> Your browser does not support the video tag. </video> i want this file to be played in full screen mode always. My browser is chrome. 回答1: It will refuse to play Matroska if the type attribute is set to video/x-matroska . Try removing the type attribute completely. After

Playing video inline in Ionic/Phonegap (webkit-playsinline not working)

青春壹個敷衍的年華 提交于 2019-12-20 09:37:52
问题 I'm using the HTML5 video tag to get a video playing in my ionic app. Here's my code: <video autoplay loop class="video" webkit-playsinline> <source src="videos/polina.mp4" type='video/mp4; codecs="h.264"' > <source src="videos/polina.webm" type="video/webm"> </video> The video autoplays fine, however the video opens up into the native player and doesn't play inline. After some research I came to understand that webkit-playsinline should solve this issue, at least on iOS, but this doesn't

H.265/HEVC web browser support

老子叫甜甜 提交于 2019-12-20 08:38:45
问题 Are there any web browsers out there that can playback the H.265 / MPEG-4 HEVC codec in a html5 video element? On what platform or hardware? I heard rumours about HEVC support in Edge when hardware decoding is available. With current GPUs and CPUs shipping with HEVC hardware decoding I wonder which other browser vendors are following. Firefox already works like this for H.264 回答1: It works in IE and Edge but only if there is hardware support. It's also reported to work in Android browser and

H.265/HEVC web browser support

守給你的承諾、 提交于 2019-12-20 08:38:36
问题 Are there any web browsers out there that can playback the H.265 / MPEG-4 HEVC codec in a html5 video element? On what platform or hardware? I heard rumours about HEVC support in Edge when hardware decoding is available. With current GPUs and CPUs shipping with HEVC hardware decoding I wonder which other browser vendors are following. Firefox already works like this for H.264 回答1: It works in IE and Edge but only if there is hardware support. It's also reported to work in Android browser and

How to detect whether HTML5 video has paused for buffering?

…衆ロ難τιáo~ 提交于 2019-12-20 08:36:28
问题 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 buffering? 回答1: I did this by inspecting the player progress every x milliseconds, e.g. 50. If the player hasn't advanced as much as it was expected to, then we are buffering. This is quite reliable, since I've found that other events such as waiting or stalled are not fired in all cases of the