@atlaskit/media-ui 28.2.0 → 28.2.2

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.
Files changed (28) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/customMediaPlayer/index-compiled.js +67 -43
  3. package/dist/cjs/customMediaPlayer/index-emotion.js +64 -43
  4. package/dist/cjs/customMediaPlayer/index.js +1 -1
  5. package/dist/cjs/customMediaPlayer/mediaPlayer/mediaPlayer.js +1 -1
  6. package/dist/cjs/customMediaPlayer/mediaPlayer/mediaPlayerBase.js +69 -52
  7. package/dist/cjs/customMediaPlayer/react-video-renderer/video.js +4 -2
  8. package/dist/es2019/customMediaPlayer/index-compiled.js +28 -5
  9. package/dist/es2019/customMediaPlayer/index-emotion.js +26 -5
  10. package/dist/es2019/customMediaPlayer/index.js +1 -1
  11. package/dist/es2019/customMediaPlayer/mediaPlayer/mediaPlayer.js +1 -1
  12. package/dist/es2019/customMediaPlayer/mediaPlayer/mediaPlayerBase.js +21 -4
  13. package/dist/es2019/customMediaPlayer/react-video-renderer/video.js +2 -2
  14. package/dist/esm/customMediaPlayer/index-compiled.js +67 -43
  15. package/dist/esm/customMediaPlayer/index-emotion.js +65 -43
  16. package/dist/esm/customMediaPlayer/index.js +1 -1
  17. package/dist/esm/customMediaPlayer/mediaPlayer/mediaPlayer.js +1 -1
  18. package/dist/esm/customMediaPlayer/mediaPlayer/mediaPlayerBase.js +69 -52
  19. package/dist/esm/customMediaPlayer/react-video-renderer/video.js +4 -2
  20. package/dist/types/customMediaPlayer/index-compiled.d.ts +4 -0
  21. package/dist/types/customMediaPlayer/index-emotion.d.ts +1 -0
  22. package/dist/types/customMediaPlayer/mediaPlayer/mediaPlayerBase.d.ts +3 -0
  23. package/dist/types/customMediaPlayer/react-video-renderer/video.d.ts +7 -2
  24. package/dist/types-ts4.5/customMediaPlayer/index-compiled.d.ts +4 -0
  25. package/dist/types-ts4.5/customMediaPlayer/index-emotion.d.ts +1 -0
  26. package/dist/types-ts4.5/customMediaPlayer/mediaPlayer/mediaPlayerBase.d.ts +3 -0
  27. package/dist/types-ts4.5/customMediaPlayer/react-video-renderer/video.d.ts +7 -2
  28. package/package.json +8 -5
@@ -131,13 +131,22 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
131
131
  }
132
132
  });
133
133
  _defineProperty(_this, "onTimeChanged", function () {
134
+ var _this$props3, _this$props3$onTimeCh;
134
135
  _this.createAndFireUIEvent('timeRangeNavigate', 'time');
136
+ (_this$props3 = _this.props) === null || _this$props3 === void 0 || (_this$props3$onTimeCh = _this$props3.onTimeChanged) === null || _this$props3$onTimeCh === void 0 || _this$props3$onTimeCh.call(_this$props3);
135
137
  });
136
138
  _defineProperty(_this, "onVolumeChanged", function () {
137
139
  _this.createAndFireUIEvent('volumeRangeNavigate', 'volume');
138
140
  });
141
+ _defineProperty(_this, "getDefaultTime", function () {
142
+ return _this.timeSaver.defaultTime;
143
+ });
139
144
  _defineProperty(_this, "onCurrentTimeChange", function (currentTime, duration) {
140
- if (duration - currentTime > MINIMUM_DURATION_BEFORE_SAVING_TIME) {
145
+ // We rely on the saved time when switching to the new source URL
146
+ // so we need to save it irrespective of elapsed time or video length
147
+ if (fg('platform_media_resume_video_on_token_expiry')) {
148
+ _this.timeSaver.defaultTime = currentTime;
149
+ } else if (duration - currentTime > MINIMUM_DURATION_BEFORE_SAVING_TIME) {
141
150
  _this.timeSaver.defaultTime = currentTime;
142
151
  } else {
143
152
  _this.timeSaver.defaultTime = 0;
@@ -151,11 +160,11 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
151
160
  }, formatDuration(currentTime), " / ", formatDuration(duration));
152
161
  });
