Compare commits

...

3 Commits

Author SHA1 Message Date
ihzero 88422c7fcd 打败哦 2023-12-31 10:25:29 +08:00
ihzero 4fd5a06167 打包 2023-12-31 10:23:23 +08:00
ihzero 0dbf8623f0 添加iframe监控 2023-12-31 10:20:42 +08:00
6 changed files with 212 additions and 205 deletions

View File

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title></title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="https://lcny.sk797.cn/h5/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="https://lcny.sk797.cn/h5/static/js/chunk-vendors.959091ef.js"></script><script src="https://lcny.sk797.cn/h5/static/js/index.da3e7cd2.js"></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel="stylesheet" href="https://lcny.sk797.cn/h5/static/index.97465e7b.css"></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div><script src="https://lcny.sk797.cn/h5/static/js/chunk-vendors.959091ef.js"></script><script src="https://lcny.sk797.cn/h5/static/js/index.edb605c0.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,9 @@
<template>
<view class="h-full w-full">
<div ref="muiPlayer"></div>
<iframe class="w-full h-full" v-if="type=='iframe'" :src="url"></iframe>
<div ref="muiPlayer" v-else>
</div>
</view>
</template>
<script>
@ -23,73 +26,77 @@ export default {
},
methods: {
videoPlayer() {
let parse = {}
if (this.type == 'm3u8') {
parse = {
type: 'hls',
loader: Hls,
config: {
debug: false,
},
}
if (this.type == 'iframe') {
console.log("=====");
} else {
parse = {
type: 'flv',
loader: Flv,
config: {
debug: false,
},
let parse = {}
if (this.type == 'm3u8') {
parse = {
type: 'hls',
loader: Hls,
config: {
debug: false,
},
}
} else {
parse = {
type: 'flv',
loader: Flv,
config: {
debug: false,
},
}
}
}
this.mp = new MuiPlayer({
container: this.$refs.muiPlayer,
live: true,
src: this.url,
autoplay: true,
muted: true,
parse: parse,
pageHead: false,
width: '100%',
height: '100%',
autoFit:false,
objectFit: 'contain',
videoAttribute: [
{
attrKey: 'webkit-playsinline',
attrValue: 'webkit-playsinline',
},
{
attrKey: 'playsinline',
attrValue: 'playsinline',
},
{
attrKey: 'x5-video-player-type',
attrValue: 'h5-page',
},
],
custom: {
footerControls: [
this.mp = new MuiPlayer({
container: this.$refs.muiPlayer,
live: true,
src: this.url,
autoplay: true,
muted: true,
parse: parse,
pageHead: false,
width: '100%',
height: '100%',
autoFit: false,
objectFit: 'contain',
videoAttribute: [
{
style: {},
attrKey: 'webkit-playsinline',
attrValue: 'webkit-playsinline',
},
{
attrKey: 'playsinline',
attrValue: 'playsinline',
},
{
attrKey: 'x5-video-player-type',
attrValue: 'h5-page',
},
],
},
})
let _video = this.mp.video()
this.$nextTick(() => {
this.mp.on('ready', (event) => {
_video.play()
_video.addEventListener('play', (e) => {
//
this.$emit('onPlayFn')
})
_video.addEventListener('ended', (e) => {
//
this.$emit('onEndedFn')
custom: {
footerControls: [
{
style: {},
},
],
},
})
let _video = this.mp.video()
this.$nextTick(() => {
this.mp.on('ready', (event) => {
_video.play()
_video.addEventListener('play', (e) => {
//
this.$emit('onPlayFn')
})
_video.addEventListener('ended', (e) => {
//
this.$emit('onEndedFn')
})
})
})
})
}
},
},
}

View File

@ -1,5 +1,5 @@
<template>
<view>
<view class="h-full w-full">
<LiveVideo
v-if="address"
:key="address"