修复ios视频无法播放的bug
This commit is contained in:
parent
c12e93afa1
commit
90cb3619f5
|
@ -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 //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||
},
|
||||
"screenOrientation" : [
|
||||
"portrait-primary",
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"id": "__UNI__C509A32",
|
||||
"name": "养殖溯源",
|
||||
"version": {
|
||||
"name": "1.0.2",
|
||||
"code": 102
|
||||
"name": "1.0.3",
|
||||
"code": 103
|
||||
},
|
||||
"description": "",
|
||||
"developer": {
|
||||
|
|
Loading…
Reference in New Issue