153
162
  _defineProperty(_this, "renderHDButton", function () {
154
- var _this$props3 = _this.props,
155
- type = _this$props3.type,
156
- isHDAvailable = _this$props3.isHDAvailable,
157
- isHDActive = _this$props3.isHDActive,
158
- onHDToggleClick = _this$props3.onHDToggleClick;
163
+ var _this$props4 = _this.props,
164
+ type = _this$props4.type,
165
+ isHDAvailable = _this$props4.isHDAvailable,
166
+ isHDActive = _this$props4.isHDActive,
167
+ onHDToggleClick = _this$props4.onHDToggleClick;
159
168
  if (type === 'audio' || !isHDAvailable) {
160
169
  return;
161
170
  }
@@ -237,9 +246,9 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
237
246
  }
238
247
  });
239
248
  _defineProperty(_this, "renderFullScreenButton", function () {
240
- var _this$props4 = _this.props,
241
- formatMessage = _this$props4.intl.formatMessage,
242
- type = _this$props4.type;
249
+ var _this$props5 = _this.props,
250
+ formatMessage = _this$props5.intl.formatMessage,
251
+ type = _this$props5.type;
243
252
  if (type === 'audio') {
244
253
  return;
245
254
  }
@@ -365,12 +374,16 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
365
374
  }));
366
375
  });
367
376
  _defineProperty(_this, "pause", function () {
377
+ var _this$props6, _this$props6$onPause;
368
378
  if (_this.actions) {
369
379
  _this.actions.pause();
370
380
  }
381
+ (_this$props6 = _this.props) === null || _this$props6 === void 0 || (_this$props6$onPause = _this$props6.onPause) === null || _this$props6$onPause === void 0 || _this$props6$onPause.call(_this$props6);
371
382
  });
372
383
  _defineProperty(_this, "play", function () {
373
- var onFirstPlay = _this.props.onFirstPlay;
384
+ var _this$props7 = _this.props,
385
+ onFirstPlay = _this$props7.onFirstPlay,
386
+ onPlay = _this$props7.onPlay;
374
387
  if (_this.actions) {
375
388
  _this.actions.play();
376
389
  }
@@ -380,6 +393,7 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
380
393
  _this.wasPlayedOnce = true;
381
394
  onFirstPlay();
382
395
  }
396
+ onPlay === null || onPlay === void 0 || onPlay();
383
397
  });
384
398
  _defineProperty(_this, "getMediaButtonClickHandler", function (action, buttonType) {
385
399
  return function () {
@@ -398,13 +412,13 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
398
412
  };
399
413
  });
