|
@@ -11,7 +11,8 @@ function getPosition(other, canllback) {
|
|
try {
|
|
try {
|
|
var actionIndex = null;
|
|
var actionIndex = null;
|
|
const strings = require('../strings');
|
|
const strings = require('../strings');
|
|
- var channelData = getCurrentPages()[0].getChannelData();
|
|
|
|
|
|
+ var pages = getCurrentPages();
|
|
|
|
+ var channelData = pages[0].getChannelData();
|
|
if (!strings.isEmpty(channelData)) {
|
|
if (!strings.isEmpty(channelData)) {
|
|
channelData.map((v, index) => {
|
|
channelData.map((v, index) => {
|
|
if (v.channelNum === other.channel) {
|
|
if (v.channelNum === other.channel) {
|
|
@@ -32,7 +33,8 @@ function getDeviceInfo(payloads) {
|
|
///连上就调用2次 payloads.SrcDeviceName:AIrSMArT_7cdfa1fcbb24
|
|
///连上就调用2次 payloads.SrcDeviceName:AIrSMArT_7cdfa1fcbb24
|
|
const strings = require('../strings');
|
|
const strings = require('../strings');
|
|
const lexin_util = require('../lexin/util');
|
|
const lexin_util = require('../lexin/util');
|
|
- var deviceList = getCurrentPages()[0].getDeviceList();
|
|
|
|
|
|
+ var pages = getCurrentPages();
|
|
|
|
+ var deviceList = pages[0].getDeviceList();
|
|
if (!strings.isEmpty(deviceList)) {
|
|
if (!strings.isEmpty(deviceList)) {
|
|
var currentDeviceId = "";
|
|
var currentDeviceId = "";
|
|
/// 获取需要连接的那个设备,获取设备名称
|
|
/// 获取需要连接的那个设备,获取设备名称
|
|
@@ -62,7 +64,7 @@ function getDeviceInfo(payloads) {
|
|
var device = deviceList[i];
|
|
var device = deviceList[i];
|
|
var deviceId = device.deviceId;
|
|
var deviceId = device.deviceId;
|
|
if (deviceId == currentDeviceId) {
|
|
if (deviceId == currentDeviceId) {
|
|
- getCurrentPages()[0].refreshCurrentDevice(device);
|
|
|
|
|
|
+ pages[0].refreshCurrentDevice(device);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -89,10 +91,11 @@ function getBattery(battery) {
|
|
return b;
|
|
return b;
|
|
};
|
|
};
|
|
|
|
|
|
-///播放和播放状态
|
|
|
|
|
|
+///播放和播放状态 PlayState: ///播放状态:0默认状态,1播放状态,2暂停状态, 3停止状态,4缓冲状态。
|
|
function getPlay() {
|
|
function getPlay() {
|
|
- var deviceList = getCurrentPages()[0].getDeviceList();
|
|
|
|
- var deviceListSelect = getCurrentPages()[0].getDeviceListSelect();
|
|
|
|
|
|
+ var pages = getCurrentPages();
|
|
|
|
+ var deviceList = pages[0].getDeviceList();
|
|
|
|
+ var deviceListSelect = pages[0].getDeviceListSelect();
|
|
if (deviceListSelect === null || deviceList.length <= deviceListSelect) {
|
|
if (deviceListSelect === null || deviceList.length <= deviceListSelect) {
|
|
return;
|
|
return;
|
|
};
|
|
};
|