当前位置: 首页 > news >正文

周大福网站设计特点海外网络是什么意思

周大福网站设计特点,海外网络是什么意思,巩义网络推广外包,wordpress变身插件公司项目需要实现摄像头实时视频播放,flv格式的视频。先百度使用flv.js插件实现,但是两个摄像头一个能放一个不能放,没有找到原因。(开始两个都能放,后端更改地址后不有一个不能放)但是在另一个系统上是可以…

公司项目需要实现摄像头实时视频播放,flv格式的视频。先百度使用flv.js插件实现,但是两个摄像头一个能放一个不能放,没有找到原因。(开始两个都能放,后端更改地址后不有一个不能放)但是在另一个系统上是可以播放的。使用的是jessibuca.js

jessibuca.js实现视频播放

1、下载jessibuca.js包

在这里插入图片描述
这三个文件需要直接放到public文件夹里,不能在添加文件夹放置。

2、创建VideoPlayer.vue文件

<template><div id="container" ref="container"></div>
</template>
<script>
export default {name: 'DemoPlayer',props: {videoUrl: {type: String,default: ''}},data() {return {jessibuca: null,version: '',wasm: false,vc: 'ff',playing: false,quieting: true,loaded: false, // muteshowOperateBtns: false,showBandwidth: false,err: '',speed: 0,performance: '',volume: 1,rotate: 0,useWCS: false,useMSE: true,useOffscreen: false,recording: false,recordType: 'webm',scale: 0}},mounted() {this.create()window.onerror = (msg) => (this.err = msg)},unmounted() {this.jessibuca.destroy()},methods: {create(options) {options = options || {}this.jessibuca = new window.Jessibuca(Object.assign({container: this.$refs.container,videoBuffer: 0.2, // Number(this.$refs.buffer.value), // 缓存时长isResize: false,useWCS: this.useWCS,useMSE: this.useMSE,text: '',// background: "bg.jpg",loadingText: '疯狂加载中...',// hasAudio:false,debug: true,supportDblclickFullscreen: true,showBandwidth: this.showBandwidth, // 显示网速operateBtns: {fullscreen: this.showOperateBtns,screenshot: this.showOperateBtns,play: this.showOperateBtns,audio: this.showOperateBtns},vod: this.vod,forceNoOffscreen: !this.useOffscreen,isNotMute: true,timeout: 10},options))var _this = thisthis.jessibuca.on('pause', function () {console.log('on pause')_this.playing = false})this.jessibuca.on('play', function () {console.log('on play')_this.playing = true})this.jessibuca.on('mute', function (msg) {console.log('on mute', msg)_this.quieting = msg})this.jessibuca.on('error', function (error) {console.log('error', error)})this.jessibuca.on('performance', function (performance) {var show = '卡顿'if (performance === 2) {show = '非常流畅'} else if (performance === 1) {show = '流畅'}_this.performance = show})this.jessibuca.on('play', () => {this.playing = truethis.loaded = truethis.quieting = this.jessibuca.isMute()})},play(videoUrl) {if (videoUrl) {this.jessibuca.play(videoUrl)} else {// this.$message.error('播放地址出错')this.destroy()}},mute() {this.jessibuca.mute()},cancelMute() {this.jessibuca.cancelMute()},pause() {this.jessibuca.pause()this.playing = falsethis.err = ''this.performance = ''},destroy() {if (this.jessibuca) {this.jessibuca.destroy()}this.create()this.playing = falsethis.loaded = falsethis.performance = ''}}
}
</script>
<style>
#container {background: rgba(13, 14, 27, 0.7);width: 100%;height: 100%;
}
</style>

3、使用组件

  1. 引入
import VideoPlayer from '@/components/VideoPlayer.vue'
  1. 使用
<VideoPlayer ref="VideoPlayer"></VideoPlayer>
  1. 播放
let url = 'http://182.150.58.94:15280/rtp/44010200492000000001_34020000001320000110.flv'
this.$refs.VideoPlayer.play(url)

效果

在这里插入图片描述

参考文档:

jessibuca-api-文档
参考官方实例 jessibuca-vue-demo

http://www.yayakq.cn/news/816404/

相关文章:

  • 网站建设费用低的公司android studio安装教程
  • 龙岩企业网站建设制作宁波专业网站公司
  • 专业网站开发哪里好360网站怎么建设
  • 在哪注册网站网站开发工具与使用平台
  • 网站建设是否需要源代码技能培训
  • 网站设计字体教育机构网站建设方案书
  • 做网站可以设账户吗汕头网站推广
  • 普通网站 用多说免费源码大全
  • 威海医院网站制作中国建设银行网站-诚聘英才
  • 网站开发用px还是rem做视频网站用哪个cms
  • 天津做网站的费用flashfxp链接网站
  • 广州微网站建设哪家好武冈网站建设多少钱
  • 贵阳双龙区建设局网站德州网站建设优化
  • 如何查找网站竞争对手的宣传方式做网站的哪里有
  • 郑州好的网站建设公司哪家好网络构建
  • 黄浦做网站公司建网站那个网最好
  • 商洛市建设工程造价管理站网站保定企业网站的建设
  • 海珠营销型网站建设公司石景山手机网站建设
  • 做网站打广告万维网官方网站
  • 河间市网站建设价格怀安网站建设
  • php 多语言网站建设源码上海做网站哪里好
  • 广州比较好的网站设计企业网站托管方式
  • 建设一个网站需要哪些费用网站建设 环保素材
  • 网站建设后台是怎么制作的游戏推广员拉人犯法吗
  • 北京做网站制作的公司百度爱采购推广怎么入驻
  • 网站的ftp上传地址网络销售的好处和意义
  • 番禺做网站设计四川住房和城乡建设部网站首页
  • 网站建设优化培训如何利用wordpress开发主题
  • 前端案例的网站开发一平方米多少钱
  • 做门户论坛与网站的区别建湖人才网临时工招聘