<template>
<view>
<live-player src="http://192.168.0.193/hls/13825002825/index.m3u8" id="livePlayer" autoplay
@statechange="statechange" @error="error" style="width: 300px; height: 225px;"></live-player>
</view>
</template>
<script>
export default {
data() {
return {}
},
methods: {
statechange(e) {
console.log('live-player code:', e.detail.code)
},
error(e) {
console.error('live-player error:', e.detail.errMsg)
}
}
}
</script>
<style>
</style>
1 个回复
w***@163.com
解决了吗?