【类 型】:test

【原  因】:video 视频组件 测试文件删除
【过  程】:
【影  响】:

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
air 2025-09-17 18:37:42 +08:00
parent 7e2842b6d7
commit 48f5d54f55

View File

@ -1,45 +0,0 @@
<template>
<div>
<video
ref="video"
autoplay
controls
playsinline
muted
width="640"
height="360"
></video>
</div>
</template>
<script>
export default {
data () {
return {
url: 'http://82.156.122.87:80/rtc/v1/whep/?app=live&stream=083AF27BB2D0',
sdk: null
}
},
mounted () {
this.startPlay()
},
methods: {
async startPlay () {
if (this.sdk) {
this.sdk.close()
this.sdk = null
}
this.sdk = new window.SrsRtcWhipWhepAsync()
this.$refs.video.srcObject = this.sdk.stream
try {
const session = await this.sdk.play(this.url)
console.log('播放成功session:', session)
} catch (e) {
console.error('播放失败', e)
}
}
}
}
</script>