@realsee/live 0.4.0-beta.7 → 0.4.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49126,7 +49126,14 @@
|
|
|
49126
49126
|
const msg = JSON.stringify({
|
|
49127
49127
|
actionUrl,
|
|
49128
49128
|
functionName: registerGlobalValue(this.createSchemeLink(scheme), (data) => {
|
|
49129
|
-
const d =
|
|
49129
|
+
const d = (() => {
|
|
49130
|
+
try {
|
|
49131
|
+
return JSON.parse(data);
|
|
49132
|
+
}
|
|
49133
|
+
catch (e) {
|
|
49134
|
+
return data;
|
|
49135
|
+
}
|
|
49136
|
+
})();
|
|
49130
49137
|
res[0] = (() => {
|
|
49131
49138
|
if (d === 1)
|
|
49132
49139
|
return true;
|
|
@@ -49151,7 +49158,14 @@
|
|
|
49151
49158
|
return await new Promise(async (resolve) => {
|
|
49152
49159
|
const actionUrl = this.createSchemeLink(scheme);
|
|
49153
49160
|
const _callback = (data) => {
|
|
49154
|
-
const d =
|
|
49161
|
+
const d = (() => {
|
|
49162
|
+
try {
|
|
49163
|
+
return JSON.parse(data);
|
|
49164
|
+
}
|
|
49165
|
+
catch (e) {
|
|
49166
|
+
return data;
|
|
49167
|
+
}
|
|
49168
|
+
})();
|
|
49155
49169
|
const callbackParam = (() => {
|
|
49156
49170
|
if (d === 1)
|
|
49157
49171
|
return true;
|
|
@@ -49205,7 +49219,9 @@
|
|
|
49205
49219
|
const check = () => {
|
|
49206
49220
|
if (this.worker)
|
|
49207
49221
|
return resolve(true);
|
|
49208
|
-
if ($window.webkit &&
|
|
49222
|
+
if ($window.webkit &&
|
|
49223
|
+
$window.webkit.messageHandlers &&
|
|
49224
|
+
$window.webkit.messageHandlers.realsee) {
|
|
49209
49225
|
const worker = $window.webkit.messageHandlers.realsee;
|
|
49210
49226
|
worker.postMessage(JSON.stringify({
|
|
49211
49227
|
type: 'getStaticData',
|
|
@@ -49214,8 +49230,8 @@
|
|
|
49214
49230
|
this.deviceInfo = JSON.parse(data);
|
|
49215
49231
|
this.worker = worker;
|
|
49216
49232
|
return resolve(true);
|
|
49217
|
-
})
|
|
49218
|
-
})
|
|
49233
|
+
}),
|
|
49234
|
+
}),
|
|
49219
49235
|
}));
|
|
49220
49236
|
return;
|
|
49221
49237
|
}
|
|
@@ -49271,7 +49287,14 @@
|
|
|
49271
49287
|
const msg = JSON.stringify({
|
|
49272
49288
|
actionUrl,
|
|
49273
49289
|
functionName: registerGlobalValue(this.createSchemeLink(scheme), (data) => {
|
|
49274
|
-
const d =
|
|
49290
|
+
const d = (() => {
|
|
49291
|
+
try {
|
|
49292
|
+
return JSON.parse(data);
|
|
49293
|
+
}
|
|
49294
|
+
catch (e) {
|
|
49295
|
+
return data;
|
|
49296
|
+
}
|
|
49297
|
+
})();
|
|
49275
49298
|
res[0] = (() => {
|
|
49276
49299
|
if (d === 1)
|
|
49277
49300
|
return true;
|
|
@@ -49280,11 +49303,11 @@
|
|
|
49280
49303
|
return d;
|
|
49281
49304
|
})();
|
|
49282
49305
|
resolve(res);
|
|
49283
|
-
})
|
|
49306
|
+
}),
|
|
49284
49307
|
});
|
|
49285
49308
|
this.worker.postMessage(JSON.stringify({
|
|
49286
49309
|
type: 'callAndBackfeed',
|
|
49287
|
-
param: msg
|
|
49310
|
+
param: msg,
|
|
49288
49311
|
}));
|
|
49289
49312
|
});
|
|
49290
49313
|
}
|
|
@@ -49299,7 +49322,14 @@
|
|
|
49299
49322
|
return await new Promise(async (resolve) => {
|
|
49300
49323
|
const actionUrl = this.createSchemeLink(scheme);
|
|
49301
49324
|
const _callback = (data) => {
|
|
49302
|
-
const d =
|
|
49325
|
+
const d = (() => {
|
|
49326
|
+
try {
|
|
49327
|
+
return JSON.parse(data);
|
|
49328
|
+
}
|
|
49329
|
+
catch (e) {
|
|
49330
|
+
return data;
|
|
49331
|
+
}
|
|
49332
|
+
})();
|
|
49303
49333
|
const callbackParam = (() => {
|
|
49304
49334
|
if (d === 1)
|
|
49305
49335
|
return true;
|
|
@@ -49322,7 +49352,7 @@
|
|
|
49322
49352
|
};
|
|
49323
49353
|
const msg = JSON.stringify({
|
|
49324
49354
|
actionUrl,
|
|
49325
|
-
functionName: registerGlobalValue(actionUrl, _callback, false)
|
|
49355
|
+
functionName: registerGlobalValue(actionUrl, _callback, false),
|
|
49326
49356
|
});
|
|
49327
49357
|
this.worker.postMessage(JSON.stringify({
|
|
49328
49358
|
type: 'callAndListen',
|