修复ios视频无法播放的bug

This commit is contained in:
weipengfei 2024-03-04 13:48:13 +08:00
parent c12e93afa1
commit 90cb3619f5
3 changed files with 22 additions and 12 deletions

View File

@ -2,16 +2,16 @@
"name" : "养殖溯源",
"appid" : "__UNI__C509A32",
"description" : "",
"versionName" : "1.0.2",
"versionCode" : 102,
"versionName" : "1.0.3",
"versionCode" : 103,
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"compatible":{
"ignoreVersion": true //trueHBuilderX1.9.0
"compatible" : {
"ignoreVersion" : true //trueHBuilderX1.9.0
},
"screenOrientation" : [
"portrait-primary",

View File

@ -35,20 +35,30 @@
onLoad(option) {
this.deviceId = option.device
this.videoUrl = option.url
this.videoUrl = this.replaceLastThreeChars(this.videoUrl, "mp4");
this.subNvue = uni.getSubNVueById('subNvueIos'); //获取
let datas = {
username: option.user,
device: 'lihai_lot_walnutpi_dev_' + option.device,
scene: 'app',
}
this.openScoket(datas)
// let datas = {
// username: option.user,
// device: 'lihai_lot_walnutpi_dev_' + option.device,
// scene: 'app',
// }
// this.openScoket(datas)
let platform = uni.getSystemInfoSync()
this.videoHeight = platform.windowHeight
this.videoWidth = platform.windowWidth
this.videoOffset = platform.screenHeight - platform.windowHeight + platform.statusBarHeight
this.shwovideo = true
},
methods: {
replaceLastThreeChars(str, replacement) {
if (str.length < 3) {
return replacement + str;
} else {
return str.slice(0, -3) + replacement;
}
},
openScoket(datas) {
let that = this
this.SocketTask = uni.connectSocket({

View File

@ -7,8 +7,8 @@
"id": "__UNI__C509A32",
"name": "养殖溯源",
"version": {
"name": "1.0.2",
"code": 102
"name": "1.0.3",
"code": 103
},
"description": "",
"developer": {