html5-video

Sound plays every other time the Video plays in Chrome

≯℡__Kan透↙ 提交于 2020-01-04 05:24:07
问题 In chrome (7.0.517.44) I am using the <video> tag and the audio will only play every other time the video is played. Why is the audio not always playing along with the video? In page: <div id="VideoShow"> <video id="VideoPlay" width=800 height=600></video> </div> On click this JS is run. function playVideo(videoName) { $("#VideoShow").fadeIn(300); var Vid = document.getElementsByTagName('video')[0]; Vid.src = videoName; Vid.play(); Vid.addEventListener('ended', function(e) { closeVideo(); },

How do I draw a shape on an HTML5 video using SVG?

瘦欲@ 提交于 2020-01-04 04:07:47
问题 I am trying to draw shapes on top of an HTML5 video, but am having trouble figuring out how to do it. I know how to apply a mask on top of the video: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SVG Test</title> </head> <body> <video class="target1" height="270px" width="480px" controls > <source src="testVideo.webm" type="video/webm" /> </video> <!-- Apply a mask to the video --> <style> .target1 { mask: url("#mask1"); } </style> <!-- Define the mask with SVG --> <svg xmlns=

HTML5 video - setting video.currentTime breaks the player

时光总嘲笑我的痴心妄想 提交于 2020-01-03 17:00:17
问题 I am trying to interact with a 3rd-party html5 video player in Chrome. I am able to obtain a valid reference to it thusly: document.getElementsByTagName("video")[1] ...and the readyState is 4, so it's all good. I can successfully (and with expected result) call: document.getElementsByTagName("video")[1].play(); document.getElementsByTagName("video")[1].pause(); BUT when I call: document.getElementsByTagName("video")[1].currentTime = 500; ...the video freezes and it doesn't advance to the new

Stopping instead of rewinding at the end of a video in MediaElement.js

余生颓废 提交于 2020-01-03 14:13:23
问题 I'm wondering how to stop the MediaElement.js player at the end of the video. I wondered how to stop the mediaelement.js player at the end of a video. I was hoping to hold on the last frame and not rewind to show the first frame as it does now. Is it possible to change this behaviour? 回答1: I wrote a fix for this problem and John merged in version 2.10.2. There is now an option "autoRewind" that you can set to false to prevent the player from going back to the beginning. The eventlistener is

Use Javascript to Play HTML5 Video [closed]

二次信任 提交于 2020-01-03 13:07:34
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . How can I use Javascript to play an HTML5 video? For example, play the video at an onclick event. 回答1: <video id = 'video'> <!-- Your video's source --> </video> <button id='playVid'>Play</button> <script>

containing a video background to a specific div

血红的双手。 提交于 2020-01-03 05:52:29
问题 I am struggling to place a video background into a div. The div happens to also have a height of 500px and a width of 100%, and I want the video background to fit across the entire div, responsive. HTML <div id="dev_cms_vid_cont"> <video id="cms_vid" loop muted autoplay poster="img/videoframe.jpg"> <source src="'.BASE.'images/cms-bg.mp4" type="video/mp4"> </video> <div id="dev_cms_cont"> // content </div> </div>'; CSS #dev_cms_vid_cont { height:500px; position:relative; } #cms_vid { position

how can i stop video from playing if not point view

筅森魡賤 提交于 2020-01-03 05:39:06
问题 js to play videos in my site but i wanna stop playing the video if not in view point i make this code $(document).on("scroll", function() { var scrollTop = $(window).scrollTop(); $( "video" ).each(function() { var pos = index.position(); if (scrollTop < pos.top + 100) { $(this)[0].play(); } if (scrollTop > pos.top + 400) { $(this)[0].stop(); } if (scrollTop < pos.top - 400) { $(this)[0].stop(); } }); }); but it not work for me and not show any error this is demo page "http://jsbin.com

video is not playing in IE8 by mediaelement.js

安稳与你 提交于 2020-01-03 05:33:12
问题 I am not able to play video in IE8 by using mediaelementjs. I am using HTML5 video tag and I want the video to be played in IE8 and below browsers. I know that IE8 doesn't support HTML5 video tag.Hence I am implementing mediaelement.js to make the video play in IE8. Can anyone tell me how to make the video play in IE8 using mediaelement.js(HTML5 video tag)? 回答1: I guess something's wrong with your <script> tag. IE takes HTML errors more seriously, if you forgot to close it / forgot type="text

how to jump to a location of video using html 5

淺唱寂寞╮ 提交于 2020-01-03 00:02:13
问题 I want to use html5 video tag to play my video. How can I set the time from which the video starts playing. for example my video is 90 seconds long i want to start playing at 30 seconds <video width="320" height="240" controls> <source src="<?php echo base_url() ?>/programs/prg1.mp4" type="video/mp4"> Your browser does not support the video tag. </video> please help me 回答1: From http://blog.grio.com/2012/08/how-to-seek-an-html5-video-at-a-specific-time-on-load.html How To Seek an HTML5 Video

Combining implementation of autobahn websockets, gstreamers and html5 mediaSource API

狂风中的少年 提交于 2020-01-02 16:24:26
问题 I am running a websocket server using autobahn|python. on the server side, I also have a gstreamer pipeline running which I am using to capture webm frames using "appsink". The gstreamer pipeline that is implemented is: gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480 ! videoconvert ! vp8enc ! webmmux ! appsink name="sink" Everytime, I receive a buffer in the appsink, I send it over a websocket as a binary "message" using sendMessage. def on_new_buffer(appsink): global once gstsample