@@ -319,17 +319,27 @@
},
onReady() {
// 注意:需要在onReady中 或 onLoad 延时
- this.context = uni.createLivePusherContext("livePusher", this);
- this.startPreview()
let that = this
- uni.getSystemInfo({
- success(a){
- console.log(a.windowHeight)
- that.height = a.windowHeight
- // that.start()
-
- }
- })
+ setTimeout(()=>{
+ uni.getSystemInfo({
+ success(a){
+ console.log(a.windowHeight,1212)
+ that.height = a.windowHeight
+ // that.start()
+ setTimeout(()=>{
+ that.context = uni.createLivePusherContext("livePusher", that);
+ that.startPreview()
+
+
+
+ },500)
+
+ }
+ })
+
+
+ },500)
+
},
onLoad(a){
@@ -519,6 +529,7 @@
},
statechange(e) {
console.log("statechange:" + JSON.stringify(e));
+ console.log(e)
},
netstatus(e) {
// console.log("netstatus:" + JSON.stringify(e));
@@ -527,6 +538,7 @@
console.log("error:" + JSON.stringify(e));
},
start: function() {
+ console.log("开始")
console.log(this.url)
this.context.start({
success: (a) => {