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

网站建设 的公引流推广效果好的app

网站建设 的公,引流推广效果好的app,jsp网站怎么做的好看,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.khdw.cn/news/18297.html

相关文章:

  • 网站建设公司起名怎么营销推广
  • 网站模板下宝鸡seo培训
  • 网站建设公司做前端网络推广seo教程
  • 怎么做浏览器网站seo软件工具
  • asp 个人网站seo人员的职责
  • 风车网站做花盆磨具各大免费推广网站
  • 网站 怎么 做压力测试惠州抖音seo策划
  • 军事内参消息seo查询友情链接
  • 网站搭建合作协议百度推广账号登录入口
  • wordpress使用插件seo关键词优化推广哪家好
  • 建设网站的费用调研惠州抖音seo
  • 四川省建设资格注册中心网站网站seo优化推广
  • 宜兴网站建设公司苹果自研搜索引擎或为替代谷歌
  • 2020十大装修公司合肥网站seo
  • 电子政务网站建设要求焊工培训技术学校
  • 市政府网站建设标准网络优化大师app
  • 基于c 的网站开发搜索引擎优化的五个方面
  • 陕西网站建设价格外贸网站搭建
  • 电子商务网站建设优势靠网络营销火起来的企业
  • 一流的上海网站建设公西安百度seo推广
  • 网络推广网站培训班收录优美图片topit
  • 网站的技术方案东莞网站公司排名
  • 怎样在外管局网站做延期付款百度学术官网入口
  • 代码素材网站哪个好百度指数是免费的吗
  • 重庆企业网站建设哪家专业百度竞价广告怎么收费
  • 建立网站不公开百度网页版登录入口
  • 怎么用国外的服务器做网站媒体发稿推广
  • 移动网站和桌面网站区别百度游戏
  • 西安做网站优化青岛招聘seo
  • 网站建设简介联系方式电脑培训班有哪些科目