feat: 解决ios监控画面加载不出来bug
This commit is contained in:
parent
b38e82907a
commit
026212c5b5
13
Info.plist
13
Info.plist
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
<key>NSAllowsArbitraryLoadsInWebContent</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -25,15 +25,16 @@
|
||||
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
<video
|
||||
:key="videoKey"
|
||||
autoplay
|
||||
id="playerRef"
|
||||
v-if="url"
|
||||
:muted="isMute"
|
||||
:src="urlPrefix"
|
||||
:advanced="advancedOptions"
|
||||
object-fit="cover"
|
||||
class="w-[100vw] h-[100vh]"
|
||||
:is-live="true"
|
||||
:play-strategy="2"
|
||||
:controls="false"
|
||||
:show-progress="false"
|
||||
:show-fullscreen-btn="false"
|
||||
@ -222,6 +223,25 @@
|
||||
const isVoice = ref(false)
|
||||
const isMute = ref(false)
|
||||
const isVideoLoaded = ref(false)
|
||||
const videoKey = ref(Date.now())
|
||||
|
||||
const advancedOptions = ref([
|
||||
{
|
||||
key: 'videotoolbox',
|
||||
value: 0,
|
||||
type: 'player'
|
||||
},
|
||||
{
|
||||
key: 'framedrop',
|
||||
value: 5,
|
||||
type: 'player'
|
||||
},
|
||||
{
|
||||
key: 'skip_loop_filter',
|
||||
value: 48,
|
||||
type: 'player'
|
||||
}
|
||||
])
|
||||
|
||||
const urlPrefix = computed(() => {
|
||||
const data =
|
||||
@ -281,13 +301,15 @@
|
||||
)
|
||||
console.log('初始化SDK结果:', result)
|
||||
if (result?.code === 0) {
|
||||
handlePlaySuccess()
|
||||
setTimeout(() => {
|
||||
url.value = result.data.url
|
||||
runSendServiceFunction(
|
||||
`${deviceInfo.value.productId}/${deviceInfo.value.deviceName}`,
|
||||
'channel=0',
|
||||
true
|
||||
)
|
||||
handlePlaySuccess()
|
||||
}, 0)
|
||||
} else {
|
||||
$basic.backAndToast(message)
|
||||
}
|
||||
@ -317,7 +339,12 @@
|
||||
uni.showActionSheet({
|
||||
itemList: range.value.map(item => item.name),
|
||||
success: res => {
|
||||
index.value = res.tapIndex
|
||||
const value = res.tapIndex
|
||||
if (index.value === value) {
|
||||
return
|
||||
}
|
||||
index.value = value
|
||||
videoKey.value = Date.now()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -110,7 +110,8 @@ export const startServiceFunction = async function (
|
||||
|
||||
export const stopServiceFunction = async function (id: string): Promise<Result> {
|
||||
try {
|
||||
await stopService(id)
|
||||
const result = await stopService(id)
|
||||
console.log('stopService', result)
|
||||
return {
|
||||
code: 0,
|
||||
data: {},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user