Compare commits
No commits in common. "0dbf8623f07a78ad99a83280d5c2f85a2fbb03fa" and "fd74e0e696491ca736da61f94e0ab92d4f41765f" have entirely different histories.
0dbf8623f0
...
fd74e0e696
|
|
@ -1,9 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="h-full w-full">
|
<view class="h-full w-full">
|
||||||
<iframe class="w-full h-full" v-if="type=='iframe'" :src="url"></iframe>
|
<div ref="muiPlayer"></div>
|
||||||
<div ref="muiPlayer" v-else>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -26,77 +23,73 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
videoPlayer() {
|
videoPlayer() {
|
||||||
if (this.type == 'iframe') {
|
let parse = {}
|
||||||
console.log("=====");
|
if (this.type == 'm3u8') {
|
||||||
} else {
|
parse = {
|
||||||
let parse = {}
|
type: 'hls',
|
||||||
if (this.type == 'm3u8') {
|
loader: Hls,
|
||||||
parse = {
|
config: {
|
||||||
type: 'hls',
|
debug: false,
|
||||||
loader: Hls,
|
},
|
||||||
config: {
|
|
||||||
debug: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
parse = {
|
|
||||||
type: 'flv',
|
|
||||||
loader: Flv,
|
|
||||||
config: {
|
|
||||||
debug: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.mp = new MuiPlayer({
|
} else {
|
||||||
container: this.$refs.muiPlayer,
|
parse = {
|
||||||
live: true,
|
type: 'flv',
|
||||||
src: this.url,
|
loader: Flv,
|
||||||
autoplay: true,
|
config: {
|
||||||
muted: true,
|
debug: false,
|
||||||
parse: parse,
|
},
|
||||||
pageHead: false,
|
}
|
||||||
width: '100%',
|
}
|
||||||
height: '100%',
|
this.mp = new MuiPlayer({
|
||||||
autoFit: false,
|
container: this.$refs.muiPlayer,
|
||||||
objectFit: 'contain',
|
live: true,
|
||||||
videoAttribute: [
|
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: [
|
||||||
{
|
{
|
||||||
attrKey: 'webkit-playsinline',
|
style: {},
|
||||||
attrValue: 'webkit-playsinline',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
attrKey: 'playsinline',
|
|
||||||
attrValue: 'playsinline',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
attrKey: 'x5-video-player-type',
|
|
||||||
attrValue: 'h5-page',
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
custom: {
|
},
|
||||||
footerControls: [
|
})
|
||||||
{
|
let _video = this.mp.video()
|
||||||
style: {},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
})
|
|
||||||
let _video = this.mp.video()
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.mp.on('ready', (event) => {
|
this.mp.on('ready', (event) => {
|
||||||
_video.play()
|
_video.play()
|
||||||
_video.addEventListener('play', (e) => {
|
_video.addEventListener('play', (e) => {
|
||||||
//播放事件
|
//播放事件
|
||||||
this.$emit('onPlayFn')
|
this.$emit('onPlayFn')
|
||||||
})
|
})
|
||||||
_video.addEventListener('ended', (e) => {
|
_video.addEventListener('ended', (e) => {
|
||||||
//播放完成事件
|
//播放完成事件
|
||||||
this.$emit('onEndedFn')
|
this.$emit('onEndedFn')
|
||||||
})
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="h-full w-full">
|
<view>
|
||||||
<LiveVideo
|
<LiveVideo
|
||||||
v-if="address"
|
v-if="address"
|
||||||
:key="address"
|
:key="address"
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'industry',
|
field: 'type',
|
||||||
label: '农业类型',
|
label: '农业类型',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: ({ formActionType }) => {
|
componentProps: ({ formActionType }) => {
|
||||||
|
|
@ -197,7 +197,7 @@ export default {
|
||||||
return data.data
|
return data.data
|
||||||
},
|
},
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'key',
|
valueField: 'id',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'industry',
|
field: 'type',
|
||||||
label: '农业类型',
|
label: '农业类型',
|
||||||
component: 'ApiSelect',
|
component: 'ApiSelect',
|
||||||
componentProps: ({ formActionType }) => {
|
componentProps: ({ formActionType }) => {
|
||||||
|
|
@ -169,7 +169,7 @@ export default {
|
||||||
return data.data
|
return data.data
|
||||||
},
|
},
|
||||||
labelField: 'name',
|
labelField: 'name',
|
||||||
valueField: 'key',
|
valueField: 'id',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -178,15 +178,15 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
options() {
|
options() {
|
||||||
return [].filter((e) => checkPermission(e.permission))
|
return [
|
||||||
|
|
||||||
|
].filter((e) => checkPermission(e.permission))
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSubmit(e) {
|
handleSubmit(e) {
|
||||||
this.filterParmas = e
|
this.filterParmas = e
|
||||||
this.$nextTick(() => {
|
this.mescroll.resetUpScroll()
|
||||||
this.mescroll.resetUpScroll()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
upCallback({ num, size }) {
|
upCallback({ num, size }) {
|
||||||
this.getData({
|
this.getData({
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="content-box">
|
<view class="content-box">
|
||||||
<view class="video_ul" v-show="current == 0">
|
<view class="video_ul" v-show="current == 0">
|
||||||
<view class="video_li" v-for="(video, index) in videoList" :key="index+'s'">
|
<view class="video_li" v-for="(video, index) in videoList" :key="video.video_url+index">
|
||||||
<view class="video_cd">
|
<view class="video_cd">
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
<!-- {{ video.video_url }} -->
|
<!-- {{ video.video_url }} -->
|
||||||
|
|
@ -165,7 +165,7 @@
|
||||||
<view
|
<view
|
||||||
class="video_li"
|
class="video_li"
|
||||||
v-for="(video, index) in videoList2"
|
v-for="(video, index) in videoList2"
|
||||||
:key="index+'s2'"
|
:key="video.video_url+index"
|
||||||
>
|
>
|
||||||
<view class="video_cd">
|
<view class="video_cd">
|
||||||
<!-- #ifdef H5 -->
|
<!-- #ifdef H5 -->
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue