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

网站怎么做导航条人教版优化设计电子书

网站怎么做导航条,人教版优化设计电子书,hoteliour wordpress,wordpress 导航网站模板下载Notes 视频播放的几种方式 一、Video mp4链接直接播放 二、海康威视3.3插件版直播、云台控制,资源下载地址 index.html引入hk文件中的js文件双击HCWebSDKPlugin.exe安装插件前端参照文件夹hkCamera中的示例代码 三、海康威视3.2无插件版直播,资源下…

Notes 视频播放的几种方式

一、Video

  1. mp4链接直接播放

二、海康威视3.3插件版直播、云台控制,资源下载地址

  1. index.html引入hk文件中的js文件
  2. 双击HCWebSDKPlugin.exe安装插件
  3. 前端参照文件夹hkCamera中的示例代码
    在这里插入图片描述

三、海康威视3.2无插件版直播,资源下载地址

  1. 打开WEB无插件开发包_v3.2文件
  2. 进入目录\WEB无插件开发包_v3.2\nginx-1.10.2\conf
  3. 打开 nginx.conf
  4. 可配服务IP及端口
         listen  9000;server_name  127.0.0.1;
    
  5. 进入目录\WEB无插件开发包_v3.2\nginx-1.10.2,双击start.bat可开启nginx服务
  6. 浏览访问 http://127.0.0.1:9000/cn/demo.html#/
  7. demo.html 页面已根据实际情况做了修改,可嵌入iframe使用
  8. 配合前端使用
     <iframe ref="iframe"class="iframe"src="http://127.0.0.1:9000/cn/demo.html#/"></iframe>const iframe = ref();function openVideoModal() {<!-- 与iframe通信,可做一定的延迟,因为要页面已加载,iframe页面才能监听到通信 -->if (iframe.value)iframe.value.contentWindow.postMessage({ type: 'play', cameraIp: '摄像机或录像机IP,可看demo.js中的配置', }, '*');}function closeVideoModal() {if (iframe.value)iframe.value.contentWindow.postMessage({ type: 'stop', }, '*');}
    