400
414
  _defineProperty(_this, "onViewed", function (videoState) {
401
- var _this$props5 = _this.props,
402
- createAnalyticsEvent = _this$props5.createAnalyticsEvent,
403
- fileId = _this$props5.fileId,
404
- isAutoPlay = _this$props5.isAutoPlay,
405
- isHDAvailable = _this$props5.isHDAvailable,
406
- isHDActive = _this$props5.isHDActive,
407
- type = _this$props5.type;
415
+ var _this$props8 = _this.props,
416
+ createAnalyticsEvent = _this$props8.createAnalyticsEvent,
417
+ fileId = _this$props8.fileId,
418
+ isAutoPlay = _this$props8.isAutoPlay,
419
+ isHDAvailable = _this$props8.isHDAvailable,
420
+ isHDActive = _this$props8.isHDActive,
421
+ type = _this$props8.type;
408
422
  var _this$state2 = _this.state,
409
423
  isFullScreenEnabled = _this$state2.isFullScreenEnabled,
410
424
  playerSize = _this$state2.playerSize,
@@ -454,14 +468,14 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
454
468
  return _createClass(CustomMediaPlayerBase, [{
455
469
  key: "componentDidMount",
456
470
  value: function componentDidMount() {
457
- var _this$props6 = this.props,
458
- type = _this$props6.type,
459
- fileId = _this$props6.fileId,
460
- isAutoPlay = _this$props6.isAutoPlay,
461
- isHDAvailable = _this$props6.isHDAvailable,
462
- isHDActive = _this$props6.isHDActive,
463
- onFirstPlay = _this$props6.onFirstPlay,
464
- createAnalyticsEvent = _this$props6.createAnalyticsEvent;
471
+ var _this$props9 = this.props,
472
+ type = _this$props9.type,
473
+ fileId = _this$props9.fileId,
474
+ isAutoPlay = _this$props9.isAutoPlay,
475
+ isHDAvailable = _this$props9.isHDAvailable,
476
+ isHDActive = _this$props9.isHDActive,
477
+ onFirstPlay = _this$props9.onFirstPlay,
478
+ createAnalyticsEvent = _this$props9.createAnalyticsEvent;
465
479
  var _this$state3 = this.state,
466
480
  isFullScreenEnabled = _this$state3.isFullScreenEnabled,
467
481
  playerSize = _this$state3.playerSize,
@@ -479,12 +493,14 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
479
493
  }
480
494
  simultaneousPlayManager.subscribe(this);
481
495
  if (isAutoPlay) {
496
+ var _this$props10, _this$props10$onPlay;
482
497
  simultaneousPlayManager.pauseOthers(this);
483
498
  if (onFirstPlay) {
484
499
  this.fireFirstPlayedTrackEvent();
485
500
  this.wasPlayedOnce = true;
486
501
  onFirstPlay();
487
502
  }
503
+ (_this$props10 = this.props) === null || _this$props10 === void 0 || (_this$props10$onPlay = _this$props10.onPlay) === null || _this$props10$onPlay === void 0 || _this$props10$onPlay.call(_this$props10);
488
504
  }
489
505
  }
490
506
  }, {
@@ -494,8 +510,8 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
494
510
  this.videoWrapperRef.current.removeEventListener('fullscreenchange', this.onFullScreenChange);
495
511
  }
496
512
  if (this.state.isFullScreenEnabled) {
497
- var _this$props$onFullscr2, _this$props7;
498
- (_this$props$onFullscr2 = (_this$props7 = this.props).onFullscreenChange) === null || _this$props$onFullscr2 === void 0 || _this$props$onFullscr2.call(_this$props7, false);
513
+ var _this$props$onFullscr2, _this$props11;
514
+ (_this$props$onFullscr2 = (_this$props11 = this.props).onFullscreenChange) === null || _this$props$onFullscr2 === void 0 || _this$props$onFullscr2.call(_this$props11, false);
499
515
  }
500
516
  simultaneousPlayManager.unsubscribe(this);
501
517
  }
@@ -511,13 +527,13 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
511
527
  }, {
512
528
  key: "createAndFireUIEvent",
513
529
  value: function createAndFireUIEvent(eventType, actionSubjectId) {
514
- var _this$props8 = this.props,
515
- type = _this$props8.type,
516
- fileId = _this$props8.fileId,
517
- isHDActive = _this$props8.isHDActive,
518
- isHDAvailable = _this$props8.isHDAvailable,
519
- isAutoPlay = _this$props8.isAutoPlay,
520
- createAnalyticsEvent = _this$props8.createAnalyticsEvent;
530
+ var _this$props12 = this.props,
531
+ type = _this$props12.type,
532
+ fileId = _this$props12.fileId,
533
+ isHDActive = _this$props12.isHDActive,
534
+ isHDAvailable = _this$props12.isHDAvailable,
535
+ isAutoPlay = _this$props12.isAutoPlay,
536
+ createAnalyticsEvent = _this$props12.createAnalyticsEvent;
521
537
  var _this$state4 = this.state,
522
538
  isFullScreenEnabled = _this$state4.isFullScreenEnabled,
523
539
  playerSize = _this$state4.playerSize,
@@ -564,14 +580,14 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
564
580
  key: "render",
565
581
  value: function render() {
566
582
  var _this2 = this;
567
- var _this$props9 = this.props,
568
- type = _this$props9.type,
569
- src = _this$props9.src,
570
- isAutoPlay = _this$props9.isAutoPlay,
571
- onCanPlay = _this$props9.onCanPlay,
572
- onError = _this$props9.onError,
573
- poster = _this$props9.poster,
574
- videoControlsWrapperRef = _this$props9.videoControlsWrapperRef;
583
+ var _this$props13 = this.props,
584
+ type = _this$props13.type,
585
+ src = _this$props13.src,
586
+ isAutoPlay = _this$props13.isAutoPlay,
587
+ onCanPlay = _this$props13.onCanPlay,
588
+ onError = _this$props13.onError,
589
+ poster = _this$props13.poster,
590
+ videoControlsWrapperRef = _this$props13.videoControlsWrapperRef;
575
591
  return /*#__PURE__*/React.createElement(Box, {
576
592
  xcss: customVideoWrapperStyles.root,
577
593
  ref: this.videoWrapperRef,
@@ -581,7 +597,7 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
581
597
  src: src,
582
598
  autoPlay: isAutoPlay,
583
599
  onCanPlay: onCanPlay,
584
- defaultTime: this.timeSaver.defaultTime,
600
+ defaultTime: this.getDefaultTime,
585
601
  onTimeChange: this.onCurrentTimeChange,
586
602
  onError: onError,
587
603
  poster: poster
@@ -604,11 +620,19 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
604
620
  var skipAmount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSkipAmount;
605
621
  var newTime = videoState.currentTime - skipAmount;
606
622
  actions.navigate(Math.max(newTime, 0));
623
+ if (fg('platform_media_resume_video_on_token_expiry')) {
624
+ var _this2$props, _this2$props$onTimeCh;
625
+ (_this2$props = _this2.props) === null || _this2$props === void 0 || (_this2$props$onTimeCh = _this2$props.onTimeChanged) === null || _this2$props$onTimeCh === void 0 || _this2$props$onTimeCh.call(_this2$props);
626
+ }
607
627
  };
608
628
  var skipForward = function skipForward() {
609
629
  var skipAmount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSkipAmount;
610
630
  var newTime = videoState.currentTime + skipAmount;
611
631
  actions.navigate(Math.min(newTime, videoState.duration));
632
+ if (fg('platform_media_resume_video_on_token_expiry')) {
633
+ var _this2$props2, _this2$props2$onTimeC;
634
+ (_this2$props2 = _this2.props) === null || _this2$props2 === void 0 || (_this2$props2$onTimeC = _this2$props2.onTimeChanged) === null || _this2$props2$onTimeC === void 0 || _this2$props2$onTimeC.call(_this2$props2);
635
+ }
612
636
  };
613
637
  var shortcuts = _this2.renderShortcuts({
614
638
  togglePlayPauseAction: isPlaying ? _this2.pause : _this2.play,
@@ -21,6 +21,8 @@ import SoundIcon from '@atlaskit/icon/core/migration/volume-high--hipchat-outgoi
21
21
  import VideoHdIcon from '@atlaskit/icon-lab/core/video-hd';
22
22
  import VideoHdFilledIcon from '@atlaskit/icon-lab/core/video-hd-filled';
23
23
  import DownloadIcon from '@atlaskit/icon/core/migration/download';
24
+
25
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives
24
26
  import { xcss, Box, Flex } from '@atlaskit/primitives';
25
27
  import MediaButton from '../MediaButton';
26
28
  import Spinner from '@atlaskit/spinner';
@@ -140,18 +142,27 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
140
142
  }
141
143
  });
142
144
  _defineProperty(_this, "onTimeChanged", function () {
145
+ var _this$props3, _this$props3$onTimeCh;
143
146
  _this.createAndFireUIEvent('timeRangeNavigate', 'time');
147
+ (_this$props3 = _this.props) === null || _this$props3 === void 0 || (_this$props3$onTimeCh = _this$props3.onTimeChanged) === null || _this$props3$onTimeCh === void 0 || _this$props3$onTimeCh.call(_this$props3);
144
148
  });
145
149
  _defineProperty(_this, "onVolumeChanged", function () {
146
150
  _this.createAndFireUIEvent('volumeRangeNavigate', 'volume');
147
151
  });
148
152
  _defineProperty(_this, "onCurrentTimeChange", function (currentTime, duration) {
149
- if (duration - currentTime > MINIMUM_DURATION_BEFORE_SAVING_TIME) {
153
+ // We rely on the saved time when switching to the new source URL
154
+ // so we need to save it irrespective of elapsed time or video length
155
+ if (fg('platform_media_resume_video_on_token_expiry')) {
156
+ _this.timeSaver.defaultTime = currentTime;
157
+ } else if (duration - currentTime > MINIMUM_DURATION_BEFORE_SAVING_TIME) {
150
158
  _this.timeSaver.defaultTime = currentTime;
151
159
  } else {
152
160
  _this.timeSaver.defaultTime = 0;
153
161
  }
154
162
  });
163
+ _defineProperty(_this, "getDefaultTime", function () {
164
+ return _this.timeSaver.defaultTime;
165
+ });
155
166
  _defineProperty(_this, "renderCurrentTime", function (_ref) {
156
167
  var currentTime = _ref.currentTime,
157
168
  duration = _ref.duration;
@@ -160,11 +171,11 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
160
171
  }, formatDuration(currentTime), " / ", formatDuration(duration));
161
172
  });
162
173
  _defineProperty(_this, "renderHDButton", function () {
163
- var _this$props3 = _this.props,
164
- type = _this$props3.type,
165
- isHDAvailable = _this$props3.isHDAvailable,
166
- isHDActive = _this$props3.isHDActive,
167
- onHDToggleClick = _this$props3.onHDToggleClick;
174
+ var _this$props4 = _this.props,
175
+ type = _this$props4.type,
176
+ isHDAvailable = _this$props4.isHDAvailable,
177
+ isHDActive = _this$props4.isHDActive,
178
+ onHDToggleClick = _this$props4.onHDToggleClick;
168
179
  if (type === 'audio' || !isHDAvailable) {
169
180
  return;
170
181
  }
@@ -246,9 +257,9 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
246
257
  }
247
258
  });
248
259
  _defineProperty(_this, "renderFullScreenButton", function () {
249
- var _this$props4 = _this.props,
250
- formatMessage = _this$props4.intl.formatMessage,
251
- type = _this$props4.type;
260
+ var _this$props5 = _this.props,
261
+ formatMessage = _this$props5.intl.formatMessage,
262
+ type = _this$props5.type;
252
263
  if (type === 'audio') {
253
264
  return;
254
265
  }
@@ -374,12 +385,16 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
374
385
  }));
375
386
  });
