html5-video

Proxy HTMLElement

泄露秘密 提交于 2019-12-01 03:49:56
问题 I wanted to check what does a library do with video element I pass to it so I naively did this: cosnt videoElement = new Proxy(document.querySelector('video'), { get(target, key) { const name = typeof key === 'symbol'? key.toString() : key; console.info(`Accessing video.${ name }`) return target[key]; } }); But I got an error: TypeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node'. Is there a way to make this work? EDIT: I have gained some knowledge, with it I

How to retrieve a MediaStream from a Blob url?

主宰稳场 提交于 2019-12-01 03:43:42
It was possible to get an URL using window.URL.createObjectURL() from a stream like in below code. navigator.getUserMedia({ video: true, audio: true }, function (localMediaStream) { var video = document.querySelector('video'); video.src = window.URL.createObjectURL(localMediaStream); video.onloadedmetadata = function (e) { // Do something with the video here. }; }, function (err) { console.log("The following error occured: " + err); } ); Problem is now I have a blob URL like: blob:http%3A//localhost%3A1560/f43bed15-da6c-4ff1-b73c-5640ed94e8ee Is there a way to retrieve the MediaStream object

Calling AngularJS controller function when html5 video ends

蹲街弑〆低调 提交于 2019-12-01 03:42:44
问题 I have a video on the homepage of my app which plays when I launch it. When the video ends I'd then like to use some CSS 3 transitions to move the page around. <ion-view hide-back-button="true" title=""> <ion-pane> <div class="home-video"> <video autoplay="autoplay" ng-click="ctrl.video()" aria-label="video of IBM logo" tabindex="-1" aria-hidden="true" poster="images/Hero_Final_Placeholder.gif" onended="ctrl.video()"> <source src="videos/video.mp4" type="video/mp4"> <img src="images/video

z-index layering for HTML5 video (ipad) [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 03:40:27
Possible Duplicate: iPad Safari mobile seems to ignore z-indexing position for html5 video elements I am using the BrightCove smartplayer code to write an HTML5 video tag into the page. This code replaces the object tag with video tag so that it works on the iphone and ipad, whils still working in browser that dont support The problem I am having is with the layering of this dynaically written in tag. It does not seem to obey the z-index order, resulting in the dropdowns I have placed above the video sitting behind the video when someone rolls over the dropdown. gion_13 After some digging, I

How to style text tracks in HTML5 video via CSS?

Deadly 提交于 2019-12-01 03:20:58
Is it possible to style text tracks (like subtitles and captions) in HTML5 video players? I already found a way to do so for Chrome: video::-webkit-media-text-track-container { // Style the container } video::-webkit-media-text-track-background { // Style the text background } video::-webkit-media-text-track-display { // Style the text itself } This seems to confuse Safari a bit. It works, but the rendering is quite buggy. But more important: How to achieve do this for Firefox and IE? Jeoffrey Use this for Chrome: video::cue { // add style here } Firefox: Not yet supported. Open bug to

Why won't some MP4 files play via HTML5?

南楼画角 提交于 2019-12-01 02:23:11
It's strange, some MP4 files will play in HTML5, but others won't. Here is a test page http://psdtucss.com/test/test2.html , open it in Chrome 19.0.1084.46 m. The first MP4 plays, but the other one won't. What's the reason. The code is very simple: <h3>the first mp4 file can play</h3> <p><video width="640" height="264" controls="controls"><source src="1.mp4" type="video/mp4" />Your browser does not support the video tag.</video></p> <h3>but the other can't play</h3> <p><video width="640" height="264" controls="controls"><source src="2.mp4" type="video/mp4" />Your browser does not support the

HTML5 - Get audio and video started together?

北战南征 提交于 2019-12-01 01:30:40
How would I go about getting audio and video started exactly at the same time using <audio> and <video> ? JavaScript is fine (and is probably needed). Thanks! You didn't say anything about file types so I used HTML-5 formats that work in Safari. <!DOCTYPE> <meta charset="UTF-8"> <title> audio video</title> <audio id="audioInHTML" controls="controls"> <source src="audio.wav" type="audio/wav"/> </audio> </div> <video id="videoInHTML" width="320" height="240" controls="controls"> <source src="movie.mp4" type="video/mp4" /> </video> <div id="playButtonDiv" </div> <form> <input type="button" value=

How to mute/unmute mic in webrtc

走远了吗. 提交于 2019-12-01 01:16:15
问题 I have read from here that how i can mute/unmute mic for a localstream in webrtc:WebRTC Tips & Tricks When i start my localstream mic is enable at that time by default so when i set audioTracks[0].enabled=false it muted a mic in my local stream but when i set it back true it enable to unmute. Here is my code mute/unmute for a localstream: getLocalStream(function (stream,enable) { if (stream) { for (var i = 0; i < stream.getTracks().length; i++) { var track = stream.getAudioTracks()[0]; if

How to retrieve a MediaStream from a Blob url?

微笑、不失礼 提交于 2019-12-01 00:34:58
问题 It was possible to get an URL using window.URL.createObjectURL() from a stream like in below code. navigator.getUserMedia({ video: true, audio: true }, function (localMediaStream) { var video = document.querySelector('video'); video.src = window.URL.createObjectURL(localMediaStream); video.onloadedmetadata = function (e) { // Do something with the video here. }; }, function (err) { console.log("The following error occured: " + err); } ); Problem is now I have a blob URL like: blob:http%3A/

Record screen (screencast) using HTML5, e.g. getUserMedia or something?

强颜欢笑 提交于 2019-12-01 00:32:10
Is there some HTML5 API that can help me record the screen (screencast)? I know about recording webcams etc, but I need the screen it self. It would help even more if this API was actually implemented in some cross-platform browser. Screen capture is available as an experimental feature in Chrome, and you must enable it in your browser settings (chrome://flags/#enable-usermedia-screen-capture). Also, it seems to only work on an https connection. navigator.getUserMedia({ video: { mandatory: { chromeMediaSource: 'screen' // maxWidth: 640, // maxHeight: 480 } } }, function (stream) { //success!