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 -->
|
<!-- #ifdef APP-PLUS -->
|
||||||
<video
|
<video
|
||||||
|
:key="videoKey"
|
||||||
autoplay
|
autoplay
|
||||||
id="playerRef"
|
id="playerRef"
|
||||||
v-if="url"
|
v-if="url"
|
||||||
:muted="isMute"
|
:muted="isMute"
|
||||||
:src="urlPrefix"
|
:src="urlPrefix"
|
||||||
|
:advanced="advancedOptions"
|
||||||
object-fit="cover"
|
object-fit="cover"
|
||||||
class="w-[100vw] h-[100vh]"
|
class="w-[100vw] h-[100vh]"
|
||||||
:is-live="true"
|
:is-live="true"
|
||||||
:play-strategy="2"
|
|
||||||
:controls="false"
|
:controls="false"
|
||||||
:show-progress="false"
|
:show-progress="false"
|
||||||
:show-fullscreen-btn="false"
|
:show-fullscreen-btn="false"
|
||||||
@ -222,6 +223,25 @@
|
|||||||
const isVoice = ref(false)
|
const isVoice = ref(false)
|
||||||
const isMute = ref(false)
|
const isMute = ref(false)
|
||||||
const isVideoLoaded = 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 urlPrefix = computed(() => {
|
||||||
const data =
|
const data =
|
||||||
@ -281,13 +301,15 @@
|
|||||||
)
|
)
|
||||||
console.log('初始化SDK结果:', result)
|
console.log('初始化SDK结果:', result)
|
||||||
if (result?.code === 0) {
|
if (result?.code === 0) {
|
||||||
|
handlePlaySuccess()
|
||||||
|
setTimeout(() => {
|
||||||
url.value = result.data.url
|
url.value = result.data.url
|
||||||
runSendServiceFunction(
|
runSendServiceFunction(
|
||||||
`${deviceInfo.value.productId}/${deviceInfo.value.deviceName}`,
|
`${deviceInfo.value.productId}/${deviceInfo.value.deviceName}`,
|
||||||
'channel=0',
|
'channel=0',
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
handlePlaySuccess()
|
}, 0)
|
||||||
} else {
|
} else {
|
||||||
$basic.backAndToast(message)
|
$basic.backAndToast(message)
|
||||||
}
|
}
|
||||||
@ -317,7 +339,12 @@
|
|||||||
uni.showActionSheet({
|
uni.showActionSheet({
|
||||||
itemList: range.value.map(item => item.name),
|
itemList: range.value.map(item => item.name),
|
||||||
success: res => {
|
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> {
|
export const stopServiceFunction = async function (id: string): Promise<Result> {
|
||||||
try {
|
try {
|
||||||
await stopService(id)
|
const result = await stopService(id)
|
||||||
|
console.log('stopService', result)
|
||||||
return {
|
return {
|
||||||
code: 0,
|
code: 0,
|
||||||
data: {},
|
data: {},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user