Jessibuca 插件播放直播流视频

jessibuca官网:http://jessibuca.monibuca.com/player.html
git地址:https://gitee.com/huangz2350_admin/jessibuca#https://gitee.com/link?target=http%3A%2F%2Fjessibuca.monibuca.com%2F
项目需要的文件
在这里插入图片描述
在这里插入图片描述

1.播放组件

<template ><div id="jessibuca" style="width: auto; height: auto; position: relative" @mouseover="showbtn"><div :id="'container' + index" ref="container" :style="'position: relative;width: 100%; height:' +height +'; background:url(' +  background +') no-repeat;background-size: 100% 100%;background-color: #000;'" @dblclick="fullscreenSwich"><div :id="'buttonsBox' + index" class="buttons-box" style="position: absolute; left: 0; bottom: 0"><div class="buttons-box-left"><i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick" /><i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause" /><i class="iconfont icon-stop jessibuca-btn" @click="destroy" /><i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="jessibuca.mute()" /><i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="jessibuca.cancelMute()" /></div><div class="buttons-box-right"><span class="jessibuca-btn">{{ kBps }} kb/s</span><!--          <i class="iconfont icon-file-record1 jessibuca-btn"></i>--><!--          <i class="iconfont icon-xiangqing2 jessibuca-btn" ></i>--><i class="iconfont icon-camera1196054easyiconnet jessibuca-btn"@click="jessibuca.screenshot('截图', 'png', 0.5)" /><i class="iconfont icon-shuaxin11 jessibuca-btn" @click="playBtnClick" /><i v-if="!fullscreen" class="iconfont icon-weibiaoti10 jessibuca-btn" @click="fullscreenSwich" /><i v-if="fullscreen" class="iconfont icon-weibiaoti11 jessibuca-btn" @click="fullscreenSwich" /></div></div></div><div v-if="!playing && !autoplay" class="btn-image" :style="'height:' + height"><div class="btn-image-center" @click="playBtnClick" :style="'width:' +btnimageW +';height: ' +btnimageH +';background:url(' +btnimage +') no-repeat;background-size: 100% 100%;'"></div></div></div>
</template><script>
/* eslint-disable no-underscore-dangle */
export default {name: 'Jessibuca',props: {index: {//indextype: Number,default: 0,},videoUrl: {//播放地址type: String,default: '',},error: {//报错信息type: Function,default: null,},hasAudio: {//静音type: Boolean,default: false,},height: {//播放器高度type: String,default: '500px',},isFullResize: {//播放面即是否填充满容器type: Boolean,default: true,},autoplay: {//是否自动播放type: Boolean,default: false,},background: {//封面图type: String,default: '',},btnimage: {//播放器按钮图片type: String,default: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADUNJREFUeF7tnV+MHVUdx3/n3pVNbRFLDJhaNCG6pRAkWCUttrJYWtGAQXSlu3Nmob17Z7bFJVIUaQjtm4kv1KQktbcrone2JFYl8RlsrGLwwRhJ/MMfX4360IdiQuu6c8y5u9tdWpbemXPmN2fOfJv0bX6/3/l9fvPJ3Dn37owg/AMBEFiRgAAbEACBlQlAEJwdIPAeBCAITg8QgCA4B0AgHwFcQfJxQ1RNCECQmgwabeYjAEHycUNUTQhAkJoMGm3mIwBB8nFDVE0IQJCaDBpt5iMAQfJxQ1RNCECQmgwabeYjAEHycUNUTQhAkJoMGm3mIwBB8nFDVE0IsAkyNhZ/otlM19WEK9oskMDcXOMfJ04ce6PAEhdSFyZIEMTbhVD3CUE3KUWbiOgDHA2hRm0InBWC/qAU/VmIxgvd7g9+VUTnhQgiZfQ0ET1axIKREwRWIHA4STr7bdOxLoiU0WtENGR7ocgHAn0QeD1JOhv6OK7vQ6wKImV8mkht67s6DgQB+wROJ0nnDltprQkShnFLKTVta2HIAwJ5CSilWjMzx5/NG788zoogo6PxlmZT/c7GgpADBGwQUCrdMjMz/YppLiuCBEH7qBBi0nQxiAcBiwSOJklnn2k+K4JIGb1MRLebLgbxIGCPgHo5SY5vNc1nS5C3iGiN6WIQDwIWCbyVJB3j796MBQnDiY1KNf5isTGkAgErBAYGaONzz3X+ZpLMWBApJ4aJGqdMFoFYECiCgBBquNs9/muT3BDEhB5inSYAQZweDxZXNgEIUvYEUN9pAhDE6fFgcWUTgCBlTwD1n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6V5nmsiRI+xSRGDZdDOJBwBYBIehUt9v5vGk+K4IEQfSMEPSw6WIQDwIWCTyTJJ0p03yWBIm3C6FeNF0M4kHAFgGlxF0zM8deMs1nRRC9CCkj/e7wR00XhHgQsEDgcJJ09lvIQ9YEWZBE72YN2VgYcoBATgKvJ0lnQ87YS8KsCjIvSXyaSG2ztUDkAYEMBE4nSeeODMdf9lDrguiKYRi3lFLTl62OA0DAEgEh0olud/qHltJdSFOIIDr76Gi8pdFIx4UQnyQi/X+N7cUjX60J/IeIXiWiPymV/mRmZvqVImgUJsjFiw3DiY1K0bVFNIGc9SIgBP2r253+K0fXbIJwNIMaIGCbAASxTRT5vCIAQbwaJ5qxTQCC2CaKfF4RgCBejRPN2CYAQWwTRT6vCEAQr8aJZmwTgCC2iSKfVwQgiFfjRDO2CUAQ20SRzysCEMSrcaIZ2wQgiG2iyOcVAQji1TjRjG0CEMQ2UeTzigAE8WqcaMY2AQhimyjyeUXg/3DQ3hQovnZyAAAAAElFTkSuQmCC',},btnimageH: {//播放器按钮图片高度type: String,default: '60px',},btnimageW: {//播放器按钮图片宽度type: String,default: '60px',},},data() {return {jessibuca: null,playing: false,isNotMute: false,quieting: false,fullscreen: false,loaded: false, // mutespeed: 0,performance: '', // 工作情况kBps: 0,btnDom: null,videoInfo: null,volume: 1,rotate: 0,vod: true, // 点播forceNoOffscreen: false,}},watch: {videoUrl: {handler(newData, oldData) {if (!this.autoplay && !oldData) returnthis.play(newData)},},},mounted() {window.onerror = (msg) => {// console.error(msg)}const paramUrl = decodeURIComponent(this.$route.params.url)this.$nextTick(() => {if (typeof this.videoUrl === 'undefined') {this.videoUrl = paramUrl}this.btnDom = document.getElementById('buttonsBox' + this.index)console.log(`初始化时的地址为: ${this.videoUrl}`)this.autoplay ? this.play(this.videoUrl) : ''})},destroyed() {if (this.jessibuca) {this.jessibuca.destroy()}this.playing = false// this.loaded = falsethis.performance = ''},methods: {create() {const options = {}console.log(this.$refs.container)console.log(`hasAudio  ${this.hasAudio}`)this.jessibuca = new window.Jessibuca(Object.assign({container: this.$refs.container,videoBuffer: 0.5, // 最大缓冲时长,单位秒isResize: true,isFlv: true,decoder: '/js/jessibuca/index.js',// text: "WVP-PRO",// background: "bg.jpg",loadingText: '加载中',hasAudio:typeof this.hasAudio === 'undefined' ? true : this.hasAudio,debug: false,supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。operateBtns: {fullscreen: false,screenshot: false,play: false,audio: false,},record: 'record',isFullResize: this.isFullResize || false,vod: this.vod,forceNoOffscreen: this.forceNoOffscreen,isNotMute: this.isNotMute,},options))// eslint-disable-next-line no-underscore-dangleconst _this = thisthis.jessibuca.on('load', () => {console.log('on load init')})this.jessibuca.on('log', (msg) => {console.log('on log', msg)})this.jessibuca.on('record', (msg) => {console.log('on record:', msg)})this.jessibuca.on('pause', () => {_this.playing = false})this.jessibuca.on('play', () => {_this.playing = true})this.jessibuca.on('fullscreen', (msg) => {console.log('on fullscreen', msg)_this.fullscreen = msg})this.jessibuca.on('mute', (msg) => {console.log('on mute', msg)_this.isNotMute = !msg})this.jessibuca.on('audioInfo', (msg) => {// console.log("audioInfo", msg);})this.jessibuca.on('videoInfo', function (msg) {this.videoInfo = msg// console.log("videoInfo", msg);})this.jessibuca.on('bps', (bps) => {// console.log('bps', bps);})// eslint-disable-next-line no-unused-varslet _ts = 0this.jessibuca.on('timeUpdate', (ts) => {// console.log('timeUpdate,old,new,timestamp', _ts, ts, ts - _ts);_ts = ts})this.jessibuca.on('videoInfo', (info) => {console.log('videoInfo', info)})this.jessibuca.on('error', (error) => {console.log('error', error)})this.jessibuca.on('timeout', () => {console.log('timeout')})this.jessibuca.on('start', () => {console.log('start')})this.jessibuca.on('performance', (performance) => {let show = '卡顿'if (performance === 2) {show = '非常流畅'} else if (performance === 1) {show = '流畅'}_this.performance = show})this.jessibuca.on('buffer', (buffer) => {// console.log('buffer', buffer);})this.jessibuca.on('stats', (stats) => {// console.log('stats', stats);})this.jessibuca.on('kBps', (kBps) => {_this.kBps = Math.round(kBps)})// 显示时间戳 PTSthis.jessibuca.on('videoFrame', () => { })//this.jessibuca.on('metadata', () => { })},playBtnClick(event) {this.play(this.videoUrl)},play(url) {if (!url || url.length == 0) {this.$message.warning('当前摄像头出错,请稍后重试')this.pause()return}if (this.jessibuca) {this.destroy()}this.create()this.jessibuca.on('play', () => {this.playing = true// this.loaded = true// this.quieting = this.jessibuca.quieting})if (this.jessibuca.hasLoaded()) {this.jessibuca.play(url)} else {this.jessibuca.on('load', () => {console.log('load 播放')this.jessibuca.play(url)})}},pause() {if (this.jessibuca) {this.jessibuca.pause()}this.playing = falsethis.err = ''this.performance = ''},destroy() {if (this.jessibuca) {this.jessibuca.destroy()}if (document.getElementById('buttonsBox' + this.index) == null) {document.getElementById('container' + this.index).appendChild(this.btnDom)}this.jessibuca = nullthis.playing = falsethis.err = ''this.performance = ''},showbtn() {if (document.getElementById('buttonsBox' + this.index) == null) {document.getElementById('container' + this.index).appendChild(this.btnDom)}},eventcallbacK(type, message) {// console.log("player 事件回调")// console.log(type)// console.log(message)},fullscreenSwich() {const isFull = this.isFullscreen()this.jessibuca.setFullscreen(!isFull)this.fullscreen = !isFull},isFullscreen() {return (document.fullscreenElement ||document.msFullscreenElement ||document.mozFullScreenElement ||document.webkitFullscreenElement ||false)},},
}
</script><style>
@font-face {font-family: 'iconfont';/* Project id 1291092 */src: url('iconfont.woff2') format('woff2');
}.iconfont {font-family: 'iconfont' !important;font-size: 16px;font-style: normal;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;
}.icon-play:before {content: '\e603';
}.icon-pause:before {content: '\e6c6';
}.icon-stop:before {content: '\e6a8';
}.icon-audio-high:before {content: '\e793';
}.icon-audio-mute:before {content: '\e792';
}.icon-shuaxin11:before {content: '\e720';
}.icon-weibiaoti10:before {content: '\e78f';
}.icon-weibiaoti11:before {content: '\e790';
}.icon-camera1196054easyiconnet:before {content: '\e791';
}.buttons-box {width: 100%;height: 0px;transition: 0.4s;background-color: rgba(43, 51, 63, 0.7);display: -webkit-box;display: -ms-flexbox;display: flex;user-select: none;z-index: 100;display: flex;align-items: center;overflow: hidden;
}#jessibuca:hover .buttons-box {height: 40px;
}.buttons-box-left {display: flex;flex: 1;align-items: center;
}.jessibuca-btn {color: rgb(255, 255, 255);line-height: 27px;margin: 0px 5px;padding: 0px 2px;cursor: pointer;text-align: center;font-size: 20px !important;
}.buttons-box-right {height: 100%;position: absolute;right: 0;display: flex;flex: 1;align-items: center;font-size: 20px;
}.btn-image {width: 100%;/* height: 100%; */position: absolute;left: 0;top: 0;z-index: 99 !important;
}.btn-image-center {position: absolute;left: 0;right: 0;bottom: 0;top: 0;margin: auto;
}
</style>
.jessibuca-btn 设置播放控件的间距
decoder: '/js/jessibuca/index.js',地址是服务静态文件的相对地址src: url('iconfont.woff2') format('woff2'); 相对地址 iconfont.woff2需要和组件放在同一目录下

2.父组件引用

<template><div class="app-container"><player video-url="视频地址" :has-audio="false" height="200px" :isFullResize="false" :autoplay="true":index="getIndex" /></div>
</template>
<script>
import player from '@/components/jessibuca/index.vue' // h265播放器export default {name: 'video',components: {player,},data() {return {}},computed: {// 获取时间戳getIndex() {let time = new Date().getTime()return time},},
}
</script>