376
387
  _defineProperty(_this, "pause", function () {
388
+ var _this$props6, _this$props6$onPause;
377
389
  if (_this.actions) {
378
390
  _this.actions.pause();
379
391
  }
392
+ (_this$props6 = _this.props) === null || _this$props6 === void 0 || (_this$props6$onPause = _this$props6.onPause) === null || _this$props6$onPause === void 0 || _this$props6$onPause.call(_this$props6);
380
393
  });
381
394
  _defineProperty(_this, "play", function () {
382
- var onFirstPlay = _this.props.onFirstPlay;
395
+ var _this$props7 = _this.props,
396
+ onFirstPlay = _this$props7.onFirstPlay,
397
+ onPlay = _this$props7.onPlay;
383
398
  if (_this.actions) {
384
399
  _this.actions.play();
385
400
  }
@@ -389,6 +404,7 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
389
404
  _this.wasPlayedOnce = true;
390
405
  onFirstPlay();
391
406
  }
407
+ onPlay === null || onPlay === void 0 || onPlay();
392
408
  });
393
409
  _defineProperty(_this, "getMediaButtonClickHandler", function (action, buttonType) {
394
410
  return function () {
@@ -407,13 +423,13 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
407
423
  };
408
424
  });
409
425
  _defineProperty(_this, "onViewed", function (videoState) {
410
- var _this$props5 = _this.props,
411
- createAnalyticsEvent = _this$props5.createAnalyticsEvent,
412
- fileId = _this$props5.fileId,
413
- isAutoPlay = _this$props5.isAutoPlay,
414
- isHDAvailable = _this$props5.isHDAvailable,
415
- isHDActive = _this$props5.isHDActive,
416
- type = _this$props5.type;
426
+ var _this$props8 = _this.props,
427
+ createAnalyticsEvent = _this$props8.createAnalyticsEvent,
428
+ fileId = _this$props8.fileId,
429
+ isAutoPlay = _this$props8.isAutoPlay,
430
+ isHDAvailable = _this$props8.isHDAvailable,
431
+ isHDActive = _this$props8.isHDActive,
432
+ type = _this$props8.type;
417
433
  var _this$state2 = _this.state,
418
434
  isFullScreenEnabled = _this$state2.isFullScreenEnabled,
419
435
  playerSize = _this$state2.playerSize,
@@ -463,14 +479,14 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
463
479
  return _createClass(CustomMediaPlayerBase, [{
464
480
  key: "componentDidMount",
465
481
  value: function componentDidMount() {
466
- var _this$props6 = this.props,
467
- type = _this$props6.type,
468
- fileId = _this$props6.fileId,
469
- isAutoPlay = _this$props6.isAutoPlay,
470
- isHDAvailable = _this$props6.isHDAvailable,
471
- isHDActive = _this$props6.isHDActive,
472
- onFirstPlay = _this$props6.onFirstPlay,
473
- createAnalyticsEvent = _this$props6.createAnalyticsEvent;
482
+ var _this$props9 = this.props,
483
+ type = _this$props9.type,
484
+ fileId = _this$props9.fileId,
485
+ isAutoPlay = _this$props9.isAutoPlay,
486
+ isHDAvailable = _this$props9.isHDAvailable,
487
+ isHDActive = _this$props9.isHDActive,
488
+ onFirstPlay = _this$props9.onFirstPlay,
489
+ createAnalyticsEvent = _this$props9.createAnalyticsEvent;
474
490
  var _this$state3 = this.state,
475
491
  isFullScreenEnabled = _this$state3.isFullScreenEnabled,
476
492
  playerSize = _this$state3.playerSize,
@@ -488,12 +504,14 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
488
504
  }
489
505
  simultaneousPlayManager.subscribe(this);
490
506
  if (isAutoPlay) {
507
+ var _this$props10, _this$props10$onPlay;
491
508
  simultaneousPlayManager.pauseOthers(this);
492
509
  if (onFirstPlay) {
493
510
  this.fireFirstPlayedTrackEvent();
494
511
  this.wasPlayedOnce = true;
495
512
  onFirstPlay();
496
513
  }
514
+ (_this$props10 = this.props) === null || _this$props10 === void 0 || (_this$props10$onPlay = _this$props10.onPlay) === null || _this$props10$onPlay === void 0 || _this$props10$onPlay.call(_this$props10);
497
515
  }
498
516
  }
499
517
  }, {
@@ -503,8 +521,8 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
503
521
  this.videoWrapperRef.current.removeEventListener('fullscreenchange', this.onFullScreenChange);
504
522
  }
505
523
  if (this.state.isFullScreenEnabled) {
506
- var _this$props$onFullscr2, _this$props7;
507
- (_this$props$onFullscr2 = (_this$props7 = this.props).onFullscreenChange) === null || _this$props$onFullscr2 === void 0 || _this$props$onFullscr2.call(_this$props7, false);
524
+ var _this$props$onFullscr2, _this$props11;
525
+ (_this$props$onFullscr2 = (_this$props11 = this.props).onFullscreenChange) === null || _this$props$onFullscr2 === void 0 || _this$props$onFullscr2.call(_this$props11, false);
508
526
  }
509
527
  simultaneousPlayManager.unsubscribe(this);
510
528
  }
@@ -520,13 +538,13 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
520
538
  }, {
521
539
  key: "createAndFireUIEvent",
522
540
  value: function createAndFireUIEvent(eventType, actionSubjectId) {
523
- var _this$props8 = this.props,
524
- type = _this$props8.type,
525
- fileId = _this$props8.fileId,
526
- isHDActive = _this$props8.isHDActive,
527
- isHDAvailable = _this$props8.isHDAvailable,
528
- isAutoPlay = _this$props8.isAutoPlay,
529
- createAnalyticsEvent = _this$props8.createAnalyticsEvent;
541
+ var _this$props12 = this.props,
542
+ type = _this$props12.type,
543
+ fileId = _this$props12.fileId,
544
+ isHDActive = _this$props12.isHDActive,
545
+ isHDAvailable = _this$props12.isHDAvailable,
546
+ isAutoPlay = _this$props12.isAutoPlay,
547
+ createAnalyticsEvent = _this$props12.createAnalyticsEvent;
530
548
  var _this$state4 = this.state,
531
549
  isFullScreenEnabled = _this$state4.isFullScreenEnabled,
532
550
  playerSize = _this$state4.playerSize,
@@ -573,14 +591,14 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
573
591
  key: "render",
574
592
  value: function render() {
575
593
  var _this2 = this;
576
- var _this$props9 = this.props,
577
- type = _this$props9.type,
578
- src = _this$props9.src,
579
- isAutoPlay = _this$props9.isAutoPlay,
580
- onCanPlay = _this$props9.onCanPlay,
581
- onError = _this$props9.onError,
582
- poster = _this$props9.poster,
583
- videoControlsWrapperRef = _this$props9.videoControlsWrapperRef;
594
+ var _this$props13 = this.props,
595
+ type = _this$props13.type,
596
+ src = _this$props13.src,
597
+ isAutoPlay = _this$props13.isAutoPlay,
598
+ onCanPlay = _this$props13.onCanPlay,
599
+ onError = _this$props13.onError,
600
+ poster = _this$props13.poster,
601
+ videoControlsWrapperRef = _this$props13.videoControlsWrapperRef;
584
602
  return /*#__PURE__*/React.createElement(Box, {
585
603
  xcss: customVideoWrapperStyles,
586
604
  ref: this.videoWrapperRef,
@@ -590,7 +608,7 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
590
608
  src: src,
591
609
  autoPlay: isAutoPlay,
592
610
  onCanPlay: onCanPlay,
593
- defaultTime: this.timeSaver.defaultTime,
611
+ defaultTime: this.getDefaultTime,
594
612
  onTimeChange: this.onCurrentTimeChange,
595
613
  onError: onError,
596
614
  poster: poster
@@ -610,14 +628,18 @@ export var CustomMediaPlayerBase = /*#__PURE__*/function (_Component) {
610
628
  var isMediumPlayer = playerSize === 'medium';
611
629
  var defaultSkipAmount = 10;
612
630
  var skipBackward = function skipBackward() {
631
+ var _this2$props, _this2$props$onTimeCh;
613
632
  var skipAmount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSkipAmount;
614
633
  var newTime = videoState.currentTime - skipAmount;
615
634
  actions.navigate(Math.max(newTime, 0));
635
+ (_this2$props = _this2.props) === null || _this2$props === void 0 || (_this2$props$onTimeCh = _this2$props.onTimeChanged) === null || _this2$props$onTimeCh === void 0 || _this2$props$onTimeCh.call(_this2$props);
616
636
  };
617
637
  var skipForward = function skipForward() {
638
+ var _this2$props2, _this2$props2$onTimeC;
618
639
  var skipAmount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultSkipAmount;
619
640
  var newTime = videoState.currentTime + skipAmount;
620
641
  actions.navigate(Math.min(newTime, videoState.duration));
642
+ (_this2$props2 = _this2.props) === null || _this2$props2 === void 0 || (_this2$props2$onTimeC = _this2$props2.onTimeChanged) === null || _this2$props2$onTimeC === void 0 || _this2$props2$onTimeC.call(_this2$props2);
621
643
  };
622
644
  var shortcuts = _this2.renderShortcuts({
623
645
  togglePlayPauseAction: isPlaying ? _this2.pause : _this2.play,
@@ -9,7 +9,7 @@ export var CustomMediaPlayerBase = function CustomMediaPlayerBase(props) {
9
9
  return fg('platform_media_compiled') ? /*#__PURE__*/React.createElement(CompiledCustomMediaPlayerBase, props) : /*#__PURE__*/React.createElement(EmotionCustomMediaPlayerBase, props);
10
10
  };
11
11
  var packageName = "@atlaskit/media-ui";
12
- var packageVersion = "28.2.0";
12
+ var packageVersion = "28.2.2";
13
13
 
14
14
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
15
15
  export var CustomMediaPlayer = withMediaAnalyticsContext({
@@ -5,7 +5,7 @@ import { useFileState, useMediaClient, useMediaSettings } from '@atlaskit/media-
5
5
  import { MediaPlayerBase } from './mediaPlayerBase';
6
6
  import { useTextTracks } from './useTextTracks';
7
7
  var packageName = "@atlaskit/media-ui";
8
- var packageVersion = "28.2.0";
8
+ var packageVersion = "28.2.2";
9
9
  var MediaPlayerBaseWithContext = withMediaAnalyticsContext({
10
10
  packageVersion: packageVersion,
11
11
  packageName: packageName,