Commit 51df2cd7b79a2a5b0e4b030d0d48b58fdf0afe50

Authored by xp.Huang
2 parents 18ee5481 d6439f2e

Merge branch 'fix/video-stream' into 'main_dev'

fix: 修复视频列表预览rtsp播放未携带token

See merge request yunteng/thingskit-front!1495
@@ -11,7 +11,7 @@ export type VideoCancelModalParamsType = { @@ -11,7 +11,7 @@ export type VideoCancelModalParamsType = {
11 channelId?: string; 11 channelId?: string;
12 id?: string; 12 id?: string;
13 playerProps?: Recordable; 13 playerProps?: Recordable;
14 - getPlayUrl: () => Promise<Record<'url' | 'type', string>>; 14 + getPlayUrl: () => Promise<Record<'url' | 'type', string> & { withToken?: string }>;
15 }; 15 };
16 16
17 //视频通道权限标识枚举 17 //视频通道权限标识枚举
@@ -30,12 +30,13 @@ @@ -30,12 +30,13 @@
30 playUrl.value = null; 30 playUrl.value = null;
31 options.value = null; 31 options.value = null;
32 setModalProps({ loading: true, loadingTip: '视频加载中...' }); 32 setModalProps({ loading: true, loadingTip: '视频加载中...' });
33 - const { url, type } = await record.getPlayUrl(); 33 + const { url, type, withToken } = await record.getPlayUrl();
34 playUrl.value = url; 34 playUrl.value = url;
35 options.value = record; 35 options.value = record;
36 options.value.playerProps = { 36 options.value.playerProps = {
37 ...(options.value?.playerProps || {}), 37 ...(options.value?.playerProps || {}),
38 streamType: type, 38 streamType: type,
  39 + withToken: withToken,
39 }; 40 };
40 } catch (error) { 41 } catch (error) {
41 } finally { 42 } finally {