html5-video

Does iPhone/iPad Safari require 'Accept-Ranges' header for video?

♀尐吖头ヾ 提交于 2019-11-26 16:51:00
问题 I've been having problems serving videos from my dev server that play in mobile Safari. My dev server does not support the 'Accept-Ranges' header and after reading a few forums I've discovered that may be my problem. Here is an example forum posting saying just that. Is this correct? Does mobile Safari require the Accept-Ranges header? Can anyone point me to any Apple documentation actually stating that? Thanks. 回答1: I found some Apple documentation that says that it does in fact need that

How to pause a HTML5 video on an event?

懵懂的女人 提交于 2019-11-26 16:28:09
问题 I am building a website with HTML5- <video> in fullscreen background. There are pages in shape of <div> s becoming visible with SWF-container player in them that cause serious CPU performance issues when both media play. So I want to add a simple javascript command that pauses the background video when a project- <div> becomes visible. Would be nice if it resumes again the playback when it gets closed/hidden. Thanks in advance. 回答1: document.getElementById('myvideotag').pause(); Note that

Why does Firebug show a “206 Partial Content” response on a video loading request?

删除回忆录丶 提交于 2019-11-26 16:25:49
问题 I have a bunch of html5 video elements, with their preload attribute set to "auto". They start loading just fine, but I think there might be a problem with their caching, because each time I reload the page (without clearing the cache), they start all over again. When I checked the Network panel in firebug, I noticed everything else (images and files) was giving me a "304 not modified" message as espected, while the videos (and audio) files were giving me a "206 partial content" message, in

MP4 plays when accessed directly, but not when read through PHP, on iOS

為{幸葍}努か 提交于 2019-11-26 16:00:35
问题 I use a PHP script to validate video requests before serving them. This script works as expected on the desktop, with Safari and Chrome. But on iOS, I get a broken play button. I'm sure the video is properly encoded for iPhone/iPad, because when I access it directly, it works as expected. The relevant PHP code: $file_name = 'test-video.mp4'; $file_size = (string)(filesize($file_name)); header('Content-Type: video/mp4'); header('Content-Length: '.$file_size); readfile_chunked($file_name); exit

How to hide full screen button of the video tag in HTML5

非 Y 不嫁゛ 提交于 2019-11-26 15:49:11
问题 I need to hide the full screen button of the video tag in HTML5. Is there any way to achieve it ? Thanks. 回答1: I think you can accomplish this by changing the css for the #document fragments , these are DOM1 specs and supported by all browsers, but about the styling, I'm not sure. Simple webkit browser (chrome on windows) specific solution The following solution is webkit specific video::-webkit-media-controls-fullscreen-button { display: none; } video::-webkit-media-controls-play-button {}

HTML5 video will not loop

∥☆過路亽.° 提交于 2019-11-26 15:48:00
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/4ebc66e899727777b400003c' type='video/mp4'></source> </video> Even though I have told the video to loop, it does not. I also tried to get it to loop with the onended attribute (as per this Mozilla support thread , I also tried that bit of jQuery). Nothing has worked so far. Is it an issue with Chrome, or my code? Edit: I checked the Network events and HEAD of a working copy ( http://fhsclock-labs.heroku.com/no

Playing m3u8 Files with HTML Video Tag

心已入冬 提交于 2019-11-26 15:45:26
问题 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 Deploying HTTP Live Streaming Media for the iPhone and iPad', I am a bit stuck. I took my source file (an mkv) and used ffmpeg to encode the file the MPEG-TS format and Apple-recommended settings and a Baseline 3.0 profile: ffmpeg -i "example.mkv" -f mpegts -threads:v 4 -sws_flags bicubic -vf

How to take a snapshot of HTML5-JavaScript-based video player?

耗尽温柔 提交于 2019-11-26 15:28:37
问题 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 JPG or BMP whatever. Any help will appreciate. Thank you. <!DOCTYPE HTML> <html> <head> <title>HTML5 video</title> <script type="text/javascript"> function checkPlay() { var myVideo = document.getElementById("myVid"); var ytStr = '<iframe width="500" height="500" src="C:\XA0002.wmv" frameborder=

Start HTML5 video at a particular position when loading?

做~自己de王妃 提交于 2019-11-26 15:04:21
I am trying to play HTML5 video (VP8 encoded). What I want is to play it at a certain position. Let's say at time 50 seconds onward. I have tried but there seem to be some problem. Can you suggest if there is something I'm doing wrong? Here is the code: <video id="vid1" width="640" height="360"> <source src="file.webm" type="video/webm" /> Your browser does not support the video tag. </video> <script> document.getElementById('vid1').currentTime = 50; </script> I have tried but it doesn’t work. When video loads, it just starts playing from start. However if I call this during playback like

HTML 5 Video “autoplay” not automatically starting in CHROME

蓝咒 提交于 2019-11-26 14:04:23
问题 I have the following code: <video controls autoplay> <source src="video/myVideo.mp4" type="video/mp4"> <source src="video/myVideo.webm" type="video/webm"> <source src="video/myVideo.ogv" type="video/ogg"> </video> The video: displays well in both Chrome and Firefox In Firefox it plays as expected In Chrome it displays but not "autostarts". This is the problem. If I click on it (in Chrome) it plays ok Tried <video controls autoplay>...</video> <video controls autoplay="1">...</video> <video