🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

miniprogram-ar-push

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

miniprogram-ar-push - npm Package Compare versions

Comparing version
1.0.11
to
1.0.12
+17
-25
miniprogram_dev/components/index.js

@@ -95,4 +95,3 @@ module.exports =

// components/pusher.js
var _windowWidth = wx.getSystemInfoSync().windowWidth;
// const _windowWidth = wx.getSystemInfoSync().windowWidth;

@@ -104,10 +103,2 @@ Component({

properties: {
width: { // 组件显示区域的宽度
type: Number,
value: _windowWidth
},
height: { // 组件显示区域的高度
type: Number,
value: 0
},
pubID: {

@@ -152,3 +143,2 @@ type: String,

var that = this;
// console.log('onPush', e);
if (!that.data.pusherContext) {

@@ -181,4 +171,4 @@ that.data.pusherContext = wx.createLivePusherContext('rtcpusher');

this.triggerEvent('PushStatus', {
code: e.details.errCode,
msg: e.details.errMsg
code: e.detail.errCode,
msg: e.detail.errMsg
});

@@ -202,19 +192,11 @@ },

// console.log('================= onWebRTCUserListPush method', msg);
if (!msg) {
return;
}
if (!msg) return;
var jsonDic = JSON.parse(msg);
if (!jsonDic) {
return;
}
if (!jsonDic) return;
// console.log("onWebRTCUserListPush.jsonDict:", jsonDic);
var newUserList = jsonDic.userlist;
// console.log('=== newUserList: ', JSON.stringify(newUserList));
if (!newUserList) {
return;
}
if (!newUserList) return;

@@ -294,4 +276,14 @@ var userList = that.data.userList;

that.data.pusherContext || (that.data.pusherContext = wx.createLivePusherContext("rtcpusher")), that.data.pusherContext && that.data.pusherContext.switchCamera({});
},
//截图
snapshot: function snapshot(cb) {
var that = this;
that.data.pusherContext || (that.data.pusherContext = wx.createLivePusherContext("rtcpusher")), that.data.pusherContext && that.data.pusherContext.snapshot({
complete: function complete(res) {
cb(res);
}
});
}
}

@@ -298,0 +290,0 @@ });

@@ -95,4 +95,3 @@ module.exports =

// components/pusher.js
var _windowWidth = wx.getSystemInfoSync().windowWidth;
// const _windowWidth = wx.getSystemInfoSync().windowWidth;

@@ -104,10 +103,2 @@ Component({

properties: {
width: { // 组件显示区域的宽度
type: Number,
value: _windowWidth
},
height: { // 组件显示区域的高度
type: Number,
value: 0
},
pubID: {

@@ -152,3 +143,2 @@ type: String,

var that = this;
// console.log('onPush', e);
if (!that.data.pusherContext) {

@@ -181,4 +171,4 @@ that.data.pusherContext = wx.createLivePusherContext('rtcpusher');

this.triggerEvent('PushStatus', {
code: e.details.errCode,
msg: e.details.errMsg
code: e.detail.errCode,
msg: e.detail.errMsg
});

@@ -202,19 +192,11 @@ },

// console.log('================= onWebRTCUserListPush method', msg);
if (!msg) {
return;
}
if (!msg) return;
var jsonDic = JSON.parse(msg);
if (!jsonDic) {
return;
}
if (!jsonDic) return;
// console.log("onWebRTCUserListPush.jsonDict:", jsonDic);
var newUserList = jsonDic.userlist;
// console.log('=== newUserList: ', JSON.stringify(newUserList));
if (!newUserList) {
return;
}
if (!newUserList) return;

@@ -294,4 +276,14 @@ var userList = that.data.userList;

that.data.pusherContext || (that.data.pusherContext = wx.createLivePusherContext("rtcpusher")), that.data.pusherContext && that.data.pusherContext.switchCamera({});
},
//截图
snapshot: function snapshot(cb) {
var that = this;
that.data.pusherContext || (that.data.pusherContext = wx.createLivePusherContext("rtcpusher")), that.data.pusherContext && that.data.pusherContext.snapshot({
complete: function complete(res) {
cb(res);
}
});
}
}

@@ -298,0 +290,0 @@ });

{
"name": "miniprogram-ar-push",
"version": "1.0.11",
"version": "1.0.12",
"description": "",

@@ -5,0 +5,0 @@ "main": "miniprogram_dist/index.js",