video.js

Change the video playback speed using video.js

僤鯓⒐⒋嵵緔 提交于 2021-02-16 06:35:51
问题 Is there any existing plugin to change the playback rate of a video using the video.js player? If not, how can I add the new plugin and the new control button for the same? Thanks in advance. 回答1: I've the same issue. I just found that: videojs('my-player', { playbackRates: [0.5, 1, 1.5, 2] }); see videojs docs 回答2: From videojs v.4.6.0 on there is a JSON parameter for data-setup that you can pass to add the playback speed option to the videoplayer: <video id="my_video_1" class="video-js vjs

Change the video playback speed using video.js

我与影子孤独终老i 提交于 2021-02-16 06:34:09
问题 Is there any existing plugin to change the playback rate of a video using the video.js player? If not, how can I add the new plugin and the new control button for the same? Thanks in advance. 回答1: I've the same issue. I just found that: videojs('my-player', { playbackRates: [0.5, 1, 1.5, 2] }); see videojs docs 回答2: From videojs v.4.6.0 on there is a JSON parameter for data-setup that you can pass to add the playback speed option to the videoplayer: <video id="my_video_1" class="video-js vjs

video.js 视频自动全屏播放

我怕爱的太早我们不能终老 提交于 2021-02-14 14:11:16
一 . 视频全屏可以通过css定义宽高100%来实现。 .videoBox{ width: 100 % ; height: 100 % ; } #example_video{ width: 100 % ; height: 100 % ; } <div class = " videoBox " > <video id= " example_video " class = " video-js vjs-default-skin vjs-big-play-centered " muted autoplay controls preload= " none " width= " 640 " height= " 264 " poster = " http://video-js.zencoder.com/oceans-clip.png " data-setup= " {} " >   <source src= " https://wts.itqiche.com/u5/car_u5_video/XuHang.mp4 " type= ' video/mp4 ' /> </video> </div> 二. 视频打开页面自动播放。 1. 给video标签加入<video muted></video> 静音即可。 2. body下面加入js代码。 <script type= " text

Properly containing draggable markers on videojs player

孤者浪人 提交于 2021-02-08 09:12:21
问题 I am working with javascript and videojs and am relatively new to front end development. I'm currently working on a project where I want to allow the user to specify points in a video through the use of draggable markers on the videojs seekbar. I found the videojs marker library from: https://github.com/spchuang/videojs-markers and have made a simple modification in their createMarkers() function to create a draggable marker instead of a permanent marker. function createMarkers(){ // create

Properly containing draggable markers on videojs player

戏子无情 提交于 2021-02-08 09:11:04
问题 I am working with javascript and videojs and am relatively new to front end development. I'm currently working on a project where I want to allow the user to specify points in a video through the use of draggable markers on the videojs seekbar. I found the videojs marker library from: https://github.com/spchuang/videojs-markers and have made a simple modification in their createMarkers() function to create a draggable marker instead of a permanent marker. function createMarkers(){ // create

Stream AWS S3 HLS Videos in iOS Browsers

会有一股神秘感。 提交于 2021-02-02 09:29:59
问题 How can I stream HLS(.m3u8) in iOS Safari Browsers? My videos are stored in AWS S3 Bucket and the only way to access the video and audio .m3u8 is to pass a signed URL. I am using videojs to stream videos. videojs.Hls.xhr.beforeRequest is not working on iOS browsers. I also read that MSE is not supported in iOS, is there any alternative I can use to pass a signed URL to be able to stream my videos on iOS browsers? Here are my sample codes and screenshot of error: videojs.Hls.xhr.beforeRequest

Stream AWS S3 HLS Videos in iOS Browsers

青春壹個敷衍的年華 提交于 2021-02-02 09:26:18
问题 How can I stream HLS(.m3u8) in iOS Safari Browsers? My videos are stored in AWS S3 Bucket and the only way to access the video and audio .m3u8 is to pass a signed URL. I am using videojs to stream videos. videojs.Hls.xhr.beforeRequest is not working on iOS browsers. I also read that MSE is not supported in iOS, is there any alternative I can use to pass a signed URL to be able to stream my videos on iOS browsers? Here are my sample codes and screenshot of error: videojs.Hls.xhr.beforeRequest

Have video Quality Controls in hls.js / Video.js for Live Streaming

♀尐吖头ヾ 提交于 2021-01-29 10:24:36
问题 Using HLS.js (() => { var video = document.getElementById('video'); console.log('VIDEO',video); if(Hls.isSupported()) { var hls = new Hls(); hls.loadSource('https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8'); hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED,function() { //https://github.com/video-dev/hls.js/blob/master/docs/API.md#quality-switch-control-api //console.log('RAHUL',hls.levels); video.play(); }); } // hls.js is not supported on platforms that do not have Media Source

How do I use logo plugin in videojs

自闭症网瘾萝莉.ら 提交于 2021-01-29 09:35:12
问题 I tried to use logo plugin in videojs but the logo doesn't show up. I know there is a problem with my way to add the plugin i need help please Here's my code <head> <link href="https://vjs.zencdn.net/7.10.2/video-js.css" rel="stylesheet" /> </head> <body> <video id="my-video" class="video-js vjs-big-play-centered" controls preload="auto" width="640" height="264" poster="MY_VIDEO_POSTER.jpg" data-setup="{}" > <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4" />

How to add event listener to videojs when start to play a video?

﹥>﹥吖頭↗ 提交于 2021-01-28 04:36:56
问题 How do I add event listener to videojs when the video is start to play? (this event should be called at the begging of the play)? I searched on Player Events docs, but I can't find any event that tell me "now the video is start play". 回答1: You can do this videojs way. play.on('play', () => { }); 回答2: I suggest checking the docs for the <video> element. You will see many events are emitted. Most importantly, play - Playback has begun. We can add an event listener to the element listening for