|
|
@@ -268,12 +268,12 @@ const deviceAceiveClick = (item) => {
|
|
|
};
|
|
|
|
|
|
const videoList = computed(() => useSystem.videoList);
|
|
|
-const playVideo = (deviceId: string) => {
|
|
|
+const playVideo = async (deviceId: string) => {
|
|
|
const item = screenInfo.value.find(
|
|
|
(item) => item.id === screenInfoActive.value,
|
|
|
);
|
|
|
if (item?.playerObj) {
|
|
|
- item.playerObj.destroyed();
|
|
|
+ await destroyAllVideo(item.id);
|
|
|
}
|
|
|
try {
|
|
|
item.loading = true;
|
|
|
@@ -318,7 +318,7 @@ const ballCamera = async (deviceId: string) => {
|
|
|
};
|
|
|
|
|
|
// 重置并更新
|
|
|
-const destroyAllVideo = (current?: string) => {
|
|
|
+const destroyAllVideo = async (current?: string) => {
|
|
|
if (current) {
|
|
|
screenInfo.value.forEach((item) => {
|
|
|
if (item.id === current) {
|
|
|
@@ -364,7 +364,7 @@ onMounted(() => {});
|
|
|
:key="item.key"
|
|
|
:class="[
|
|
|
'bg-blue-900 rounded hover:bg-blue-700 cursor-pointer p-3 flex justify-between items-center',
|
|
|
- currentActive == item.key ? 'bg-blue-700!' : '',
|
|
|
+ // currentActive == item.key ? 'bg-blue-700!' : '',
|
|
|
]"
|
|
|
@click="deviceAceiveClick(item)"
|
|
|
>
|
|
|
@@ -372,7 +372,7 @@ onMounted(() => {});
|
|
|
<div class="i-tabler-device-computer-camera text-20px"></div>
|
|
|
<span>{{ item.name }}</span>
|
|
|
</div>
|
|
|
- <div v-if="currentActive == item.key" class="i-ep-select"></div>
|
|
|
+ <!-- <div v-if="currentActive == item.key" class="i-ep-select"></div> -->
|
|
|
</div>
|
|
|
</n-flex>
|
|
|
</n-card>
|