@atlaskit/media-viewer 52.2.0 → 52.2.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.
- package/CHANGELOG.md +18 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/analytics/ufoExperiences.js +1 -1
- package/dist/cjs/viewers/video.js +14 -0
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/analytics/ufoExperiences.js +1 -1
- package/dist/es2019/viewers/video.js +14 -0
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/analytics/ufoExperiences.js +1 -1
- package/dist/esm/viewers/video.js +14 -0
- package/dist/types/viewers/video.d.ts +2 -0
- package/dist/types-ts4.5/viewers/video.d.ts +2 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/media-viewer
|
|
2
2
|
|
|
3
|
+
## 52.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#134528](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/134528)
|
|
8
|
+
[`61165836daa36`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/61165836daa36) -
|
|
9
|
+
[ux] Use latest media token on video resume or seek
|
|
10
|
+
|
|
11
|
+
Previously when resuming a video after the current token had expired the video player would fail
|
|
12
|
+
to load and would show an error boundary page.
|
|
13
|
+
|
|
14
|
+
The same bug would occur when seeking to a new `currentTime` after the token expired.
|
|
15
|
+
|
|
16
|
+
Now both the dedicated and inline player will update their `src` to a new URL with the latest
|
|
17
|
+
cached token.
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 52.2.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -10,7 +10,7 @@ exports.packageVersion = exports.packageName = void 0;
|
|
|
10
10
|
var _analytics = require("@atlaskit/media-common/analytics");
|
|
11
11
|
var componentName = exports.component = exports.componentName = 'mediaViewer';
|
|
12
12
|
var packageName = exports.packageName = "@atlaskit/media-viewer";
|
|
13
|
-
var packageVersion = exports.packageVersion = "52.2.
|
|
13
|
+
var packageVersion = exports.packageVersion = "52.2.1";
|
|
14
14
|
function getFileAttributes(fileState) {
|
|
15
15
|
if (!fileState) {
|
|
16
16
|
return {
|
|
@@ -12,7 +12,7 @@ var _mediaCommon = require("@atlaskit/media-common");
|
|
|
12
12
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
13
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
14
|
var packageName = "@atlaskit/media-viewer";
|
|
15
|
-
var packageVersion = "52.2.
|
|
15
|
+
var packageVersion = "52.2.1";
|
|
16
16
|
var ufoExperience;
|
|
17
17
|
var getExperience = function getExperience() {
|
|
18
18
|
if (!ufoExperience) {
|
|
@@ -55,6 +55,16 @@ var VideoViewer = exports.VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
55
55
|
});
|
|
56
56
|
onCanPlay && onCanPlay();
|
|
57
57
|
});
|
|
58
|
+
(0, _defineProperty2.default)(_this, "onPlay", function () {
|
|
59
|
+
if ((0, _platformFeatureFlags.fg)('platform_media_resume_video_on_token_expiry')) {
|
|
60
|
+
_this.init();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
(0, _defineProperty2.default)(_this, "onTimeChanged", function () {
|
|
64
|
+
if ((0, _platformFeatureFlags.fg)('platform_media_resume_video_on_token_expiry')) {
|
|
65
|
+
_this.init();
|
|
66
|
+
}
|
|
67
|
+
});
|
|
58
68
|
(0, _defineProperty2.default)(_this, "onError", function () {
|
|
59
69
|
var onError = _this.props.onError;
|
|
60
70
|
onError && onError(new _errors.MediaViewerError('videoviewer-playback'));
|
|
@@ -99,6 +109,8 @@ var VideoViewer = exports.VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
99
109
|
isShortcutEnabled: true,
|
|
100
110
|
onFirstPlay: this.onFirstPlay,
|
|
101
111
|
onError: this.onError,
|
|
112
|
+
onPlay: this.onPlay,
|
|
113
|
+
onTimeChanged: this.onTimeChanged,
|
|
102
114
|
lastWatchTimeConfig: {
|
|
103
115
|
contentId: item.id
|
|
104
116
|
}
|
|
@@ -114,6 +126,8 @@ var VideoViewer = exports.VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
114
126
|
isShortcutEnabled: true,
|
|
115
127
|
onFirstPlay: this.onFirstPlay,
|
|
116
128
|
onError: this.onError,
|
|
129
|
+
onPlay: this.onPlay,
|
|
130
|
+
onTimeChanged: this.onTimeChanged,
|
|
117
131
|
lastWatchTimeConfig: {
|
|
118
132
|
contentId: item.id
|
|
119
133
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
|
|
2
2
|
const componentName = 'mediaViewer';
|
|
3
3
|
const packageName = "@atlaskit/media-viewer";
|
|
4
|
-
const packageVersion = "52.2.
|
|
4
|
+
const packageVersion = "52.2.1";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -2,7 +2,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
2
2
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
3
3
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
4
4
|
const packageName = "@atlaskit/media-viewer";
|
|
5
|
-
const packageVersion = "52.2.
|
|
5
|
+
const packageVersion = "52.2.1";
|
|
6
6
|
let ufoExperience;
|
|
7
7
|
const getExperience = () => {
|
|
8
8
|
if (!ufoExperience) {
|
|
@@ -35,6 +35,16 @@ export class VideoViewer extends BaseViewer {
|
|
|
35
35
|
});
|
|
36
36
|
onCanPlay && onCanPlay();
|
|
37
37
|
});
|
|
38
|
+
_defineProperty(this, "onPlay", () => {
|
|
39
|
+
if (fg('platform_media_resume_video_on_token_expiry')) {
|
|
40
|
+
this.init();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
_defineProperty(this, "onTimeChanged", () => {
|
|
44
|
+
if (fg('platform_media_resume_video_on_token_expiry')) {
|
|
45
|
+
this.init();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
38
48
|
_defineProperty(this, "onError", () => {
|
|
39
49
|
const {
|
|
40
50
|
onError
|
|
@@ -80,6 +90,8 @@ export class VideoViewer extends BaseViewer {
|
|
|
80
90
|
isShortcutEnabled: true,
|
|
81
91
|
onFirstPlay: this.onFirstPlay,
|
|
82
92
|
onError: this.onError,
|
|
93
|
+
onPlay: this.onPlay,
|
|
94
|
+
onTimeChanged: this.onTimeChanged,
|
|
83
95
|
lastWatchTimeConfig: {
|
|
84
96
|
contentId: item.id
|
|
85
97
|
}
|
|
@@ -95,6 +107,8 @@ export class VideoViewer extends BaseViewer {
|
|
|
95
107
|
isShortcutEnabled: true,
|
|
96
108
|
onFirstPlay: this.onFirstPlay,
|
|
97
109
|
onError: this.onError,
|
|
110
|
+
onPlay: this.onPlay,
|
|
111
|
+
onTimeChanged: this.onTimeChanged,
|
|
98
112
|
lastWatchTimeConfig: {
|
|
99
113
|
contentId: item.id
|
|
100
114
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
|
|
2
2
|
var componentName = 'mediaViewer';
|
|
3
3
|
var packageName = "@atlaskit/media-viewer";
|
|
4
|
-
var packageVersion = "52.2.
|
|
4
|
+
var packageVersion = "52.2.1";
|
|
5
5
|
export { packageName, packageVersion, componentName, componentName as component };
|
|
6
6
|
export function getFileAttributes(fileState) {
|
|
7
7
|
if (!fileState) {
|
|
@@ -5,7 +5,7 @@ import { UFOExperience, ExperiencePerformanceTypes, ExperienceTypes } from '@atl
|
|
|
5
5
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
6
6
|
import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
|
|
7
7
|
var packageName = "@atlaskit/media-viewer";
|
|
8
|
-
var packageVersion = "52.2.
|
|
8
|
+
var packageVersion = "52.2.1";
|
|
9
9
|
var ufoExperience;
|
|
10
10
|
var getExperience = function getExperience() {
|
|
11
11
|
if (!ufoExperience) {
|
|
@@ -48,6 +48,16 @@ export var VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
48
48
|
});
|
|
49
49
|
onCanPlay && onCanPlay();
|
|
50
50
|
});
|
|
51
|
+
_defineProperty(_this, "onPlay", function () {
|
|
52
|
+
if (fg('platform_media_resume_video_on_token_expiry')) {
|
|
53
|
+
_this.init();
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
_defineProperty(_this, "onTimeChanged", function () {
|
|
57
|
+
if (fg('platform_media_resume_video_on_token_expiry')) {
|
|
58
|
+
_this.init();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
51
61
|
_defineProperty(_this, "onError", function () {
|
|
52
62
|
var onError = _this.props.onError;
|
|
53
63
|
onError && onError(new MediaViewerError('videoviewer-playback'));
|
|
@@ -92,6 +102,8 @@ export var VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
92
102
|
isShortcutEnabled: true,
|
|
93
103
|
onFirstPlay: this.onFirstPlay,
|
|
94
104
|
onError: this.onError,
|
|
105
|
+
onPlay: this.onPlay,
|
|
106
|
+
onTimeChanged: this.onTimeChanged,
|
|
95
107
|
lastWatchTimeConfig: {
|
|
96
108
|
contentId: item.id
|
|
97
109
|
}
|
|
@@ -107,6 +119,8 @@ export var VideoViewer = /*#__PURE__*/function (_BaseViewer) {
|
|
|
107
119
|
isShortcutEnabled: true,
|
|
108
120
|
onFirstPlay: this.onFirstPlay,
|
|
109
121
|
onError: this.onError,
|
|
122
|
+
onPlay: this.onPlay,
|
|
123
|
+
onTimeChanged: this.onTimeChanged,
|
|
110
124
|
lastWatchTimeConfig: {
|
|
111
125
|
contentId: item.id
|
|
112
126
|
}
|
|
@@ -26,6 +26,8 @@ export declare class VideoViewer extends BaseViewer<string, Props, State> {
|
|
|
26
26
|
};
|
|
27
27
|
private onHDChange;
|
|
28
28
|
private onFirstPlay;
|
|
29
|
+
private onPlay;
|
|
30
|
+
private onTimeChanged;
|
|
29
31
|
private onError;
|
|
30
32
|
protected renderSuccessful(content: string): React.JSX.Element;
|
|
31
33
|
protected init(isHDActive?: boolean): Promise<void>;
|
|
@@ -26,6 +26,8 @@ export declare class VideoViewer extends BaseViewer<string, Props, State> {
|
|
|
26
26
|
};
|
|
27
27
|
private onHDChange;
|
|
28
28
|
private onFirstPlay;
|
|
29
|
+
private onPlay;
|
|
30
|
+
private onTimeChanged;
|
|
29
31
|
private onError;
|
|
30
32
|
protected renderSuccessful(content: string): React.JSX.Element;
|
|
31
33
|
protected init(isHDActive?: boolean): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-viewer",
|
|
3
|
-
"version": "52.2.
|
|
3
|
+
"version": "52.2.1",
|
|
4
4
|
"description": "MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and extendable yet easy-to-integrate",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@atlaskit/code": "^17.2.0",
|
|
42
42
|
"@atlaskit/form": "^12.0.0",
|
|
43
43
|
"@atlaskit/heading": "^5.2.0",
|
|
44
|
-
"@atlaskit/icon": "^26.
|
|
44
|
+
"@atlaskit/icon": "^26.4.0",
|
|
45
45
|
"@atlaskit/icon-file-type": "^7.0.0",
|
|
46
|
-
"@atlaskit/icon-lab": "^4.
|
|
46
|
+
"@atlaskit/icon-lab": "^4.17.0",
|
|
47
47
|
"@atlaskit/media-client": "^33.3.0",
|
|
48
48
|
"@atlaskit/media-client-react": "^4.1.0",
|
|
49
49
|
"@atlaskit/media-common": "^12.1.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@atlaskit/textfield": "^8.0.0",
|
|
58
58
|
"@atlaskit/theme": "^18.0.0",
|
|
59
59
|
"@atlaskit/tokens": "^4.9.0",
|
|
60
|
-
"@atlaskit/tooltip": "^20.
|
|
60
|
+
"@atlaskit/tooltip": "^20.2.0",
|
|
61
61
|
"@atlaskit/ufo": "^0.4.0",
|
|
62
62
|
"@babel/runtime": "^7.0.0",
|
|
63
63
|
"@codemirror/language": "6.10.8",
|
|
@@ -123,6 +123,9 @@
|
|
|
123
123
|
"platform_media_video_captions": {
|
|
124
124
|
"type": "boolean"
|
|
125
125
|
},
|
|
126
|
+
"platform_media_resume_video_on_token_expiry": {
|
|
127
|
+
"type": "boolean"
|
|
128
|
+
},
|
|
126
129
|
"media_advanced_text_viewer": {
|
|
127
130
|
"type": "boolean"
|
|
128
131
|
}
|