html5-video

HTML5 video buffering before the playback

两盒软妹~` 提交于 2019-12-25 16:56:25
问题 I have an html page, and a link to the video in my code. Can I start buffering the video as soon as I've opened page, and show the 'play' button only when the video is completely buffered? Important, thet I should put this video dynamicly via innerHTML() when it's loaded. Before that, the video tag shouldn't be on the page at all. 回答1: For solution I have used video.js jquery plugin. 来源: https://stackoverflow.com/questions/12963934/html5-video-buffering-before-the-playback

jQuery and live webcam video streaming

瘦欲@ 提交于 2019-12-25 12:24:21
问题 I'm trying to build application where people can have their own rooms and stream video from webcam, so other people can see them. I was trying approach with red5, but I can't integrate it with php so I'm trying with jquery now. So far I've tried those three plugins: http://www.scriptcam.com/docs.cfm and it's the closest to what I want ( it has one-to-many videochat ) but You can only have 5 viewers. http://jqueryvideo-player.com someone said that it has an option to stream a video from webcam

HTML5 video repeat at a given timeframe

假如想象 提交于 2019-12-25 09:46:41
问题 I tried to create a repeat function associating with an HTML5 video element, so it allows the player to repeat at the given time frame that I want. I will call this function in the following sequence, repeat(1,3), repeat(5,7) so I wish the player will repeat on time 1sec - 3sec when repeat(1,3) is called, then 5sec - 7sec when repeat(5,7) is called. The player, however, keeps repeating time 1-3 sec frame when repeat(5,7) is called. I know the issue is that video.currentTime >= 3 is true in

Close stream when finished

柔情痞子 提交于 2019-12-25 08:28:18
问题 I am streaming HTML 5 video with Express using fs.createReadStream(path).pipe(res); which eventually causes the error Error: EMFILE: too many open files if I refresh the page too many times (in the thousands). I assume I need to perform some kind of cleanup and close the file to prevent this but am unsure what needs to be done. I am creating a read stream every time the user seeks to a part of the video which the client has not loaded which makes this problem happen in a matter of minutes.

try catch not working in recursive function

早过忘川 提交于 2019-12-25 07:48:04
问题 Objective What i am trying to do is catch the "Failed to load resource" error and put it in an alert window. Issue I am trying to catch a video that does not exist. Try catch is not catching the exception. Background I am trying to play through an array of videos, i continue to the next video when the previous one finishes. The issue is there wont always be a video for every element in the array. I have tried placing the try catch around just the play function. I have also tried placing the

IE9+ not playing portrait video in HTML5 video tag

♀尐吖头ヾ 提交于 2019-12-25 05:41:16
问题 For some reason I can't get IE9/10 to play video that is taller than wide, when using HTML5 video tags. Demo: http://s.l6.no/demo/video+html5/ The demo shows one video scaled down from 1280x720, which plays perfectly fine in all tested browsers, and one video scaled down from 720x1280 which plays for all browsers but IE9/10. Tested and works for: Chrome 26, Windows 7 64-bit Chromium 24, Ubuntu 64-bit Firefox 14, Windows 7 64-bit Tested and does not work for: Internet Explorer 9, Windows 7 64

Display canvas as gif for video preview

旧时模样 提交于 2019-12-25 05:20:10
问题 I'm working on a website and I am dealing with videos. My need is to display a gif a a preview / teaser for the videos on another page, that redirects to the video. What I found & added so far HTML <div id=thumbs></div> CSS #video {width:320px} JS var i =0; var video = document.createElement("video"); var thumbs = document.getElementById("thumbs"); video.addEventListener('loadeddata', function() { thumbs.innerHTML = ""; video.currentTime = i; }, false); video.addEventListener('seeked',

Lock camera / screen orientation to landscape with Ionic / ngCordova

与世无争的帅哥 提交于 2019-12-25 04:45:15
问题 I am trying to lock camera orientation to portrait in the app and to landscape in the camera. For camera access I am using $cordovaCapture pluggin. For orientation cordova-plugin-screen-orientation. Both plugins work but orientation plugin doesn't affect camera. (Testing in an Android) screen.lockOrientation('portrait'); $scope.captureVideo = function() { var options = { limit: 1, duration: 15 }; screen.lockOrientation('landscape'); $cordovaCapture.captureVideo(options) .then(function

Read and replace text in HTML causes high CPU load

半腔热情 提交于 2019-12-25 04:27:44
问题 I have a problem with high CPU load on a website where I want to replace some text with links. The script is loaded at the end of body. This works normally when there are no videos on the page. But if there are videos embedded like this the CPU load goes above 50%. If I use this for multiple files Firefox crashes. <p><video width="320" height="240" class="mediaelement" autoplay="autoplay" src="video.mp4" controls="controls"><a href="video.mp4">resources/video.mp4</a></video></p> I figured out

Put the video tag on the Canvas tag

人走茶凉 提交于 2019-12-25 04:14:35
问题 I would like to put the video player on Canvas. (Since my video is alpha channel and I would like to play the video on jpg) I made code like this below html <video id="mainVideo" src="item0.mp4"> </video> <canvas id="mainCanvas"> </canvas> my css #mainCanvas { position: absolute; top: 0; bottom: 0; left: 0; right: 0; width: 400; height: 400; } #mainVideo { position: absolute; top: 300; left: 300; margin: -50px 0 0 -50px; } my javascript document.addEventListener('DOMContentLoaded', function()