@player-devtools/profiler-plugin 0.16.1-next.2 → 1.0.0--canary.38.1480
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.
|
@@ -1197,6 +1197,14 @@ var ProfilerDevtoolsPlugin = function() {
|
|
|
1197
1197
|
};
|
|
1198
1198
|
draft.messages.push(message);
|
|
1199
1199
|
});
|
|
1200
|
+
case "PLAYER_DEVTOOLS_PLAYER_STOPPED":
|
|
1201
|
+
return produce(state, function(draft) {
|
|
1202
|
+
var message = {
|
|
1203
|
+
type: "PLAYER_DEVTOOLS_PLAYER_STOPPED",
|
|
1204
|
+
payload: transaction.payload
|
|
1205
|
+
};
|
|
1206
|
+
draft.messages.push(message);
|
|
1207
|
+
});
|
|
1200
1208
|
case "PLAYER_DEVTOOLS_PLUGIN_DATA_CHANGE":
|
|
1201
1209
|
return produce(state, function(draft) {
|
|
1202
1210
|
var payload = transaction.payload;
|
|
@@ -1279,6 +1287,7 @@ var ProfilerDevtoolsPlugin = function() {
|
|
|
1279
1287
|
this.options = options;
|
|
1280
1288
|
this.name = "DevtoolsPlugin";
|
|
1281
1289
|
this.loggedWarning = false;
|
|
1290
|
+
this.announced = false;
|
|
1282
1291
|
this.store = useStateReducer(reducer, INITIAL_STATE);
|
|
1283
1292
|
this.lastProcessedInteraction = 0;
|
|
1284
1293
|
this.store.subscribe(function(param) {
|
|
@@ -1355,6 +1364,25 @@ var ProfilerDevtoolsPlugin = function() {
|
|
|
1355
1364
|
_messenger_: true
|
|
1356
1365
|
};
|
|
1357
1366
|
this.store.dispatch(transaction);
|
|
1367
|
+
this.announced = true;
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
key: "dispatchPlayerStopped",
|
|
1372
|
+
value: function dispatchPlayerStopped() {
|
|
1373
|
+
var transaction = {
|
|
1374
|
+
id: -1,
|
|
1375
|
+
type: "PLAYER_DEVTOOLS_PLAYER_STOPPED",
|
|
1376
|
+
payload: {
|
|
1377
|
+
pluginID: this.pluginID
|
|
1378
|
+
},
|
|
1379
|
+
sender: this.options.playerID,
|
|
1380
|
+
context: "player",
|
|
1381
|
+
target: "player",
|
|
1382
|
+
timestamp: Date.now(),
|
|
1383
|
+
_messenger_: true
|
|
1384
|
+
};
|
|
1385
|
+
this.store.dispatch(transaction);
|
|
1358
1386
|
}
|
|
1359
1387
|
},
|
|
1360
1388
|
{
|
|
@@ -1431,6 +1459,17 @@ var ProfilerDevtoolsPlugin = function() {
|
|
|
1431
1459
|
if (!this.checkIfDevtoolsIsActive()) return;
|
|
1432
1460
|
this.dispatchPlayerInit();
|
|
1433
1461
|
}
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
/**
|
|
1465
|
+
* Tell devtools this plugin is gone. Call it before the messenger is destroyed.
|
|
1466
|
+
* Safe to call more than once.
|
|
1467
|
+
*/ key: "teardown",
|
|
1468
|
+
value: function teardown() {
|
|
1469
|
+
if (!this.announced) return;
|
|
1470
|
+
this.announced = false;
|
|
1471
|
+
this.dispatchPlayerStopped();
|
|
1472
|
+
}
|
|
1434
1473
|
}
|
|
1435
1474
|
]);
|
|
1436
1475
|
return DevtoolsPlugin;
|
|
@@ -1685,7 +1724,7 @@ var ProfilerDevtoolsPlugin = function() {
|
|
|
1685
1724
|
rawNodes: []
|
|
1686
1725
|
}
|
|
1687
1726
|
};
|
|
1688
|
-
var PLUGIN_VERSION = true ? "0.
|
|
1727
|
+
var PLUGIN_VERSION = true ? "1.0.0--canary.38.1480" : "unstamped";
|
|
1689
1728
|
var _obj;
|
|
1690
1729
|
var ProfilerPluginData = {
|
|
1691
1730
|
id: PLUGIN_ID,
|