Commit 8cd504845be506e2c3d2ae0119f39a9c3d9e5efa

Authored by xp.Huang
2 parents 7a962808 cbfd9ae8

Merge branch 'perf/camera' into 'main_dev'

perf(src/packages/components/Informations):  移除自定义的loading,西瓜视频默认自带的有

See merge request yunteng/thingskit-view!225
1 1 <template>
2 2 <div>
3 3 <n-spin size="medium" :show="showLoading" class="player-spin">
4   - <template #description> 视频正在努力加载中......</template>
5 4 <XGPlayer :url="sourceUrl" :stream-type="playType"
6 5 :config="{width: '100%', height: '100%', poster: option.poster}"
7 6 :auto-play="option.autoplay"/>
... ... @@ -40,8 +39,6 @@ const playType = ref<StreamType>()
40 39
41 40
42 41 async function getPlaySource(params: Dataset) {
43   - try {
44   - showLoading.value = true
45 42 const {id, channelId, deviceId, accessMode, customUrl, playProtocol} = params
46 43 if (!accessMode) return
47 44 const {type, url} = await getPlayUrl({
... ... @@ -56,9 +53,6 @@ async function getPlaySource(params: Dataset) {
56 53 } as unknown as CameraRecord) || {}
57 54 sourceUrl.value = url!
58 55 playType.value = type
59   - } finally {
60   - showLoading.value = false
61   - }
62 56 }
63 57
64 58 watch(
... ...