video.js

How to change the position of videojs Control bar elements order

三世轮回 提交于 2020-08-05 04:31:25
问题 I am using the video.js player for my website. I want to change the position of control bar elements. Presently, it shows play/pause, volume, progress bar and full screen. How can I able to change order? I have my code below: var videojs = videojs('video-player', { techOrder: ["youtube", "html5"], preload: 'auto', controls: true, autoplay: true, fluid: true, controlBar: { CurrentTimeDisplay: true, TimeDivider: true, DurationDisplay: true }, plugins: { videoJsResolutionSwitcher: { default:

Show/Hide Videojs controls at runtime

一个人想着一个人 提交于 2020-08-04 17:44:06
问题 Is there a way to show/hide the video controls on the videojs player at runtime (e.g. player.controls.hide()). Any ideas how to do this? Thanks! 回答1: This is how I hide controls after a 1 second mouse inactivity timeout. var inactivityTimeout = null; $('#vmr_video').mousemove(function(event) { player.controlBar.fadeIn(); if (inactivityTimeout != null) { clearTimeout(inactivityTimeout); } inactivityTimeout = setTimeout(function(){ player.controlBar.fadeOut(); controlBarVisible = false; }, 1000

What is the reccomended way to use HLS and DASH + DRM in a player?

℡╲_俬逩灬. 提交于 2020-07-10 07:34:39
问题 I'm using the VideoJS player and have a CMAF video so I am using HLS and DASH. I'm also using all 3 types of DRM. Fairplay for hls, widevine and playready for dash. My question is should I include both hls and dash sources in the player and let the player decide which one to play? Or do I detect the browser and only insert the correct url based on that? Also DRM is the same. Can I just add all DRM to the player? Or should I only add the one that applies? 回答1: The use of HLS vs DASH is

VideoJS in reactJS with google IMA plugin

╄→尐↘猪︶ㄣ 提交于 2020-05-13 11:54:03
问题 We're migrating to VideoJS in ReactJS project, everything seems to work fine except for google IMA plugin. Are there any resources on how to use google-ima plugin in React? https://www.npmjs.com/package/videojs-ima-player I'm getting 'Uncaught Error: plugin "ima" does not exist' error here import React from "react"; import videojs from 'video.js' import 'videojs-ima'; class VideoJS extends React.Component { constructor(props) { super(props) console.log(this.props) } generetePlayerOptions = ()

VideoJS in reactJS with google IMA plugin

两盒软妹~` 提交于 2020-05-13 11:52:25
问题 We're migrating to VideoJS in ReactJS project, everything seems to work fine except for google IMA plugin. Are there any resources on how to use google-ima plugin in React? https://www.npmjs.com/package/videojs-ima-player I'm getting 'Uncaught Error: plugin "ima" does not exist' error here import React from "react"; import videojs from 'video.js' import 'videojs-ima'; class VideoJS extends React.Component { constructor(props) { super(props) console.log(this.props) } generetePlayerOptions = ()

Video Js loading source dynamically

荒凉一梦 提交于 2020-05-13 08:48:05
问题 Hi I have an application which has a grid and a js video player. Currently I am populating the grid with data from a SQL database, I have a function call when ever a row is clicked which calls a stored procedure and returns a url i then use that url to change the source change the source. The funny thing is with a basic html 5 video player the code i have works fine but doesn't work for Video JS My code - function changesource(url) { var video = $("#vid1"); video.src = url; document

Sending origin cookies in Cors not working with VideoJS

风流意气都作罢 提交于 2020-04-13 03:39:41
问题 I have the following subdomains: stream.example.com sub.example.com Both domains have SSL certificates and are valid. I am using videoJS 7.6.6 which has http_streaming library. On sub.example.com , there is a video tag which sets a dash manifest as source containing links to stream.example.com .VideoJS needs to include laravel cookies from sub.example.com when making a request to stream.example.com links but this is not happening and when i download the HAR result from developer console i see

Sending origin cookies in Cors not working with VideoJS

折月煮酒 提交于 2020-04-13 03:39:13
问题 I have the following subdomains: stream.example.com sub.example.com Both domains have SSL certificates and are valid. I am using videoJS 7.6.6 which has http_streaming library. On sub.example.com , there is a video tag which sets a dash manifest as source containing links to stream.example.com .VideoJS needs to include laravel cookies from sub.example.com when making a request to stream.example.com links but this is not happening and when i download the HAR result from developer console i see

web性能之资源加载时间分析【Resource Timing】【原创】

让人想犯罪 __ 提交于 2020-04-06 10:41:11
简介 在前面一章我们学习了 Web Performance Timing Api 可以用来分析web应用的资源加载、手动卡点的性能(时间),那么我们现在就来看看怎么使用 Resource Timing 来分析我们的静态资源的加载情况。 案例: 在平时开发的时候,我们常会遇到这样的问题反馈; 客户反馈 :朋友我怎么感觉我们这个应用怎么初始化加载就这么慢呢?到底是什么原因时快时慢的? 开发 :我用我的(手机|电脑)测试了没有问题啊很快啊,而且我也用谷歌调试工具看了渲染时间确实很快啊。 这个时候对于我们开发来说,我们能想到的方式就是: 先确认是否有脚本加载阻塞 确认是否有资源加载过慢(本机,自己的网络) 对于用户说的慢,其实我们自己也不知道是说的什么慢,然后就各种网上搜一波,优化一波,到底解没解决问题自己是测试不出来的(不知道有没有人跟我一样的感觉就是:开发的设备运行都没有什么问题,到了其他设备上就开始出问题了)。 其实遇到这个问题的最根本的原因是我们无法用 **数据来证明 **到底是哪里慢,什么情况慢,并且我们也无法提前预知到这些问题,总不能让客户把他的设备(手机|电脑)邮寄给你,然后你开始各种调试吧。 其实上面的这个案例牵扯很多的问题: 不知道用户当时的实际网络情况 ☆☆☆☆ 不知道我们的代码在用户的设备运行情况 ☆☆☆ (本章不讲)

vue.js中vue-video-player中的怎么插入多个视频,视频可以同时播放的问题及解决办法

纵饮孤独 提交于 2020-03-20 12:21:41
3 月,跳不动了?>>> @ TOC 多个视频解决问题 因为是从后台获取不同视频数据,要更改playerOptions里面的url,所以一个playerOptions对象没法解决,解决方法: 1. 把playerOptions对象变成空数组 2. 从后台获取到的数据放在videolist数组里,如下 3. 循环遍历videolist数组,并定义一个arrs来保存视频播放参数 4. 添加到playerOptions数组里面 5. v-for循环遍历数组,把index索引值也传出来,在video-player标签里要用 大功告成!!! 代码如下: <ul class="mui-table-view"> <li class="mui-table-view-cell mui-media" v-for="(item,index) in videolist" :key="item.id"> <div class="mui-media-body"> <p class="mui-ellipsis"> <span>标题:{{ item.title }}</span> <span>上传时间:{{ item.time }}</span> </p> </div> <h1> <video-player class="video-player vjs-custom-skin" ref="videoPlayer