Browse Source

fix: send streamSessionId from Media live open

Pass session id on MediaView play-url fetch and toast when
the joined session is missing an id.
main
xiaosi 2 weeks ago
parent
commit
db896d1f06
  1. 8
      src/views/MediaView/MediaView.vue

8
src/views/MediaView/MediaView.vue

@ -139,7 +139,13 @@ async function openLive(stream) {
try {
const result = await request.post(urls.LIVE_SESSIONS(stream.dockId))
if (result?.session?.phase === 'streaming') {
const play = await request.get(urls.LIVE_PLAY_URL(stream.dockId))
if (!result.session?.id) {
ui.toast('直播会话无效')
return
}
const play = await request.get(urls.LIVE_PLAY_URL(stream.dockId), {
params: { streamSessionId: result.session.id }
})
if (play?.playUrl && !play.playUrl.startsWith('fake://')) window.open(play.playUrl, '_blank')
else ui.toast('控制面已验证,当前未配置可播放媒体流')
} else {

Loading…
Cancel
Save