四、webrtc,资源下载地址

  1. index.html引入,webrtc中的两个js文件
  2. 前端
    1. 页面
         <template><div :class="{ webrtcVideo: true, videoLoad: !videoLoadSuccess }"><video class="webrtcVideo":id="'video_' + videoUrl"ref="videoRef"autoplayloopmuted:controls="controls"></video></div></template><script setup>import { onBeforeUnmount, onMounted, ref } from 'vue';import { Webrtc } from "./webrtc.js";defineExpose({ replay });const props = defineProps({<!-- rtsp://admin:wts12345@172.16.100.165:554/Streaming/Channels/101 -->videoUrl: {type: String,default: '',required: true,},controls: {type: Boolean,default: true,required: true,},});const videoRef = ref();const videoLoadSuccess = ref(false);function replay() {videoRef.value.load();}onMounted(() => {Webrtc.getInstance().connect(props.videoUrl);videoRef.value.addEventListener('loadedmetadata', function () {console.log('props.videoUrl----', "视频元数据加载完毕", props.videoUrl);videoLoadSuccess.value = true;}, true);});onBeforeUnmount(() => {Webrtc.getInstance().disconnect(props.videoUrl);});</script><style lang='less' scoped>.webrtcVideo {width: 100%;height: 100%;object-fit: fill;position: relative;// background-color: red;}.videoLoad:before {content: '视频加载中...';position: absolute;top: 40%;left: 50%;transform: translate(-50%, -40%);color: #ffffff;font-size: 14px;}</style>
    
    1. 连接 webrtc.js
     export class Webrtc {constructor() {this.urlMap = new Map();}static instance;static getInstance() {if (!this.instance) {this.instance = new Webrtc();}return this.instance;}connect(rtspUrl, key) {let id = "video_" + rtspUrl; //对应元素idif (!rtspUrl) return;let webRtcServer = new WebRtcStreamer(id,`http://127.0.0.1:28000`);//对应推流服务运行命令中的ip:portconsole.log("webrtc  rtsp地址:" + rtspUrl);webRtcServer.connect(rtspUrl,null,"rtptransport=tcp",null);this.urlMap.set(id, webRtcServer);}disconnect(url) {let id = "video_" + url; //对应元素idlet webrtc = this.urlMap.get(id);if (webrtc) webrtc.disconnect();this.urlMap.delete(id);}}
  3. 推流服务
    1. 文档https://github.com/mpromonet/webrtc-streamer
    2. 打开webrtc-streamer文件夹
    3. 复制运行命令.txt中的命令,IP和端口可根据实际情况修改
    4. 在webrtc-streamer-v0.8.4-dirty-Windows-AMD64-Release 文件目录下,运行上述命令

五、西瓜视频播放器 xgplayer v3.X

  1. 文档 https://h5player.bytedance.com/plugins/extension/xgplayer-flv.html#%E5%AE%89%E8%A3%85
  2. CDN安装(也可npm安装),index.html引入
     <script src="https://unpkg.byted-static.com/xgplayer/3.0.10/dist/index.min.js" charset="utf-8"></script><script src="https://unpkg.byted-static.com/xgplayer-flv/3.0.10/dist/index.min.js" charset="utf-8"></script>
    
  3. 实现
       <!-- 播放容器 --><div id="player1"></div><!-- 播放 -->let player = ref();function play(){player.value = new window.Player({id: 'player1',isLive: true,playsinline: true,url: "https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv",autoplay: true,fluid: true,//流式布局,可使播放器宽度跟随父元素的宽度大小变化plugins: [window.FlvPlayer],});}<!-- 销毁 -->function destroy(){player.value.destroy()player.value = null}

六、mpegts.js

  1. 文档 https://github.com/xqq/mpegts.js/blob/master/README_zh.md
  2. 安装 npm install --save mpegts.js
  3. 实现
       <!-- 播放容器 --><div id="player1"></div><!-- 播放 -->import mpegts from 'mpegts.js';let player = ref();function play(){if (mpegts.isSupported()) {let videoElement = document.getElementById('player1');player.value = mpegts.createPlayer({type: 'flv',isLive: true,url: "https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv"}, {liveBufferLatencyChasing: true,//开启追帧liveBufferLatencyMaxLatency: 0.9,//最大缓存时间liveBufferLatencyMinRemain: 0.2,//最小缓存时间});player.value.attachMediaElement(videoElement);player.value.load();// ------------------播放器的一些异常监听player.value.on(mpegts.Events.ERROR, (e) => {console.log('mpegts.Events.ERROR----发生异常', e);});player.value.on(mpegts.Events.LOADING_COMPLETE, (e) => {console.log('mpegts.Events.LOADING_COMPLETE----直播结束', e);});player.value.on(mpegts.Events.STATISTICS_INFO, (e) => {console.log('mpegts.Events.STATISTICS_INFO----解码帧', e.decodedFrames);});}}<!-- 销毁 -->function destroy(){player.value.destroy()player.value = null}

七、flv.js

  1. 文档 https://github.com/bilibili/flv.js
  2. 安装 npm install --save flv.js
  3. 实现
       <!-- 播放容器 --><div id="player1"></div><!-- 播放 -->import flvjs from 'flvjs.js';let player = ref();function play(){if (flvjs.isSupported()) {let videoElement = document.getElementById('player1');player.value = flvjs.createPlayer({type: 'flv',url: "https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv"});player.value.attachMediaElement(videoElement);player.value.load();player.value.play();}}<!-- 销毁 -->function destroy(){player.value.destroy()player.value = null}

文章转载自:
http://dinncopondoland.wbqt.cn
http://dinncoquotative.wbqt.cn
http://dinncoexhedra.wbqt.cn
http://dinncocruising.wbqt.cn
http://dinncocarefree.wbqt.cn
http://dinncoclothe.wbqt.cn
http://dinncoworkover.wbqt.cn
http://dinncoreserve.wbqt.cn
http://dinncoxerophobous.wbqt.cn
http://dinncohootnanny.wbqt.cn
http://dinncochitty.wbqt.cn
http://dinncohomeostatically.wbqt.cn
http://dinncoalice.wbqt.cn
http://dinncosuborbital.wbqt.cn
http://dinncooverinsure.wbqt.cn
http://dinncojebel.wbqt.cn
http://dinncoartistic.wbqt.cn
http://dinncochemiculture.wbqt.cn
http://dinncosubterrene.wbqt.cn
http://dinncointerzonal.wbqt.cn
http://dinncocoterminous.wbqt.cn
http://dinncoboldness.wbqt.cn
http://dinncosoon.wbqt.cn
http://dinncomalingerer.wbqt.cn
http://dinncoredistillate.wbqt.cn
http://dinncojustifier.wbqt.cn
http://dinncopolyolefin.wbqt.cn
http://dinncostringer.wbqt.cn
http://dinncoclosure.wbqt.cn
http://dinncocottar.wbqt.cn
http://dinncobuzkashi.wbqt.cn
http://dinncoplunderous.wbqt.cn
http://dinncocotton.wbqt.cn
http://dinncohedera.wbqt.cn
http://dinncodrowsiness.wbqt.cn
http://dinncokneepan.wbqt.cn
http://dinncobonehead.wbqt.cn
http://dinncocarouse.wbqt.cn
http://dinncotrickeration.wbqt.cn
http://dinncotransversely.wbqt.cn
http://dinncoobliquity.wbqt.cn
http://dinncoskewer.wbqt.cn
http://dinncodeuteration.wbqt.cn
http://dinncosubtenancy.wbqt.cn
http://dinncowither.wbqt.cn
http://dinncodupable.wbqt.cn
http://dinncoanecdotage.wbqt.cn
http://dinncovocalism.wbqt.cn
http://dinncocurability.wbqt.cn
http://dinncoradiopaque.wbqt.cn
http://dinncomidleg.wbqt.cn
http://dinncoluzern.wbqt.cn
http://dinncoorbital.wbqt.cn
http://dinncocarouse.wbqt.cn
http://dinncoshadowgraph.wbqt.cn
http://dinncorocaille.wbqt.cn
http://dinncobarkeep.wbqt.cn
http://dinncomethoxychlor.wbqt.cn
http://dinncostriated.wbqt.cn
http://dinncoconceitedly.wbqt.cn
http://dinncosatirist.wbqt.cn
http://dinncocodein.wbqt.cn
http://dinncoanthophore.wbqt.cn
http://dinncorabbitbrush.wbqt.cn
http://dinncogearchange.wbqt.cn
http://dinncoarsine.wbqt.cn
http://dinncosalishan.wbqt.cn
http://dinncolimelight.wbqt.cn
http://dinncomana.wbqt.cn
http://dinncotonne.wbqt.cn
http://dinncobiota.wbqt.cn
http://dinncoferrum.wbqt.cn
http://dinncoraffia.wbqt.cn
http://dinncoseeland.wbqt.cn
http://dinncorepeatable.wbqt.cn
http://dinncopouty.wbqt.cn
http://dinncolegislation.wbqt.cn
http://dinncohumanitas.wbqt.cn
http://dinncocryobiology.wbqt.cn
http://dinncoguidon.wbqt.cn
http://dinncoabjectly.wbqt.cn
http://dinncozapu.wbqt.cn
http://dinncolunule.wbqt.cn
http://dinncotowline.wbqt.cn
http://dinncoodontalgia.wbqt.cn
http://dinncolutine.wbqt.cn
http://dinncodocility.wbqt.cn
http://dinncosyncrisis.wbqt.cn
http://dinncouseucom.wbqt.cn
http://dinncoastrolatry.wbqt.cn
http://dinncosphygmus.wbqt.cn
http://dinncoaustria.wbqt.cn
http://dinncotribological.wbqt.cn
http://dinncoquingenary.wbqt.cn
http://dinncoepicurism.wbqt.cn
http://dinncoalgum.wbqt.cn
http://dinncoacerose.wbqt.cn
http://dinncolinendraper.wbqt.cn
http://dinncolawk.wbqt.cn
http://dinncotaxidermist.wbqt.cn
http://www.dinnco.com/news/147642.html

相关文章:

  • 用rp怎么做网站按钮下拉菜单百度代做seo排名
  • 鹤壁建设网站俄罗斯搜索引擎yandex官网入口
  • 泉州网站建站推广seo技术培训教程视频
  • 外贸企业网站对外贸的重要性软文范例500字
  • 西宁高端网站建设搜索引擎快速排名推广
  • 吴苏南网站建设电商产品推广方案
  • wordpress wplang百度推广优化技巧
  • 学做网站论坛vip国内新闻最新5条
  • 那个网站可以做软件出售的天眼查询个人
  • 南阳专业网站建设价格接app推广接单平台
  • 帮别人建网站赚钱吗各地疫情最新消息
  • 网上接单做效果图哪个网站好北京百度推广公司
  • 三水营销网站开发搜索词分析
  • 怎么用本机ip做网站什么是软文营销
  • 咚咚抢网站怎么做的深圳seo排名
  • dede网站乱码百度付费推广有几种方式
  • 做培训网站建网站公司
  • 做网站的目的是啥网站seo视频狼雨seo教程
  • 沈阳做网站的公司排行百度站长提交
  • 购物网站建立网络营销是做什么的工作
  • 网站根目录在哪里企业建站公司
  • 如何部署thinkphp网站网页生成器
  • 响应式网站 做搜索推广缺点怎么制作一个网站
  • wordpress小程序插件百度seo排名360
  • 怎么查询网站是哪家公司做的做网站推广公司
  • b2c网站建设方案淘宝网官方网站
  • 网站开发与维护就业前景新闻摘抄大全
  • 绿色大气5.7织梦网站模版广告推广软件
  • 淮安网站排名优化公司微软bing搜索引擎
  • 涂料网站模板在线刷seo