3.index.html 需要引入静态js文件

<script src="./public/js/jessibuca/index.js"></script>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/492528.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

List去重有几种方式

目录 1、for循环添加去重 2、for 双循环去重 3、for 双循环重复坐标去重 4、Set去重 5、stream流去重 1、for循环添加去重 List<String> oldList new ArrayList<>();oldList.add("张三");oldList.add("张三");oldList.add("李四&q…

垃圾分类大屏:守护绿色地球的智能助手

在当下社会&#xff0c;垃圾分类已成为我们日常生活中不可或缺的一部分。随着环保意识的逐渐增强&#xff0c;如何高效、准确地进行垃圾分类成为了摆在我们面前的重要课题。而垃圾分类管理大屏作为一种创新的管理工具&#xff0c;正逐渐走进我们的生活&#xff0c;助力我们共同…

0225 嵌入式第二十一天

接昨日内容 今天继续目录IO的学习 access&#xff1a; 功能&#xff1a;检测调用函数的程序对文件是否拥有指定权限 参数&#xff1a;pathname&#xff1a;文件路径 mode&#xff1a; R_OK 检测是否拥有读权限 W_OK 检测是否拥有写权限 X_OK 检测是否拥有执行权…

免费享受企业级安全:雷池社区版WAF,高效专业的Web安全的方案

网站安全成为了每个企业及个人不可忽视的重要议题。 随着网络攻击手段日益狡猾和复杂&#xff0c;选择一个强大的安全防护平台变得尤为关键。 推荐的雷池社区版——一个为网站提供全面安全防护解决方案的平台&#xff0c;它不仅具备高效的安全防护能力&#xff0c;还让网站安…

SCI一区 | Matlab实现ST-CNN-MATT基于S变换时频图和卷积网络融合多头自注意力机制的多特征分类预测

SCI一区 | Matlab实现ST-CNN-MATT基于S变换时频图和卷积网络融合多头自注意力机制的故障多特征分类预测 目录 SCI一区 | Matlab实现ST-CNN-MATT基于S变换时频图和卷积网络融合多头自注意力机制的故障多特征分类预测效果一览基本介绍模型描述程序设计参考资料 效果一览 基本介绍…

Order By Limit不稳定性

文章目录 前置解决不确定性场景1 Order By索引1.1 背景1.2 不确定性产生原因1.2.1 正常情况下1.2.2 但是 1.3 补充1.4 场景1总结 场景2 Order by id2.1 背景2.2 不会产生不确定性原因1原因2 2.3 推荐使用方式 场景3 filesort3.1 背景3.2 不确定性产生原因3.3 内存排序和磁盘临时…

Linux进程 ----- 信号处理

前言 从信号产生到信号保存&#xff0c;中间经历了很多&#xff0c;当操作系统准备对信号进行处理时&#xff0c;还需要判断时机是否 “合适”&#xff0c;在绝大多数情况下&#xff0c;只有在 “合适” 的时机才能处理信号&#xff0c;即调用信号的执行动作。 一、信号的处理…

Uva 101: 木块问题(The Blocks Problem)

看着算法书看到了这一题&#xff0c;想着不能只看不做&#xff0c;就想着做了一下 算法书上的描述太抽象了&#xff0c;就网上找了其他的描述 当然去看英文描述是最准确的&#xff0c;算法书上说是哪一个oj网来着&#xff1f;我给忘了 STL还是很好用的 代码如下&#xff1a; …

【C++进阶】STL容器--stack和queue深度剖析优先队列适配器原理

目录 前言 1. 容器的使用 1.1 stack 1.2 queue 2. 什么是适配器 3. stack&&queue底层实现 4. deque的简单介绍 4.1 deque的缺陷 5. priority_queue 思考 6. priority_queue的实现 前言 栈和队列在C语言中大家都有所了解&#xff0c;C语言的栈和队列都是我们手动去…

如何在本地部署密码管理软件bitwarden并结合cpolar实现远程同步

文章目录 1. 拉取Bitwarden镜像2. 运行Bitwarden镜像3. 本地访问4. 群晖安装Cpolar5. 配置公网地址6. 公网访问Bitwarden7. 固定公网地址8. 浏览器密码托管设置 Bitwarden是一个密码管理器应用程序&#xff0c;适用于在多个设备和浏览器之间同步密码。自建密码管理软件bitwarde…

WebStorm下将vue的代码缩进由2个空格改为4个空格

已经找过解决方案但设置后无效的&#xff0c;可直接看文章的最后一句。 最近刚接触vue&#xff0c;发现按tab缩进代码时缩进一直是2格而不是4格&#xff0c;检查了一下WebStorm的配置&#xff1a; File > Settings > Editor > Code Style > JavaScript的设置&…

【开源项目】数字孪生农业~经典开源项目数字孪生智慧农业大棚

飞渡科技数字孪生农业管理平台&#xff0c;是基于数字孪生、物联网IOT、远程感知等技术支撑的农业生产管理模式&#xff0c;构建的多时相、高精度农业信息获取系统与智能服务平台&#xff0c;支持农业资源环境监测与信息服务能力提升。 平台首页提供直观的农田概览&#xff0c…