Commit cbfd9ae89ca26dbaf72348ed8d5110105f3c20af
1 parent
7a962808
perf(src/packages/components/Informations): 移除自定义loading,西瓜视频默认自带的有
Showing
1 changed file
with
0 additions
and
6 deletions
1 | <template> | 1 | <template> |
2 | <div> | 2 | <div> |
3 | <n-spin size="medium" :show="showLoading" class="player-spin"> | 3 | <n-spin size="medium" :show="showLoading" class="player-spin"> |
4 | - <template #description> 视频正在努力加载中......</template> | ||
5 | <XGPlayer :url="sourceUrl" :stream-type="playType" | 4 | <XGPlayer :url="sourceUrl" :stream-type="playType" |
6 | :config="{width: '100%', height: '100%', poster: option.poster}" | 5 | :config="{width: '100%', height: '100%', poster: option.poster}" |
7 | :auto-play="option.autoplay"/> | 6 | :auto-play="option.autoplay"/> |
@@ -40,8 +39,6 @@ const playType = ref<StreamType>() | @@ -40,8 +39,6 @@ const playType = ref<StreamType>() | ||
40 | 39 | ||
41 | 40 | ||
42 | async function getPlaySource(params: Dataset) { | 41 | async function getPlaySource(params: Dataset) { |
43 | - try { | ||
44 | - showLoading.value = true | ||
45 | const {id, channelId, deviceId, accessMode, customUrl, playProtocol} = params | 42 | const {id, channelId, deviceId, accessMode, customUrl, playProtocol} = params |
46 | if (!accessMode) return | 43 | if (!accessMode) return |
47 | const {type, url} = await getPlayUrl({ | 44 | const {type, url} = await getPlayUrl({ |
@@ -56,9 +53,6 @@ async function getPlaySource(params: Dataset) { | @@ -56,9 +53,6 @@ async function getPlaySource(params: Dataset) { | ||
56 | } as unknown as CameraRecord) || {} | 53 | } as unknown as CameraRecord) || {} |
57 | sourceUrl.value = url! | 54 | sourceUrl.value = url! |
58 | playType.value = type | 55 | playType.value = type |
59 | - } finally { | ||
60 | - showLoading.value = false | ||
61 | - } | ||
62 | } | 56 | } |
63 | 57 | ||
64 | watch( | 58 | watch( |