买服务器上雨云
由超大带宽雨云提供赞助本项目对市面上主流视频播放器技术的基础整合, 旨在成为视频播放领域的“瑞士军刀”, 打造既统一又灵活的播放解决方案,满足多样化的业务场景。
仅代表自己使用后的感受, 没有数据支撑。
xgplayer-flv.js=flv.js,xgplayer-hls.js=hls.js; h264xgplayer-hls.js和xgplayer-flv.js兼容性好一些,h265自研库xgplayer-hls和xgplayer-flv兼容性好一些flv.js和webtorrent.dplayer-danmaku .dplayer-danmaku-right.dplayer-danmaku-move {
will-change: transform;
-webkit-animation-name: 'danmaku'; /* 兼容性问题,需要加上-webkit- */
animation-name: 'danmaku';
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
-webkit-animation-play-state: paused;
animation-play-state: paused;
}off取消监听扩展详见CustomDPlayer,画中画扩展详见handlePipClickunlimited: false, 否则会造成主进程阻塞, 个人测试1w条数据毕现seek方法, 会导致seek前的弹幕重叠显示, 而不是直接跳过seek前弹幕内容dp.video.currentSrc获取的不是真实地址, 需使用dp.options.video.url获取, 但是切换地址后该值不会变需要在dp.seitchVideo后手动赋值off事件全局取消timeupdate会将组件内部事件也清空, 导致Nplayer和DPlayer在使用切换下集时画面正常, 进度条渲染不变art.on('artplayerPluginDanmuku:emit', () => {art.plugins.artplayerPluginDanmuku.emit({})}), 不用在监听发送事件在发送一次不要用vue中的ref响应式代理实例否则会发现不生效, 应该用shallowRef或let一个变量解决方案1: 创建global.d.ts
declare module 'shaka-player/dist/shaka-player.compiled' {
export = shaka
}解决方案2: 补丁 - 缺点补丁和版本号要一致, 补丁可能不能及时
# 补丁链接: https://gist.github.com/Security2431/2b28f17e11870bb4b0e347673e16d5ba#comments
1. Run npm i -D patch-package.
2. Download and move the shaka-player+4.3.4.patch file to /patches/shaka-player+4.3.4.patch in the root directory.
3. Add "scripts": {"postinstall": "patch-package"} in package.json. This make patches to be applied each time people run npm install.
4. Delete node_modules folder and execute npm install.参考github
集成多播放器是一个吃力的事情, 就是文档方法搬运工。