@player-ui/player 1.1.0--canary.866.38904 → 1.1.0-next.1

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.
@@ -8495,8 +8495,8 @@ var Player = function() {
8495
8495
  status: "not-started"
8496
8496
  };
8497
8497
  // ../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/core/player/src/player.ts
8498
- var PLAYER_VERSION = true ? "1.1.0--canary.866.38904" : "unknown";
8499
- var COMMIT = true ? "4bb0e145f34d37972e689d8f184c53e1692d0cc5" : "unknown";
8498
+ var PLAYER_VERSION = true ? "1.1.0-next.1" : "unknown";
8499
+ var COMMIT = true ? "8d1e44b77769e923785e6218de2d9f99342b9b1a" : "unknown";
8500
8500
  var _Player = /*#__PURE__*/ function() {
8501
8501
  function _Player(config) {
8502
8502
  var _this = this;
@@ -8518,8 +8518,7 @@ var Player = function() {
8518
8518
  state: new SyncHook(),
8519
8519
  onStart: new SyncHook(),
8520
8520
  onEnd: new SyncHook(),
8521
- resolveFlowContent: new SyncWaterfallHook(),
8522
- transformContent: new SyncBailHook()
8521
+ resolveFlowContent: new SyncWaterfallHook()
8523
8522
  };
8524
8523
  if (config === null || config === void 0 ? void 0 : config.logger) {
8525
8524
  this.logger.addHandler(config.logger);
@@ -8533,9 +8532,6 @@ var Player = function() {
8533
8532
  (_this_config_plugins = this.config.plugins) === null || _this_config_plugins === void 0 ? void 0 : _this_config_plugins.forEach(function(plugin) {
8534
8533
  plugin.apply(_this);
8535
8534
  });
8536
- this.hooks.transformContent.tap("player", function(payload, meta) {
8537
- return meta.format === "player" ? payload : void 0;
8538
- });
8539
8535
  }
8540
8536
  _create_class(_Player, [
8541
8537
  {
@@ -8842,22 +8838,14 @@ var Player = function() {
8842
8838
  },
8843
8839
  {
8844
8840
  key: "start",
8845
- value: function start(payload, options) {
8841
+ value: function start(payload) {
8846
8842
  return _async_to_generator(function() {
8847
- var _this, _options_format, meta, flow, _flow_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8843
+ var _this, _payload_id, ref, maybeUpdateState, _this_setupFlow, state, start, endProps, _tmp, error, errorState;
8848
8844
  return _ts_generator(this, function(_state) {
8849
8845
  switch(_state.label){
8850
8846
  case 0:
8851
8847
  _this = this;
8852
- meta = {
8853
- format: (_options_format = options === null || options === void 0 ? void 0 : options.format) !== null && _options_format !== void 0 ? _options_format : "player",
8854
- version: options === null || options === void 0 ? void 0 : options.version
8855
- };
8856
- flow = this.hooks.transformContent.call(payload, meta);
8857
- if (!flow) {
8858
- throw new Error('Player.start received content with format "'.concat(meta.format, '" that no plugin transformed into a Flow.'));
8859
- }
8860
- ref = Symbol((_flow_id = flow.id) !== null && _flow_id !== void 0 ? _flow_id : "payload");
8848
+ ref = Symbol((_payload_id = payload === null || payload === void 0 ? void 0 : payload.id) !== null && _payload_id !== void 0 ? _payload_id : "payload");
8861
8849
  maybeUpdateState = function(newState) {
8862
8850
  if (_this.state.ref !== ref) {
8863
8851
  _this.logger.warn("Received update for a flow that's not the current one");
@@ -8878,7 +8866,7 @@ var Player = function() {
8878
8866
  ,
8879
8867
  4
8880
8868
  ]);
8881
- _this_setupFlow = this.setupFlow(flow), state = _this_setupFlow.state, start = _this_setupFlow.start;
8869
+ _this_setupFlow = this.setupFlow(payload), state = _this_setupFlow.state, start = _this_setupFlow.start;
8882
8870
  this.setState(_object_spread({
8883
8871
  ref: ref
8884
8872
  }, state));
@@ -8913,7 +8901,7 @@ var Player = function() {
8913
8901
  errorState = {
8914
8902
  status: "error",
8915
8903
  ref: ref,
8916
- flow: flow,
8904
+ flow: payload,
8917
8905
  error: error
8918
8906
  };
8919
8907
  maybeUpdateState(errorState);