|
|
@ -139,7 +139,13 @@ async function openLive(stream) { |
|
|
try { |
|
|
try { |
|
|
const result = await request.post(urls.LIVE_SESSIONS(stream.dockId)) |
|
|
const result = await request.post(urls.LIVE_SESSIONS(stream.dockId)) |
|
|
if (result?.session?.phase === 'streaming') { |
|
|
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') |
|
|
if (play?.playUrl && !play.playUrl.startsWith('fake://')) window.open(play.playUrl, '_blank') |
|
|
else ui.toast('控制面已验证,当前未配置可播放媒体流') |
|
|
else ui.toast('控制面已验证,当前未配置可播放媒体流') |
|
|
} else { |
|
|
} else { |
|
|
|