提交 72f140b3 作者: 翁进城

播放器增加悬浮按钮案例

上级 04bbf2c3
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "dev": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
......
...@@ -17,7 +17,9 @@ export default ` ...@@ -17,7 +17,9 @@ export default `
:obstacleData="obstacleData" :obstacleData="obstacleData"
:isCenter="true" :isCenter="true"
:size="1" :size="1"
></MMCPlayer> >
<el-button class="test-btn">测试悬浮按钮</el-button>
</MMCPlayer>
</div> </div>
</template> </template>
...@@ -28,34 +30,29 @@ export default { ...@@ -28,34 +30,29 @@ export default {
streamOptions: [ streamOptions: [
{ {
label: "flv", label: "flv",
brand: "flv", //支持以下品牌播放器"srs|fly|liveNVR|QingLiu|webrtc", 为空则根据url判断使用liveNVR或QingLiu brand: "flv", //支持以下品牌播放器"srs|fly|liveNVR|QingLiu|webrtc", 为空则根据url判断使用liveNVR或QingLiu
url: url: "https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv",
"https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv",
}, },
{ {
label: "liveNVR", label: "liveNVR",
brand: 'liveNVR', brand: "liveNVR",
url: url: "http://pull.mmcuav.cn/live/1680771689946.m3u8",
"http://pull.mmcuav.cn/live/1680771689946.m3u8", //只有liveNVR支持fpvUrl
fpvUrl: //只有liveNVR支持fpvUrl fpvUrl: "webrtc://live.mmcuav.cn/hls/shouguang01",
"webrtc://live.mmcuav.cn/hls/shouguang01",
}, },
{ {
label: "srs", label: "srs",
brand: 'srs', brand: "srs",
url: url: "webrtc://live.mmcuav.cn/hls/shouguang01",
"webrtc://live.mmcuav.cn/hls/shouguang01",
}, },
{ {
label: "QingLiu", label: "QingLiu",
url: url: "pzsp://pzlink999bju.powzamedia.com:7788/live/ld/trans/test/mlinkm/channel1?ndselect=2&linkmode=8&fstusrd=1&us=1&wsinfo=pzlink999bju.powzamedia.com-13000&only-video=1&rct=500",
"pzsp://pzlink999bju.powzamedia.com:7788/live/ld/trans/test/mlinkm/channel1?ndselect=2&linkmode=8&fstusrd=1&us=1&wsinfo=pzlink999bju.powzamedia.com-13000&only-video=1&rct=500",
}, },
{ {
label: "WebRtc", label: "WebRtc",
brand: 'webrtc', brand: "webrtc",
url: url: "webrtc://live.mmcuav.cn/hls/shouguang01",
"webrtc://live.mmcuav.cn/hls/shouguang01",
}, },
], ],
obstacleData: null, obstacleData: null,
...@@ -87,5 +84,10 @@ export default { ...@@ -87,5 +84,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.test-btn {
position: absolute;
top: 50%;
left: 50%;
}
</style> </style>
`; `;
\ No newline at end of file
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
:obstacleData="obstacleData" :obstacleData="obstacleData"
:isCenter="true" :isCenter="true"
:size="1" :size="1"
></MMCPlayer> >
<el-button class="test-btn">测试悬浮按钮</el-button>
</MMCPlayer>
</div> </div>
</template> </template>
...@@ -18,34 +20,29 @@ export default { ...@@ -18,34 +20,29 @@ export default {
streamOptions: [ streamOptions: [
{ {
label: "flv", label: "flv",
brand: "flv", //支持以下品牌播放器"srs|fly|liveNVR|QingLiu|webrtc", 为空则根据url判断使用liveNVR或QingLiu brand: "flv", //支持以下品牌播放器"srs|fly|liveNVR|QingLiu|webrtc", 为空则根据url判断使用liveNVR或QingLiu
url: url: "https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv",
"https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv",
}, },
{ {
label: "liveNVR", label: "liveNVR",
brand: 'liveNVR', brand: "liveNVR",
url: url: "http://pull.mmcuav.cn/live/1680771689946.m3u8",
"http://pull.mmcuav.cn/live/1680771689946.m3u8", //只有liveNVR支持fpvUrl
fpvUrl: //只有liveNVR支持fpvUrl fpvUrl: "webrtc://live.mmcuav.cn/hls/shouguang01",
"webrtc://live.mmcuav.cn/hls/shouguang01",
}, },
{ {
label: "srs", label: "srs",
brand: 'srs', brand: "srs",
url: url: "webrtc://live.mmcuav.cn/hls/shouguang01",
"webrtc://live.mmcuav.cn/hls/shouguang01",
}, },
{ {
label: "QingLiu", label: "QingLiu",
url: url: "pzsp://pzlink999bju.powzamedia.com:7788/live/ld/trans/test/mlinkm/channel1?ndselect=2&linkmode=8&fstusrd=1&us=1&wsinfo=pzlink999bju.powzamedia.com-13000&only-video=1&rct=500",
"pzsp://pzlink999bju.powzamedia.com:7788/live/ld/trans/test/mlinkm/channel1?ndselect=2&linkmode=8&fstusrd=1&us=1&wsinfo=pzlink999bju.powzamedia.com-13000&only-video=1&rct=500",
}, },
{ {
label: "WebRtc", label: "WebRtc",
brand: 'webrtc', brand: "webrtc",
url: url: "webrtc://live.mmcuav.cn/hls/shouguang01",
"webrtc://live.mmcuav.cn/hls/shouguang01",
}, },
], ],
obstacleData: null, obstacleData: null,
...@@ -77,4 +74,9 @@ export default { ...@@ -77,4 +74,9 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.test-btn {
position: absolute;
top: 50%;
left: 50%;
}
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论