catlab-remote-client 2.2.2 → 2.2.3
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.
|
@@ -97,10 +97,16 @@ require(
|
|
|
97
97
|
require(
|
|
98
98
|
['CatLab/Webremote/PlayerPool/PlayerPoolWorker'],
|
|
99
99
|
function (PlayerPoolWorker) {
|
|
100
|
-
//
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
// Signal that modules are loaded; wait for init options
|
|
101
|
+
self.postMessage({ type: 'worker:modules-ready' });
|
|
102
|
+
|
|
103
|
+
self.addEventListener('message', function initHandler(e) {
|
|
104
|
+
if (e.data && e.data.type === 'worker:init') {
|
|
105
|
+
self.removeEventListener('message', initHandler);
|
|
106
|
+
var worker = new PlayerPoolWorker();
|
|
107
|
+
worker.start(e.data.options || {});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
104
110
|
},
|
|
105
111
|
function (err) {
|
|
106
112
|
console.error('[worker] Failed to load PlayerPoolWorker:', err.message);
|