diff --git a/src/api/live.js b/src/api/live.js index 28cbe10..f6311bc 100644 --- a/src/api/live.js +++ b/src/api/live.js @@ -4,8 +4,10 @@ export function joinLive(dockId, payload = {}) { return request.post(`/v1/live/${dockId}/sessions`, payload) } -export function getLivePlayURL(dockId) { - return request.get(`/v1/live/${dockId}/play-url`) +export function getLivePlayURL(dockId, sessionId) { + return request.get(`/v1/live/${dockId}/play-url`, { + params: { streamSessionId: sessionId } + }) } export function heartbeatLive(dockId, sessionId) { diff --git a/src/composables/useMonitorLive.js b/src/composables/useMonitorLive.js index 108cb3a..6b5098f 100644 --- a/src/composables/useMonitorLive.js +++ b/src/composables/useMonitorLive.js @@ -46,8 +46,8 @@ export function useMonitorLive({ getDockId, ui, getLivePlayer }) { } async function refreshPlayURL() { - if (!live.dockId) return - const play = await getLivePlayURL(live.dockId) + if (!live.dockId || !live.session?.id) return + const play = await getLivePlayURL(live.dockId, live.session.id) live.playUrl = play.playUrl || '' }