html5-video

How to identify that html5 media element is stalled and waiting for further media to continue playing

百般思念 提交于 2020-01-10 20:14:29
问题 I am working with MediaSource and SourceBuffer to play html5 video. I am sequentially fetching DASH fragments to continue uninterrupted video play. But sometimes, due to network conditions, SourceBuffer runs out of data to continue play. When that data arrives play resumes. But between this period, video looks stalled. I want to add some visual indication over media element, that it is paused as its buffering required data. I tried binding 'waiting' and 'stalled' events on video, but none of

Chrome (Android) video autoplay inside Angular 2+ component

孤人 提交于 2020-01-10 03:13:51
问题 What does not work: If I put a video tag with "autoplay" (see below) into the template of an Angular 2+ component with the goal of autoplaying on mobile: <video muted autoplay> <source src="path/to/video.mp4" type="video/mp4" /> </video> What does work: Moving it to the index.html (outside of the Angular component) Appending it to the body from within the component: window.addEventListener('load', () => { document.body.innerHTML += "<video autoplay muted loop>\n" + " <source src=\"path/to

script to check if a video is playing and not restart

不羁岁月 提交于 2020-01-07 12:36:57
问题 Okay, that's phrased awkwardly, but what I'm looking for is a script that checks, onclick if a video is playing, and if it is, don't start playing it again. It's for a page that has six thumbs in an array that each play a video, and you're not supposed to be able to restart the video(which means its acting like its not selected) how would I be able to do this? 回答1: To prevent clicking from doing anything to the video you can do this: $("video").click(function(e) { e.preventDefault(); return

script to check if a video is playing and not restart

筅森魡賤 提交于 2020-01-07 12:35:40
问题 Okay, that's phrased awkwardly, but what I'm looking for is a script that checks, onclick if a video is playing, and if it is, don't start playing it again. It's for a page that has six thumbs in an array that each play a video, and you're not supposed to be able to restart the video(which means its acting like its not selected) how would I be able to do this? 回答1: To prevent clicking from doing anything to the video you can do this: $("video").click(function(e) { e.preventDefault(); return

Run two videos at the same time with JavaScript

故事扮演 提交于 2020-01-07 02:03:50
问题 I would like run two videos at the same time after click on a play button that was created with JavaScript : https://jsfiddle.net/Lrt7nqyn/ At the moment, just one of videos run. <div class="player"> <div class="mediaplayer"> <video id="video1"> <source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4" /> </video> <video id="video2"> <source src="http://clips.vorwaerts-gmbh.de/VfE_html5.mp4" type="video/mp4" /> </video> </div> <table> <tr> <th>Time</th> <td> <input class=

Html5 video blob on iOS 9

a 夏天 提交于 2020-01-06 19:59:12
问题 Loading a video (mp4/H264) to a blob through xhr, then using such blob as the source for an HTML5 Video element. var vsource = window.URL.createObjectURL(blob); var player = document.getElementById("player"); player.src = vsource; player.play(); The above has been working on pretty much every major desktop and mobile browser, with the exception of iOS Safari. It was broken on iOS 7, worked on iOS 8, and stopped working again on iOS 9. I wonder if anyone is aware of this, and if there is any

Video poster without poster attribute (mobile browsers)

一个人想着一个人 提交于 2020-01-06 19:44:06
问题 I am using video HTML tag. So far, if I am NOT specifying any poster , how one will be selected? Does it depend on video file format? Does it depend on video content (first frame etc)? Does it depend on a mobile browser version etc? 回答1: So far I've only ever used MP4 files with the video tag and each time I've not specified a poster image. It has picked up the first frame by default. I know this information doesn't have any concrete evidence for you and may not help but thought I would share

URI mismatch Rails generates MD5 digest in asset URL in production, but controller GET's a non-MD5 URL

蹲街弑〆低调 提交于 2020-01-06 19:37:18
问题 I have a Rails app with a page or two that uses the html5 video tag, and the corresponding Rails video_tag() method to display video on the page. I've added <%= video_tag "car_circle.mp4", width: "640", height: "500", controls: true %> to an html.erb file in views. Rails 3.2 looks for videos in the /public directory, and so I've added my videos to a folder called public/videos . In order to add this folder to the asset pipeline, I added this line to application.rb config.assets.paths << "#

play a video inside an image

邮差的信 提交于 2020-01-06 04:25:26
问题 I am trying to play a video inside a png image that should work as a frame for my video. I found a first solution for my problem in this other SO question: HTML : play a video inside an image But the thing that this question doesn't solve for me is that the video is not clickable. this is a good solution if I want my video to be set on autoplay. But I my video to play only when I click on it. And I know that this solution will not allow me to click on the controls, as the png image will be in

Opening an activity with a webview containing a HTML5 video for a second time

空扰寡人 提交于 2020-01-06 04:02:20
问题 I am serving video's in a webview in Android using Appcelerator Titanium. On iOS this works like a charm. But on Android this gives some problems. It goes wrong the second time an activity is opened with a webview that holds a html5 video element. Steps to reproduce: (Also see this youtube video: http://www.youtube.com/watch?v=0MpSpfJNyOk ) The first time opening a video/activity with html5 video it shows the video and I am able to play it. When I close the window/activity and open a new