refactor(liveRoom): 恢复处理播放器错误的逻辑
- 移除了之前注释掉的 showConfirmDialog 调用 - 保留了错误处理的基本逻辑结构 - 优化了代码格式,去除了多余的注释
This commit is contained in:
parent
3d98a1b9d7
commit
890d4436d9
@ -23,14 +23,13 @@ const player = ref(null)
|
||||
const {quoteStatus, show, playerId, show1, auctionData, getSocketData, getLiveLink, fullLive} = liveStore()
|
||||
const pullLink = ref('')
|
||||
const handlePlayerError = (error) => {
|
||||
// showConfirmDialog({
|
||||
// message: t('live_room.error_mess'),
|
||||
// showCancelButton: true
|
||||
// }).then(() => {
|
||||
// initializePlayer()
|
||||
// }).catch(() => {
|
||||
// })
|
||||
// player.value?.play()
|
||||
showConfirmDialog({
|
||||
message: t('live_room.error_mess'),
|
||||
showCancelButton: true
|
||||
}).then(() => {
|
||||
initializePlayer()
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
const loading1=ref(false)
|
||||
const initializePlayer = async () => {
|
||||
@ -87,13 +86,13 @@ const initializePlayer = async () => {
|
||||
})
|
||||
player.value.on('error', handlePlayerError)
|
||||
} catch (error) {
|
||||
// showConfirmDialog({
|
||||
// message: t('live_room.error_mess'),
|
||||
// showCancelButton: true
|
||||
// }).then(() => {
|
||||
// initializePlayer()
|
||||
// }).catch(() => {
|
||||
// })
|
||||
showConfirmDialog({
|
||||
message: t('live_room.error_mess'),
|
||||
showCancelButton: true
|
||||
}).then(() => {
|
||||
initializePlayer()
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user