|
|
@@ -73,7 +73,12 @@
|
|
|
v-else
|
|
|
:ref="(el) => setPlayerRef(el, i - 1)"
|
|
|
:videourl="videoUrl[i - 1]"
|
|
|
- :playerInfo="playInfoRes"
|
|
|
+ :playerInfo="
|
|
|
+ playerInfo.filter(
|
|
|
+ (item) =>
|
|
|
+ videoUrl[i - 1]?.includes(item.id) && videoUrl[i - 1]?.includes(item.deviceId)
|
|
|
+ )[0] || undefined
|
|
|
+ "
|
|
|
fluent
|
|
|
autoplay
|
|
|
@screenshot="shot"
|
|
|
@@ -329,9 +334,9 @@ const sendDevicePush = (itemData, targetIndex = null) => {
|
|
|
.then((response) => {
|
|
|
let res = response
|
|
|
if (window.location.protocol === 'http:') {
|
|
|
- itemData.playUrl = res.ws_flv
|
|
|
+ itemData.playUrl = res.playurl
|
|
|
} else {
|
|
|
- itemData.playUrl = res.wss_flv
|
|
|
+ itemData.playUrl = playurl
|
|
|
}
|
|
|
itemData.streamId = res.streamId
|
|
|
setPlayUrl(itemData.playUrl, playIndex) // 播放URL设置到指定位置
|
|
|
@@ -348,13 +353,20 @@ const setPlayUrl = (url, idx) => {
|
|
|
newVideoUrls[idx] = url
|
|
|
videoUrl.value = newVideoUrls
|
|
|
|
|
|
- playerInfo.value.forEach((item) => {
|
|
|
- if (videoUrl.value[0].includes(item.id) && videoUrl.value[0].includes(item.deviceId)) {
|
|
|
- playInfoRes.value = item
|
|
|
- }
|
|
|
- })
|
|
|
+ // playerInfo.value.forEach((item) => {
|
|
|
+ // if (videoUrl.value[0].includes(item.id) && videoUrl.value[0].includes(item.deviceId)) {
|
|
|
+ // playInfoRes.value = item
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+
|
|
|
+ // console.log('hhhhhhhhhhhhhhhhhhhhhhh', videoUrl.value)
|
|
|
|
|
|
- console.log('hhhhhhhhhhhhhhhhhhhhhhh', videoUrl.value)
|
|
|
+ // console.log(
|
|
|
+ // 'xxxxxxxxxxxxxxxxxxxxx',
|
|
|
+ // playerInfo.filter(
|
|
|
+ // (item) => videoUrl[0].includes(item.id) && videoUrl[0].includes(item.deviceId)
|
|
|
+ // )
|
|
|
+ // )
|
|
|
|
|
|
setTimeout(() => {
|
|
|
window.localStorage.setItem('videoUrl', JSON.stringify(videoUrl.value))
|