Commit cbfd9ae89ca26dbaf72348ed8d5110105f3c20af
1 parent
7a962808
perf(src/packages/components/Informations): 移除自定义loading,西瓜视频默认自带的有
Showing
1 changed file
with
0 additions
and
6 deletions
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( | ... | ... |