html5-video

How to disable seeking with HTML5 video tag ?

為{幸葍}努か 提交于 2019-11-30 05:04:29
问题 I know this is not advisable. But still need this feature to be implemented. Tried everything from onseeking,onseeked to media controller. Nothing worked. Are there any external libraries to disable seeking. would be helpful if some pointers on how to go about using custom controls. 回答1: The question is quite old but still relevant so here is my solution: var video = document.getElementById('video'); var supposedCurrentTime = 0; video.addEventListener('timeupdate', function() { if (!video

Exiting Fullscreen With The HTML5 Video Tag

柔情痞子 提交于 2019-11-30 04:14:01
I'm trying to get the video to exit fullscreen at the end of the video but it won't. I searched and found ways to do this but for the life of me I can't get it to work. I'm testing in the latest version of Chrome (15) and iOS 5 on the iPad2. Here's the code I'm using: <html> <head> <script src="http://code.jquery.com/jquery-2.1.3.min.js"></script> <script> $(document).ready(function(){ $("#myVideoTag").on('ended', function(){ webkitExitFullScreen(); }); }); </script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>854x480</title> </head> <body> <video width="854"

FFMPEG converted mp4 file does not play in firefox and chrome

♀尐吖头ヾ 提交于 2019-11-30 04:13:42
I have used FFMPEG command to convert flv video file to mp4 and use html5 video tag and play video in browser. But after the video is converted to mp4 using ffmpeg it does not play in firefox and chrome browser. It displays a error saying 'No video with supported format and MIME type found'. I have added the code below, Please help. cmd /C ffmpeg -i INPUT_FILE_PATH -y -ar 22050 -ab 512 -b 800k -f mp4 -s 514*362 OUTPUT_FILE.mp4" LoneSpawn This is what you need. I recently found myself fighting the same problem. Add this to your command: -pix_fmt yuv420p If you don't specify the pix_fmt it

Detect if client allows inline media playback for HTML5 video

本秂侑毒 提交于 2019-11-30 03:43:42
Is there a good way to detect if a client browser allows inline media playback for HTML5 video? Update I am not trying to simply detect video support. I am trying to detect if a video can only play fullscreen or also inline. Because on the iPhone safari iOS videos only play in fullscreen, but on iPad videos may be played inline. And by inline I mean in the page without switching to fullscreen. In iOS10 you can now have a video play inline if the playsinline attribute is added to the video tag. You can detect this with ('playsInline' in document.createElement('video')) . However this isn't

Controls overlay for video on iPhone/iPad

旧街凉风 提交于 2019-11-30 03:41:05
问题 I am writing a webapp where I need to display a video and some (non standard) controls for it, which should appear in overlay. So create some divs and position them over the video, with a higher z-index. Still, on iPhone and iPad, it appears those controls are not clickable. I register actions for the click event, but that is not fired at all when I tap on the controls. I understand I can have no control while the video is actually playing (it even goes fullscreen), but the problem is that

use video as background for div

大兔子大兔子 提交于 2019-11-30 03:09:33
I would like to use a video as background in CSS3. I know that there is no background-video property, but is it possible to do this behavior. Using a fullsize video-tag doesn't give the wanted result, cause there is content that need to be displayed over the video. It need to be non JS. If it is not possible then I need to do changes on my serverside an give as result also a screenshot of the video. I need the video to replace the colored boxes: The colored boxes are atm just, CSS boxes. Why not fix a <video> and use z-index:-1 to put it behind all other elements? html, body { width:100%;

Toggling Closed Caption in HTML5 video and disabling default video controls

不羁岁月 提交于 2019-11-30 03:02:56
问题 I have two problems. As soon as I put the track tag within my video element the video's default controller shows up. I have custom controls so it's quite the problem. Second. I can't find a way to toggle closed caption on an off. HTML: <video id="trailers" poster="images/poster/poster.jpg"> <source src="media/vLast.mp4" type="video/mp4"> <source src="media/vLast.webm" type="video/webm"> <track id="mytrack" label="English Subtitles" src="subtitles.vtt" srclang="en" default /> </video> <button

Installing a TURN Server on Ubuntu for WebRTC

China☆狼群 提交于 2019-11-30 00:52:01
How can I install a TURN server on my ubuntu 12.04? Can you share tutorial? I read this tutorial: Implementing our own STUN/TURN server for WebRTC Application . But what I don't understand is how I can I install my own TURN server on my ubuntu 12.04? I am using currently using something like the following code to create the RTCPeerConnection const pc_config = {"iceServers": [{"url": "stun:stun.l.google.com:19302"}, {"url":"turn:my_username@<turn_server_ip_address>", "credential":"my_password"}]}; const pc_new = new webkitRTCPeerConnection(pc_config); And I want to fill the above code's

DIY: Video Streaming Server

旧街凉风 提交于 2019-11-30 00:49:46
I'm looking for any modern resources for setting up a video streaming server. Preferably open source solutions. My searching on this has lead to a lot of dead ends. I also do need to build my own instead of paying for a service. Mike F To setup your own video streaming server you should get started with the following components: A linux distribution you are familiar with A free and open source server solution such as NaviServer FFMpeg (see the streaming guide ) Reeoncode certain files / streams into desired resolutions/codecs etc. Prepare streams for correct restreaming VLC (see their wiki )

How to check a user watched the full video in html5 video player

旧街凉风 提交于 2019-11-30 00:43:56
Does anyone knows how I can check if a video was completely watched or not? I am using html5 video players: <video width="480" height="400" controls="true" poster=""> <source type="video/mp4" src="video.mp4"></source> </video> Basic check is simple, wait for the ended event. This is so simple you can just google it. Now to check that user played full video an extensive analysis would be needed checking if he played every second of it. That's not necessary however, it should be enough that user: played as many seconds as the video is long played to the end of the video This snippet demonstrates