修复ios视频无法播放的bug
This commit is contained in:
parent
c12e93afa1
commit
90cb3619f5
|
@ -2,16 +2,16 @@
|
||||||
"name" : "养殖溯源",
|
"name" : "养殖溯源",
|
||||||
"appid" : "__UNI__C509A32",
|
"appid" : "__UNI__C509A32",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.2",
|
"versionName" : "1.0.3",
|
||||||
"versionCode" : 102,
|
"versionCode" : 103,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
"compatible":{
|
"compatible" : {
|
||||||
"ignoreVersion": true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
"ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
|
||||||
},
|
},
|
||||||
"screenOrientation" : [
|
"screenOrientation" : [
|
||||||
"portrait-primary",
|
"portrait-primary",
|
||||||
|
|
|
@ -35,20 +35,30 @@
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.deviceId = option.device
|
this.deviceId = option.device
|
||||||
this.videoUrl = option.url
|
this.videoUrl = option.url
|
||||||
|
this.videoUrl = this.replaceLastThreeChars(this.videoUrl, "mp4");
|
||||||
this.subNvue = uni.getSubNVueById('subNvueIos'); //获取
|
this.subNvue = uni.getSubNVueById('subNvueIos'); //获取
|
||||||
let datas = {
|
// let datas = {
|
||||||
username: option.user,
|
// username: option.user,
|
||||||
device: 'lihai_lot_walnutpi_dev_' + option.device,
|
// device: 'lihai_lot_walnutpi_dev_' + option.device,
|
||||||
scene: 'app',
|
// scene: 'app',
|
||||||
}
|
// }
|
||||||
this.openScoket(datas)
|
// this.openScoket(datas)
|
||||||
let platform = uni.getSystemInfoSync()
|
let platform = uni.getSystemInfoSync()
|
||||||
this.videoHeight = platform.windowHeight
|
this.videoHeight = platform.windowHeight
|
||||||
this.videoWidth = platform.windowWidth
|
this.videoWidth = platform.windowWidth
|
||||||
this.videoOffset = platform.screenHeight - platform.windowHeight + platform.statusBarHeight
|
this.videoOffset = platform.screenHeight - platform.windowHeight + platform.statusBarHeight
|
||||||
|
|
||||||
|
this.shwovideo = true
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
replaceLastThreeChars(str, replacement) {
|
||||||
|
if (str.length < 3) {
|
||||||
|
return replacement + str;
|
||||||
|
} else {
|
||||||
|
return str.slice(0, -3) + replacement;
|
||||||
|
}
|
||||||
|
},
|
||||||
openScoket(datas) {
|
openScoket(datas) {
|
||||||
let that = this
|
let that = this
|
||||||
this.SocketTask = uni.connectSocket({
|
this.SocketTask = uni.connectSocket({
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
"id": "__UNI__C509A32",
|
"id": "__UNI__C509A32",
|
||||||
"name": "养殖溯源",
|
"name": "养殖溯源",
|
||||||
"version": {
|
"version": {
|
||||||
"name": "1.0.2",
|
"name": "1.0.3",
|
||||||
"code": 102
|
"code": 103
|
||||||
},
|
},
|
||||||
"description": "",
|
"description": "",
|
||||||
"developer": {
|
"developer": {
|
||||||
|
|
Loading…
Reference in New Issue