@player-ui/beacon-plugin 1.1.0--canary.866.38513 → 1.1.0--canary.866.38904
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.
|
@@ -7912,8 +7912,8 @@ var BeaconPlugin = function() {
|
|
|
7912
7912
|
ref: Symbol("not-started"),
|
|
7913
7913
|
status: "not-started"
|
|
7914
7914
|
};
|
|
7915
|
-
var PLAYER_VERSION = true ? "1.1.0--canary.866.
|
|
7916
|
-
var COMMIT = true ? "
|
|
7915
|
+
var PLAYER_VERSION = true ? "1.1.0--canary.866.38904" : "unknown";
|
|
7916
|
+
var COMMIT = true ? "4bb0e145f34d37972e689d8f184c53e1692d0cc5" : "unknown";
|
|
7917
7917
|
var _Player = /*#__PURE__*/ function() {
|
|
7918
7918
|
function _Player2(config) {
|
|
7919
7919
|
var _this = this;
|
|
@@ -7936,7 +7936,7 @@ var BeaconPlugin = function() {
|
|
|
7936
7936
|
onStart: new SyncHook(),
|
|
7937
7937
|
onEnd: new SyncHook(),
|
|
7938
7938
|
resolveFlowContent: new SyncWaterfallHook(),
|
|
7939
|
-
transformContent: new
|
|
7939
|
+
transformContent: new SyncBailHook()
|
|
7940
7940
|
};
|
|
7941
7941
|
if (config === null || config === void 0 ? void 0 : config.logger) {
|
|
7942
7942
|
this.logger.addHandler(config.logger);
|
|
@@ -7950,6 +7950,9 @@ var BeaconPlugin = function() {
|
|
|
7950
7950
|
(_this_config_plugins = this.config.plugins) === null || _this_config_plugins === void 0 ? void 0 : _this_config_plugins.forEach(function(plugin) {
|
|
7951
7951
|
plugin.apply(_this);
|
|
7952
7952
|
});
|
|
7953
|
+
this.hooks.transformContent.tap("player", function(payload, meta) {
|
|
7954
|
+
return meta.format === "player" ? payload : void 0;
|
|
7955
|
+
});
|
|
7953
7956
|
}
|
|
7954
7957
|
_create_class(_Player2, [
|
|
7955
7958
|
{
|
|
@@ -8268,7 +8271,10 @@ var BeaconPlugin = function() {
|
|
|
8268
8271
|
version: options === null || options === void 0 ? void 0 : options.version
|
|
8269
8272
|
};
|
|
8270
8273
|
flow = this.hooks.transformContent.call(payload, meta);
|
|
8271
|
-
|
|
8274
|
+
if (!flow) {
|
|
8275
|
+
throw new Error('Player.start received content with format "'.concat(meta.format, '" that no plugin transformed into a Flow.'));
|
|
8276
|
+
}
|
|
8277
|
+
ref = Symbol((_flow_id = flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
|
|
8272
8278
|
maybeUpdateState = function(newState) {
|
|
8273
8279
|
if (_this.state.ref !== ref) {
|
|
8274
8280
|
_this.logger.warn("Received update for a flow that's not the current one");
|