video.js

How to create customs button in video js

倾然丶 夕夏残阳落幕 提交于 2020-01-01 03:27:41
问题 I want to create custom button in video js i have tried so many things and search alot when i am applying i found no result i think i have some mistake in my code. i have setup my player on video js successfully. This my code which i am trying to add custom button. <script> $(document).ready(function(){ var player = videojs('video1'); var myButton = player.controlBar.addChild('button', { text: "Press me", // other options }); myButton.addClass("html-classname"); }); </script> and i also tried

MP4 in Video.js not playing until fully loaded

孤街浪徒 提交于 2019-12-31 22:36:14
问题 I'm using Video.js to play back videos in MP4 format on a client's website. The player uses html5 video and Adobe Flash Player as a fallback. (In my case it seems to use Flash always so I don't know if the problem exists in the native html5 player as well.) The video only starts playing after the *.mp4 file is completely loaded. So no buffer for a few seconds. The file must be completely downloaded by the browser before it starts playing. When the video is long, the visitor has to wait very

HTML5 video element request stay pending forever (on chrome)

笑着哭i 提交于 2019-12-27 16:59:10
问题 I have a weird issue in Chrome. Each time I load a <video> element, chrome will start two HTTP request. The first one will stay pending forever (I guess this is the "meta-data", "partial content" request. But the point is that it stay pending) The second one to the same file is ok and goes on and close after the loading is over. The problem here is that the first request stay pending until I close the browser page. So at some point, if I load multiple video, Chrome will break and stop

如何实现网页播放rtmp流媒体

不问归期 提交于 2019-12-26 17:46:12
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 最近公司有个需求,要对公司食堂的监控视频进行轻量改造,去除以前对海康插件的依赖,让手机也能顺畅地播放,于是乎在网上搜刮了相关资料,大多数文章都提到了对rtsp进行转码处理后,再通过网页的形式播放支持的流媒体,但大多博主充分发挥了“拿来主义”,却并未进行验证,导致我们在按部就班的时候没法实现我们需要的,在经过了不断地试错之后,现总结出以下的流程,也希望大家能少走弯路。 监控直播采用了FFMPEG转码->Nginx提供rtmp/hls服务->videojs网页解码播放的整体思路。 1.首先需要安装nginx以及对应的nginx的rtmp模块nginx-rtmp-module-master。 我们采用的是源码安装,参考自 https://blog.csdn.net/liuchen1206/article/details/77771703 ,感谢渔村居士的脚本和软件。下载好该博文提供的脚本软件(可以从这里下载:http://download.csdn.net/download/liuchen1206/10167705),直接解压后执行脚本就可以实现ngnix以及相关组件的安装。软件包括:nginx,nginx-http-flv-module-master,nginx-rtmp-module-master,openssl

Unable to find plugin: videoJsResolutionSwitcher in angular2-universal

老子叫甜甜 提交于 2019-12-25 08:35:47
问题 In the first implementation, I used angular2 without server rendering for creating a web player with video.js library and it's "videojs-resolution-switcher" plugin. I created a directive for initializing videojs element based on component ngOnInitView and load js files directly in base html file (end of body). Everything was correct and player worked as expected. Then I started to setting up angular2-universal and server rendering. There was some problems about using browser specific features

Video.js full-screen in IE and Edge browser

我们两清 提交于 2019-12-25 05:03:51
问题 I am using http://videojs.com/ . I am seeing full screen mode fail with a black screen on IE and Edge (works in Chrome and Firefox). This also occurs on the demo page at http://videojs.com/. Try making one of the videos full-screen in IE or Edge. On Win 10, here, the video appears to be playing, but there is no picture. I am looking for a solution or workaround. Does it fail for you? Under what conditions does this fail/succeed? 回答1: This appears to be related to this - https://answers

Video.js can't jump to time while clicking on seekbar

两盒软妹~` 提交于 2019-12-25 04:27:11
问题 I wrote a example, Video example Please use Chrome and view source code, you can see video1 and video2 can click on seek bar to jump to any time, but if you click video3 button, you will find seek bar can't be used to jump to specific time. Please advise how can I enable time jump on Chrome? And why video 3 is disabled of time jump? 回答1: Your server needs to support partial content requests for seeking to work in Chrome. See e.g. this answer. 来源: https://stackoverflow.com/questions/21949925

HTML5 video with video.js not working in Safari

不想你离开。 提交于 2019-12-24 13:54:02
问题 I have a private website that hosts training videos using the HTML5 video tag and the video.js plugin. It was working in Chrome/Firefox/Safari up until last Spring, but now the videos no longer work in Safari. They work fine in Chrome and Firefox. I upgraded to the latest video.js v4.12 and v5 but that has not helped. You can view the broken code on this test page. http://dev.investja.org/videojs_problem2.html When you open the page and click on the video it works fine in Chrome and Firefox

VideoJS progress event always 0 on Safari 5.1

会有一股神秘感。 提交于 2019-12-24 12:17:06
问题 I'm having this weird behaviour on Safari 5.1, while playing a video with VideoJS: if I listen to the progress event: var player = videojs('player_id', { preload: 'auto' techOrder: [ 'html5' ] }); player.on( 'progress', on_progress ); player.ready( function() { player.play() } ); I will only get value 0 in the callback: function on_progress( event ) { console.log( 'buffered', player.bufferedPercent() ); // it will log always 0 } Notes: I can use only html5 player I'm using mp4/h264 videos

videojs: Download/stream video in chunks with quality selecton

有些话、适合烂在心里 提交于 2019-12-24 11:06:53
问题 I want to create a video streaming website, like youtube and I've been stuck on 2 requirements which I'm not sure if videojs solves or not. Say there's a 1-hour video, I want the video to be downloaded and streamed in chunks, and not the whole file. I've seen that streaming format like HLS and DASH, solves that (looking on the network tab of chrome, I see chunks downloaded as the video plays). But on the other hand, I think it prevents my 2nd requirement. Different quality selection. I was