html5-video

How do I detect if the HTML5 autoplay attribute is supported?

夙愿已清 提交于 2019-12-17 15:39:40
问题 How do I best detect whether a browser's HTML5 video element supports autoplay? On current iOS Safari, for example, autoplay is disabled. Update: I now designed the web page in such a way that it works irrespective of whether autoplay is supported. Now when the page is loaded an initialization video is shown. On an iPad, the user is presented with a big play button. Once playback has been triggered, the video is hidden. Afterwards, playback of the video player can be controlled from

Checking if a html5 video is ready

梦想与她 提交于 2019-12-17 15:22:21
问题 is there an JavaScript event triggered, if a HTML5 video is ready for playback? 回答1: I assume that ready for playback means that the readyState property is equal to HAVE_ENOUGH_DATA constant (numeric value 4). According to the doc, when the readyState property turn to this value, a canplay event should be fired. 回答2: Just came across this question and although it is a little old I am posting this for future readers (who; like me, probably come from Google). So as of today this is the event

VLC record webcam and stream to chrome linux

空扰寡人 提交于 2019-12-17 10:58:10
问题 I am currently looking for how to accomplish what I have been told is possible. I was told that we would be able use vlc to stream a webcam in linux which would allow for the following: Recording the stream to the local machine for a later upload. Play the stream as it's recording using Chrome's HTML5 video capabilities. Send a start and stop command from the web for the vlc recording. I have been researching this for quite some time and haven't been able to find a viable solution. I am able

How can I set preview of video file, selecting from input type='file'

≡放荡痞女 提交于 2019-12-17 09:20:27
问题 In one of my module, I need to browse video from input[type='file'], after that I need to show selected video before starting upload. I am using basic HTML tag to show. but it is not working. Here is code: $(document).on("change",".file_multi_video",function(evt){ var this_ = $(this).parent(); var dataid = $(this).attr('data-id'); var files = !!this.files ? this.files : []; if (!files.length || !window.FileReader) return; if (/^video/.test( files[0].type)){ // only video file var reader = new

HTML5 video - show/hide controls programmatically

空扰寡人 提交于 2019-12-17 09:08:16
问题 I am looking for a way to show or hide HTML5 video controls at will via javascript. The controls are currently only visible when the video starts to play Is there a way to do this with the native video controls? I'm using google chrome browser. 回答1: <video id="myvideo"> <source src="path/to/movie.mp4" /> </video> <p onclick="toggleControls();">Toggle</p> <script> var video = document.getElementById("myvideo"); function toggleControls() { if (video.hasAttribute("controls")) { video

Live streaming dash content using mp4box

空扰寡人 提交于 2019-12-17 08:54:22
问题 I'm trying to live stream H.264 content to HTML5 using the media source extensions API. The following method works pretty well: ffmpeg -i rtsp://10.50.1.29/media/video1 -vcodec copy -f mp4 -reset_timestamps 1 -movflags frag_keyframe+empty_moov -loglevel quiet out.mp4 and then: mp4box -dash 1000 -frag 1000 -frag-rap out.mp4 I can take the MP4Box output ( out_dashinit.mp4 ) and send it through Web Sockets, chunk by chunk, to a JavaScript client that feeds it to the media source API. However,

HTML5 Video buffered attribute features

本小妞迷上赌 提交于 2019-12-17 08:30:25
问题 I am designing a custom HTML5 video player. Thus, it will have its own custom slider to mimic the video progress, so I need to understand the entire buffering shebang of a HTML5 video. I came across this article: Video Buffering. It says that the buffered object consists of several time ranges in linear order of start time. But I couldn't find out the following: Say the video starts. It continues upto 1:45 on its own (occasionally stalling perhaps, waiting for further data), after which I

Can I have a video with transparent background using HTML5 video tag?

我的未来我决定 提交于 2019-12-17 08:30:24
问题 We filmed a spokesperson on a green screen and have the video files ready in multiple formats. With Flash we could use the wmode transparent within the param and embed tags, but is there something similar to this with the video and source tags in HTML5? Is it even possible to properly save .m4v or .ogv videos so that we can play these files with transparent backgrounds on our browsers? Thanks 回答1: Yes, this sort of thing is possible without Flash: http://hacks.mozilla.org/2009/06/tristan

How do I get a HTML5 Video to work using IE10

别等时光非礼了梦想. 提交于 2019-12-17 06:54:10
问题 I am hoping someone has an idea on what I can do to help me play HTML5 videos on my local intranet. My Web server= Windows Server 2008 R2 Standard 64bit IIS version= IIS7 Test User environment = Windows 7 Enterprise Video plays perfectly using 'Google Chrome' Video fails to play using 'IE10' My html code is as follows: <!DOCTYPE html> <html> <body> <video src="AccReadings.mp4" width="400" height="300" preload controls> </video> </body> </html> My test machine using IE10 does play HTML5Rocks

chrome could play html5 mp4 video but html5test said chrome did not support mp4 video codec

﹥>﹥吖頭↗ 提交于 2019-12-17 06:45:58
问题 According to html5test.com , chrome does not support html5 mp4 video (see following link). http://html5test.com/compare/feature/video-mpeg4.html However, in this test page , the mp4 video could be played successfully by setting the body as following: <!DOCTYPE html> <html> <body> <video width="320" height="240" controls="controls"> <source src="movie.mp4" type="video/mp4" /> Your browser does not support the video tag. </video> </body> </html> How can I interpret this correctly? 回答1: .mp4 is