@elice/material-video-file 1.240718.0-trasncript.2 → 1.240718.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/cjs/components/material-video-file/MaterialVideoFile.d.ts +1 -1
- package/cjs/components/material-video-file/MaterialVideoFile.js +35 -40
- package/cjs/components/material-video-file/MaterialVideoFile.styled.js +1 -5
- package/cjs/components/material-video-file/MaterialVideoFilePlayer.d.ts +0 -2
- package/cjs/components/material-video-file/MaterialVideoFilePlayer.js +43 -74
- package/cjs/components/material-video-file/MaterialVideoFilePlayer.styled.js +2 -6
- package/cjs/components/material-video-file/useMaterialVideoFileApi.js +7 -15
- package/es/components/material-video-file/MaterialVideoFile.d.ts +1 -1
- package/es/components/material-video-file/MaterialVideoFile.js +35 -35
- package/es/components/material-video-file/MaterialVideoFile.styled.js +1 -1
- package/es/components/material-video-file/MaterialVideoFilePlayer.d.ts +0 -2
- package/es/components/material-video-file/MaterialVideoFilePlayer.js +42 -68
- package/es/components/material-video-file/MaterialVideoFilePlayer.styled.js +2 -2
- package/es/components/material-video-file/useMaterialVideoFileApi.js +7 -15
- package/package.json +12 -9
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -55
- package/cjs/components/material-video-file/index.js +0 -7
- package/cjs/components/material-video-file/locales/index.js +0 -13
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -48
- package/es/components/material-video-file/index.js +0 -1
- package/es/components/material-video-file/locales/index.js +0 -4
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
3
3
|
import type { MaterialVideoFilePlayerProps } from './MaterialVideoFilePlayer';
|
|
4
4
|
import type { UseMaterialVideoFileApiProps } from './useMaterialVideoFileApi';
|
|
5
|
-
type PickedVideoPlayerProps = Pick<MaterialVideoFilePlayerProps, 'materialVideoFileTrackerDisabled' | 'mainLecturePageId' | 'lms' | 'lmsOrganizationBusinessType' | 'emptyComponent' | 'autoPlay' | 'autoPlayNext' | 'endControl' | 'eliceVideoPlayerUrl' | 'onNavigatePreviousLecturePage' | 'onNavigateNextLecturePage'
|
|
5
|
+
type PickedVideoPlayerProps = Pick<MaterialVideoFilePlayerProps, 'materialVideoFileTrackerDisabled' | 'mainLecturePageId' | 'lms' | 'lmsOrganizationBusinessType' | 'emptyComponent' | 'autoPlay' | 'autoPlayNext' | 'endControl' | 'eliceVideoPlayerUrl' | 'onNavigatePreviousLecturePage' | 'onNavigateNextLecturePage'>;
|
|
6
6
|
export interface MaterialVideoFileProps extends PickedVideoPlayerProps, UseMaterialVideoFileApiProps {
|
|
7
7
|
materialVideoFileId: number;
|
|
8
8
|
className?: string;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var React = require('react');
|
|
8
7
|
var apiClient = require('@elice/api-client');
|
|
9
8
|
var intl = require('@elice/intl');
|
|
@@ -16,53 +15,49 @@ var MaterialVideoFilePlayer = require('./MaterialVideoFilePlayer.js');
|
|
|
16
15
|
var useMaterialVideoFileApi = require('./useMaterialVideoFileApi.js');
|
|
17
16
|
var MaterialVideoFile_styled = require('./MaterialVideoFile.styled.js');
|
|
18
17
|
|
|
19
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
22
|
-
var classnames__default = /*#__PURE__*/_interopDefaultCompat(classnames);
|
|
23
|
-
|
|
24
18
|
//
|
|
25
19
|
//
|
|
26
20
|
//
|
|
27
|
-
|
|
21
|
+
const MaterialVideoFile = _a => {
|
|
28
22
|
var _b, _c, _d, _e;
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
var {
|
|
24
|
+
materialVideoFileId,
|
|
25
|
+
className,
|
|
26
|
+
eliceAccountApiConfiguration,
|
|
27
|
+
__intl
|
|
28
|
+
} = _a,
|
|
33
29
|
playerProps = tslib.__rest(_a, ["materialVideoFileId", "className", "eliceAccountApiConfiguration", "__intl"]);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
orgNameShort
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
30
|
+
const prefixCls = 'em-material-video-file';
|
|
31
|
+
const {
|
|
32
|
+
orgNameShort
|
|
33
|
+
} = materialSharedUtils.useMaterialConfig();
|
|
34
|
+
const {
|
|
35
|
+
accountApi
|
|
36
|
+
} = useMaterialVideoFileApi.useMaterialVideoFileApi({
|
|
37
|
+
eliceAccountApiConfiguration
|
|
38
|
+
});
|
|
39
|
+
const {
|
|
40
|
+
materialVideoFile,
|
|
41
|
+
status: materialVideoFileStatus
|
|
42
|
+
} = materialSharedUtils.useMaterialFetch(types.enums.LectureMaterialType.VideoFile, React.useCallback(signal => apiClient.getOrgMaterialVideoFileGet({
|
|
43
|
+
materialVideoFileId
|
|
44
|
+
}, {
|
|
45
|
+
signal
|
|
46
|
+
}), [materialVideoFileId]), apiClient.config.init);
|
|
50
47
|
//
|
|
51
48
|
//
|
|
52
49
|
//
|
|
53
|
-
return
|
|
54
|
-
value: __intl
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
})
|
|
65
|
-
});
|
|
50
|
+
return React.createElement(intl.RawEliceIntlProvider, {
|
|
51
|
+
value: __intl
|
|
52
|
+
}, React.createElement(MaterialVideoFile_styled.StyledMaterialVideoFileWrap, {
|
|
53
|
+
className: classnames(prefixCls, className)
|
|
54
|
+
}, React.createElement(MaterialVideoFilePlayer.default, Object.assign({}, playerProps, {
|
|
55
|
+
orgNameShort: orgNameShort,
|
|
56
|
+
materialVideoFile: materialVideoFile !== null && materialVideoFile !== void 0 ? materialVideoFile : null,
|
|
57
|
+
materialVideoFileStatus: materialVideoFileStatus,
|
|
58
|
+
accountApi: accountApi,
|
|
59
|
+
title: (_e = (_c = (_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.cloudflareStream) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : (_d = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.azureMediaVideo) === null || _d === void 0 ? void 0 : _d.videoAssetName) !== null && _e !== void 0 ? _e : undefined
|
|
60
|
+
}))));
|
|
66
61
|
};
|
|
67
62
|
var MaterialVideoFile$1 = new intl.IntlComponentBuilder(MaterialVideoFile).add('en', en.default).add('ko', ko.default).addAsync('th', Promise.resolve().then(function () { return require('./locales/th.json.js'); })).addAsync('ja', Promise.resolve().then(function () { return require('./locales/ja.json.js'); })).build();
|
|
68
63
|
|
|
@@ -3,11 +3,7 @@
|
|
|
3
3
|
var designTokens = require('@elice/design-tokens');
|
|
4
4
|
var styled = require('styled-components');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
9
|
-
|
|
10
|
-
var StyledMaterialVideoFileWrap = styled__default.default.div.withConfig({
|
|
6
|
+
const StyledMaterialVideoFileWrap = styled.div.withConfig({
|
|
11
7
|
componentId: "sc-1a1otok-0"
|
|
12
8
|
})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;background:", ";"], designTokens.base.color.gray9);
|
|
13
9
|
|
|
@@ -38,8 +38,6 @@ export interface MaterialVideoFilePlayerProps extends UseMaterialVideoFileApiRet
|
|
|
38
38
|
onNavigatePreviousLecturePage?: () => void;
|
|
39
39
|
/** Navigate to next lecture page. */
|
|
40
40
|
onNavigateNextLecturePage?: () => void;
|
|
41
|
-
/** Toggle transcript. */
|
|
42
|
-
onTranscriptToggle?: (enabled: boolean) => void;
|
|
43
41
|
}
|
|
44
42
|
declare const MaterialVideoFilePlayer: React.FC<MaterialVideoFilePlayerProps>;
|
|
45
43
|
export default MaterialVideoFilePlayer;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
var blocks = require('@elice/blocks');
|
|
8
7
|
var intl = require('@elice/intl');
|
|
@@ -10,11 +9,6 @@ var types = require('@elice/types');
|
|
|
10
9
|
var classnames = require('classnames');
|
|
11
10
|
var MaterialVideoFilePlayer_styled = require('./MaterialVideoFilePlayer.styled.js');
|
|
12
11
|
|
|
13
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
-
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
|
-
var classnames__default = /*#__PURE__*/_interopDefaultCompat(classnames);
|
|
17
|
-
|
|
18
12
|
//
|
|
19
13
|
//
|
|
20
14
|
//
|
|
@@ -28,39 +22,31 @@ var VideoUploadStatus;
|
|
|
28
22
|
//
|
|
29
23
|
//
|
|
30
24
|
//
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
endControl = _ref$endControl === void 0 ? false : _ref$endControl,
|
|
50
|
-
eliceVideoPlayerUrl = _ref.eliceVideoPlayerUrl,
|
|
51
|
-
_ref$emptyComponent = _ref.emptyComponent,
|
|
52
|
-
emptyComponent = _ref$emptyComponent === void 0 ? null : _ref$emptyComponent,
|
|
53
|
-
onNavigatePreviousLecturePage = _ref.onNavigatePreviousLecturePage,
|
|
54
|
-
onNavigateNextLecturePage = _ref.onNavigateNextLecturePage,
|
|
55
|
-
_onTranscriptToggle = _ref.onTranscriptToggle,
|
|
56
|
-
accountApi = _ref.accountApi;
|
|
25
|
+
const MaterialVideoFilePlayer = ({
|
|
26
|
+
className,
|
|
27
|
+
materialVideoFile,
|
|
28
|
+
materialVideoFileStatus = 'idle',
|
|
29
|
+
materialVideoFileTrackerDisabled = false,
|
|
30
|
+
mainLecturePageId,
|
|
31
|
+
orgNameShort,
|
|
32
|
+
lms = false,
|
|
33
|
+
lmsOrganizationBusinessType = null,
|
|
34
|
+
autoPlay = false,
|
|
35
|
+
autoPlayNext = false,
|
|
36
|
+
endControl = false,
|
|
37
|
+
eliceVideoPlayerUrl,
|
|
38
|
+
emptyComponent = null,
|
|
39
|
+
onNavigatePreviousLecturePage,
|
|
40
|
+
onNavigateNextLecturePage,
|
|
41
|
+
accountApi
|
|
42
|
+
}) => {
|
|
57
43
|
var _a;
|
|
58
|
-
|
|
59
|
-
|
|
44
|
+
const prefixCls = 'em-video-player';
|
|
45
|
+
const intl$1 = intl.useRawEliceIntl();
|
|
60
46
|
/**
|
|
61
47
|
* Current video status.
|
|
62
48
|
*/
|
|
63
|
-
|
|
49
|
+
const materialVideoFileUploadStatus = React.useMemo(() => {
|
|
64
50
|
var _a, _b, _c;
|
|
65
51
|
// empty
|
|
66
52
|
if (typeof ((_a = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.cloudflareStream) === null || _a === void 0 ? void 0 : _a.status) === 'undefined' && typeof ((_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.azureMediaVideo) === null || _b === void 0 ? void 0 : _b.status) === 'undefined') {
|
|
@@ -100,47 +86,39 @@ var MaterialVideoFilePlayer = function MaterialVideoFilePlayer(_ref) {
|
|
|
100
86
|
//
|
|
101
87
|
// pending
|
|
102
88
|
if (materialVideoFileStatus === 'idle' || materialVideoFileStatus === 'pending') {
|
|
103
|
-
return
|
|
104
|
-
children: jsxRuntime.jsx(blocks.Spinner, {})
|
|
105
|
-
});
|
|
89
|
+
return React.createElement(MaterialVideoFilePlayer_styled.StyledVideoPlayerLoading, null, React.createElement(blocks.Spinner, null));
|
|
106
90
|
}
|
|
107
91
|
// rejected / empty video
|
|
108
92
|
if (materialVideoFileStatus === 'rejected' || materialVideoFileUploadStatus === VideoUploadStatus.Empty) {
|
|
109
|
-
return
|
|
93
|
+
return React.createElement(React.Fragment, {
|
|
110
94
|
children: emptyComponent
|
|
111
95
|
});
|
|
112
96
|
}
|
|
113
97
|
// encoding
|
|
114
98
|
if (materialVideoFileUploadStatus === VideoUploadStatus.Encoding) {
|
|
115
|
-
return
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
})
|
|
124
|
-
})]
|
|
125
|
-
});
|
|
99
|
+
return React.createElement(MaterialVideoFilePlayer_styled.StyledVideoPlayerLoading, null, React.createElement(blocks.Spinner, null), React.createElement(blocks.Text, {
|
|
100
|
+
role: "gray3",
|
|
101
|
+
lineHeight: 1.5,
|
|
102
|
+
textAlign: "center",
|
|
103
|
+
preWrap: true
|
|
104
|
+
}, intl$1.formatMessage({
|
|
105
|
+
id: 'videoFile.player.encoding'
|
|
106
|
+
})));
|
|
126
107
|
}
|
|
127
108
|
// encoding failed
|
|
128
109
|
if (materialVideoFileUploadStatus === VideoUploadStatus.EncodingFailed) {
|
|
129
|
-
return
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
})
|
|
138
|
-
})
|
|
139
|
-
});
|
|
110
|
+
return React.createElement(MaterialVideoFilePlayer_styled.StyledVideoPlayerLoading, null, React.createElement(blocks.Text, {
|
|
111
|
+
role: "gray3",
|
|
112
|
+
lineHeight: 1.5,
|
|
113
|
+
textAlign: "center",
|
|
114
|
+
preWrap: true
|
|
115
|
+
}, intl$1.formatMessage({
|
|
116
|
+
id: 'videoFile.player.encodingFailed'
|
|
117
|
+
})));
|
|
140
118
|
}
|
|
141
119
|
// resolved
|
|
142
|
-
return
|
|
143
|
-
className:
|
|
120
|
+
return React.createElement(MaterialVideoFilePlayer_styled.StyledVideoPlayer, {
|
|
121
|
+
className: classnames(prefixCls, className),
|
|
144
122
|
orgNameShort: orgNameShort !== null && orgNameShort !== void 0 ? orgNameShort : '',
|
|
145
123
|
materialVideoId: (_a = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.id) !== null && _a !== void 0 ? _a : 0,
|
|
146
124
|
linkedMaterialId: mainLecturePageId,
|
|
@@ -150,22 +128,13 @@ var MaterialVideoFilePlayer = function MaterialVideoFilePlayer(_ref) {
|
|
|
150
128
|
noEndControl: !endControl,
|
|
151
129
|
noTracker: materialVideoFileTrackerDisabled,
|
|
152
130
|
playerBaseUrl: eliceVideoPlayerUrl,
|
|
153
|
-
otp:
|
|
154
|
-
|
|
155
|
-
return res.otp;
|
|
156
|
-
});
|
|
157
|
-
},
|
|
158
|
-
onLecturePageNavigate: function onLecturePageNavigate(dir) {
|
|
131
|
+
otp: () => accountApi.auth.authOtpPost().then(res => res.otp),
|
|
132
|
+
onLecturePageNavigate: dir => {
|
|
159
133
|
if (dir === 'prev' && onNavigatePreviousLecturePage) {
|
|
160
134
|
onNavigatePreviousLecturePage();
|
|
161
135
|
} else if (dir === 'next' && onNavigateNextLecturePage) {
|
|
162
136
|
onNavigateNextLecturePage();
|
|
163
137
|
}
|
|
164
|
-
},
|
|
165
|
-
onTranscriptToggle: function onTranscriptToggle(enabled) {
|
|
166
|
-
if (typeof _onTranscriptToggle === 'function') {
|
|
167
|
-
_onTranscriptToggle(enabled);
|
|
168
|
-
}
|
|
169
138
|
}
|
|
170
139
|
});
|
|
171
140
|
};
|
|
@@ -3,14 +3,10 @@
|
|
|
3
3
|
var videoplayerClient = require('@elice/videoplayer-client');
|
|
4
4
|
var styled = require('styled-components');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
9
|
-
|
|
10
|
-
var StyledVideoPlayer = styled__default.default(videoplayerClient.EliceVideoplayer).withConfig({
|
|
6
|
+
const StyledVideoPlayer = styled(videoplayerClient.EliceVideoplayer).withConfig({
|
|
11
7
|
componentId: "sc-1ocq3lp-0"
|
|
12
8
|
})(["width:100%;height:100%;border:0;"]);
|
|
13
|
-
|
|
9
|
+
const StyledVideoPlayerLoading = styled.div.withConfig({
|
|
14
10
|
componentId: "sc-1ocq3lp-1"
|
|
15
11
|
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
16
12
|
|
|
@@ -1,35 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
4
3
|
var React = require('react');
|
|
5
4
|
var openapiClientAccount = require('@elice/openapi-client-account');
|
|
6
5
|
|
|
7
6
|
//
|
|
8
7
|
//
|
|
9
8
|
//
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const useMaterialVideoFileApi = props => {
|
|
10
|
+
const _return = React.useRef({});
|
|
12
11
|
//
|
|
13
12
|
//
|
|
14
13
|
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
};
|
|
14
|
+
const createAccountApi = () => Object.freeze({
|
|
15
|
+
auth: new openapiClientAccount.AuthApi(props.eliceAccountApiConfiguration)
|
|
16
|
+
});
|
|
20
17
|
//
|
|
21
18
|
//
|
|
22
19
|
//
|
|
23
|
-
|
|
24
|
-
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
|
25
|
-
accountApi = _useState2[0],
|
|
26
|
-
setAccountApi = _useState2[1];
|
|
20
|
+
const [accountApi, setAccountApi] = React.useState(createAccountApi);
|
|
27
21
|
//
|
|
28
22
|
//
|
|
29
23
|
//
|
|
30
|
-
React.useEffect(
|
|
31
|
-
return setAccountApi(createAccountApi);
|
|
32
|
-
},
|
|
24
|
+
React.useEffect(() => setAccountApi(createAccountApi),
|
|
33
25
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34
26
|
[props.eliceAccountApiConfiguration]);
|
|
35
27
|
//
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { WithIntlComponentBuilderProps } from '@elice/intl';
|
|
3
3
|
import type { MaterialVideoFilePlayerProps } from './MaterialVideoFilePlayer';
|
|
4
4
|
import type { UseMaterialVideoFileApiProps } from './useMaterialVideoFileApi';
|
|
5
|
-
type PickedVideoPlayerProps = Pick<MaterialVideoFilePlayerProps, 'materialVideoFileTrackerDisabled' | 'mainLecturePageId' | 'lms' | 'lmsOrganizationBusinessType' | 'emptyComponent' | 'autoPlay' | 'autoPlayNext' | 'endControl' | 'eliceVideoPlayerUrl' | 'onNavigatePreviousLecturePage' | 'onNavigateNextLecturePage'
|
|
5
|
+
type PickedVideoPlayerProps = Pick<MaterialVideoFilePlayerProps, 'materialVideoFileTrackerDisabled' | 'mainLecturePageId' | 'lms' | 'lmsOrganizationBusinessType' | 'emptyComponent' | 'autoPlay' | 'autoPlayNext' | 'endControl' | 'eliceVideoPlayerUrl' | 'onNavigatePreviousLecturePage' | 'onNavigateNextLecturePage'>;
|
|
6
6
|
export interface MaterialVideoFileProps extends PickedVideoPlayerProps, UseMaterialVideoFileApiProps {
|
|
7
7
|
materialVideoFileId: number;
|
|
8
8
|
className?: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __rest } from 'tslib';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { getOrgMaterialVideoFileGet, config } from '@elice/api-client';
|
|
5
4
|
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
@@ -15,45 +14,46 @@ import { StyledMaterialVideoFileWrap } from './MaterialVideoFile.styled.js';
|
|
|
15
14
|
//
|
|
16
15
|
//
|
|
17
16
|
//
|
|
18
|
-
|
|
17
|
+
const MaterialVideoFile = _a => {
|
|
19
18
|
var _b, _c, _d, _e;
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
var {
|
|
20
|
+
materialVideoFileId,
|
|
21
|
+
className,
|
|
22
|
+
eliceAccountApiConfiguration,
|
|
23
|
+
__intl
|
|
24
|
+
} = _a,
|
|
24
25
|
playerProps = __rest(_a, ["materialVideoFileId", "className", "eliceAccountApiConfiguration", "__intl"]);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
orgNameShort
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
const prefixCls = 'em-material-video-file';
|
|
27
|
+
const {
|
|
28
|
+
orgNameShort
|
|
29
|
+
} = useMaterialConfig();
|
|
30
|
+
const {
|
|
31
|
+
accountApi
|
|
32
|
+
} = useMaterialVideoFileApi({
|
|
33
|
+
eliceAccountApiConfiguration
|
|
34
|
+
});
|
|
35
|
+
const {
|
|
36
|
+
materialVideoFile,
|
|
37
|
+
status: materialVideoFileStatus
|
|
38
|
+
} = useMaterialFetch(enums.LectureMaterialType.VideoFile, React.useCallback(signal => getOrgMaterialVideoFileGet({
|
|
39
|
+
materialVideoFileId
|
|
40
|
+
}, {
|
|
41
|
+
signal
|
|
42
|
+
}), [materialVideoFileId]), config.init);
|
|
41
43
|
//
|
|
42
44
|
//
|
|
43
45
|
//
|
|
44
|
-
return
|
|
45
|
-
value: __intl
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
})
|
|
56
|
-
});
|
|
46
|
+
return React.createElement(RawEliceIntlProvider, {
|
|
47
|
+
value: __intl
|
|
48
|
+
}, React.createElement(StyledMaterialVideoFileWrap, {
|
|
49
|
+
className: classnames(prefixCls, className)
|
|
50
|
+
}, React.createElement(MaterialVideoFilePlayer, Object.assign({}, playerProps, {
|
|
51
|
+
orgNameShort: orgNameShort,
|
|
52
|
+
materialVideoFile: materialVideoFile !== null && materialVideoFile !== void 0 ? materialVideoFile : null,
|
|
53
|
+
materialVideoFileStatus: materialVideoFileStatus,
|
|
54
|
+
accountApi: accountApi,
|
|
55
|
+
title: (_e = (_c = (_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.cloudflareStream) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : (_d = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.azureMediaVideo) === null || _d === void 0 ? void 0 : _d.videoAssetName) !== null && _e !== void 0 ? _e : undefined
|
|
56
|
+
}))));
|
|
57
57
|
};
|
|
58
58
|
var MaterialVideoFile$1 = new IntlComponentBuilder(MaterialVideoFile).add('en', messageEn).add('ko', messageKo).addAsync('th', import('./locales/th.json.js')).addAsync('ja', import('./locales/ja.json.js')).build();
|
|
59
59
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { base } from '@elice/design-tokens';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const StyledMaterialVideoFileWrap = styled.div.withConfig({
|
|
5
5
|
componentId: "sc-1a1otok-0"
|
|
6
6
|
})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;background:", ";"], base.color.gray9);
|
|
7
7
|
|
|
@@ -38,8 +38,6 @@ export interface MaterialVideoFilePlayerProps extends UseMaterialVideoFileApiRet
|
|
|
38
38
|
onNavigatePreviousLecturePage?: () => void;
|
|
39
39
|
/** Navigate to next lecture page. */
|
|
40
40
|
onNavigateNextLecturePage?: () => void;
|
|
41
|
-
/** Toggle transcript. */
|
|
42
|
-
onTranscriptToggle?: (enabled: boolean) => void;
|
|
43
41
|
}
|
|
44
42
|
declare const MaterialVideoFilePlayer: React.FC<MaterialVideoFilePlayerProps>;
|
|
45
43
|
export default MaterialVideoFilePlayer;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Spinner, Text } from '@elice/blocks';
|
|
4
3
|
import { useRawEliceIntl } from '@elice/intl';
|
|
@@ -19,39 +18,31 @@ var VideoUploadStatus;
|
|
|
19
18
|
//
|
|
20
19
|
//
|
|
21
20
|
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
endControl = _ref$endControl === void 0 ? false : _ref$endControl,
|
|
41
|
-
eliceVideoPlayerUrl = _ref.eliceVideoPlayerUrl,
|
|
42
|
-
_ref$emptyComponent = _ref.emptyComponent,
|
|
43
|
-
emptyComponent = _ref$emptyComponent === void 0 ? null : _ref$emptyComponent,
|
|
44
|
-
onNavigatePreviousLecturePage = _ref.onNavigatePreviousLecturePage,
|
|
45
|
-
onNavigateNextLecturePage = _ref.onNavigateNextLecturePage,
|
|
46
|
-
_onTranscriptToggle = _ref.onTranscriptToggle,
|
|
47
|
-
accountApi = _ref.accountApi;
|
|
21
|
+
const MaterialVideoFilePlayer = ({
|
|
22
|
+
className,
|
|
23
|
+
materialVideoFile,
|
|
24
|
+
materialVideoFileStatus = 'idle',
|
|
25
|
+
materialVideoFileTrackerDisabled = false,
|
|
26
|
+
mainLecturePageId,
|
|
27
|
+
orgNameShort,
|
|
28
|
+
lms = false,
|
|
29
|
+
lmsOrganizationBusinessType = null,
|
|
30
|
+
autoPlay = false,
|
|
31
|
+
autoPlayNext = false,
|
|
32
|
+
endControl = false,
|
|
33
|
+
eliceVideoPlayerUrl,
|
|
34
|
+
emptyComponent = null,
|
|
35
|
+
onNavigatePreviousLecturePage,
|
|
36
|
+
onNavigateNextLecturePage,
|
|
37
|
+
accountApi
|
|
38
|
+
}) => {
|
|
48
39
|
var _a;
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
const prefixCls = 'em-video-player';
|
|
41
|
+
const intl = useRawEliceIntl();
|
|
51
42
|
/**
|
|
52
43
|
* Current video status.
|
|
53
44
|
*/
|
|
54
|
-
|
|
45
|
+
const materialVideoFileUploadStatus = React.useMemo(() => {
|
|
55
46
|
var _a, _b, _c;
|
|
56
47
|
// empty
|
|
57
48
|
if (typeof ((_a = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.cloudflareStream) === null || _a === void 0 ? void 0 : _a.status) === 'undefined' && typeof ((_b = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.azureMediaVideo) === null || _b === void 0 ? void 0 : _b.status) === 'undefined') {
|
|
@@ -91,46 +82,38 @@ var MaterialVideoFilePlayer = function MaterialVideoFilePlayer(_ref) {
|
|
|
91
82
|
//
|
|
92
83
|
// pending
|
|
93
84
|
if (materialVideoFileStatus === 'idle' || materialVideoFileStatus === 'pending') {
|
|
94
|
-
return
|
|
95
|
-
children: jsx(Spinner, {})
|
|
96
|
-
});
|
|
85
|
+
return React.createElement(StyledVideoPlayerLoading, null, React.createElement(Spinner, null));
|
|
97
86
|
}
|
|
98
87
|
// rejected / empty video
|
|
99
88
|
if (materialVideoFileStatus === 'rejected' || materialVideoFileUploadStatus === VideoUploadStatus.Empty) {
|
|
100
|
-
return
|
|
89
|
+
return React.createElement(React.Fragment, {
|
|
101
90
|
children: emptyComponent
|
|
102
91
|
});
|
|
103
92
|
}
|
|
104
93
|
// encoding
|
|
105
94
|
if (materialVideoFileUploadStatus === VideoUploadStatus.Encoding) {
|
|
106
|
-
return
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
})
|
|
115
|
-
})]
|
|
116
|
-
});
|
|
95
|
+
return React.createElement(StyledVideoPlayerLoading, null, React.createElement(Spinner, null), React.createElement(Text, {
|
|
96
|
+
role: "gray3",
|
|
97
|
+
lineHeight: 1.5,
|
|
98
|
+
textAlign: "center",
|
|
99
|
+
preWrap: true
|
|
100
|
+
}, intl.formatMessage({
|
|
101
|
+
id: 'videoFile.player.encoding'
|
|
102
|
+
})));
|
|
117
103
|
}
|
|
118
104
|
// encoding failed
|
|
119
105
|
if (materialVideoFileUploadStatus === VideoUploadStatus.EncodingFailed) {
|
|
120
|
-
return
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
})
|
|
129
|
-
})
|
|
130
|
-
});
|
|
106
|
+
return React.createElement(StyledVideoPlayerLoading, null, React.createElement(Text, {
|
|
107
|
+
role: "gray3",
|
|
108
|
+
lineHeight: 1.5,
|
|
109
|
+
textAlign: "center",
|
|
110
|
+
preWrap: true
|
|
111
|
+
}, intl.formatMessage({
|
|
112
|
+
id: 'videoFile.player.encodingFailed'
|
|
113
|
+
})));
|
|
131
114
|
}
|
|
132
115
|
// resolved
|
|
133
|
-
return
|
|
116
|
+
return React.createElement(StyledVideoPlayer, {
|
|
134
117
|
className: classnames(prefixCls, className),
|
|
135
118
|
orgNameShort: orgNameShort !== null && orgNameShort !== void 0 ? orgNameShort : '',
|
|
136
119
|
materialVideoId: (_a = materialVideoFile === null || materialVideoFile === void 0 ? void 0 : materialVideoFile.id) !== null && _a !== void 0 ? _a : 0,
|
|
@@ -141,22 +124,13 @@ var MaterialVideoFilePlayer = function MaterialVideoFilePlayer(_ref) {
|
|
|
141
124
|
noEndControl: !endControl,
|
|
142
125
|
noTracker: materialVideoFileTrackerDisabled,
|
|
143
126
|
playerBaseUrl: eliceVideoPlayerUrl,
|
|
144
|
-
otp:
|
|
145
|
-
|
|
146
|
-
return res.otp;
|
|
147
|
-
});
|
|
148
|
-
},
|
|
149
|
-
onLecturePageNavigate: function onLecturePageNavigate(dir) {
|
|
127
|
+
otp: () => accountApi.auth.authOtpPost().then(res => res.otp),
|
|
128
|
+
onLecturePageNavigate: dir => {
|
|
150
129
|
if (dir === 'prev' && onNavigatePreviousLecturePage) {
|
|
151
130
|
onNavigatePreviousLecturePage();
|
|
152
131
|
} else if (dir === 'next' && onNavigateNextLecturePage) {
|
|
153
132
|
onNavigateNextLecturePage();
|
|
154
133
|
}
|
|
155
|
-
},
|
|
156
|
-
onTranscriptToggle: function onTranscriptToggle(enabled) {
|
|
157
|
-
if (typeof _onTranscriptToggle === 'function') {
|
|
158
|
-
_onTranscriptToggle(enabled);
|
|
159
|
-
}
|
|
160
134
|
}
|
|
161
135
|
});
|
|
162
136
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EliceVideoplayer } from '@elice/videoplayer-client';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
const StyledVideoPlayer = styled(EliceVideoplayer).withConfig({
|
|
5
5
|
componentId: "sc-1ocq3lp-0"
|
|
6
6
|
})(["width:100%;height:100%;border:0;"]);
|
|
7
|
-
|
|
7
|
+
const StyledVideoPlayerLoading = styled.div.withConfig({
|
|
8
8
|
componentId: "sc-1ocq3lp-1"
|
|
9
9
|
})(["display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;height:100%;"]);
|
|
10
10
|
|
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { useRef, useState, useEffect } from 'react';
|
|
3
2
|
import { AuthApi } from '@elice/openapi-client-account';
|
|
4
3
|
|
|
5
4
|
//
|
|
6
5
|
//
|
|
7
6
|
//
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const useMaterialVideoFileApi = props => {
|
|
8
|
+
const _return = useRef({});
|
|
10
9
|
//
|
|
11
10
|
//
|
|
12
11
|
//
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
};
|
|
12
|
+
const createAccountApi = () => Object.freeze({
|
|
13
|
+
auth: new AuthApi(props.eliceAccountApiConfiguration)
|
|
14
|
+
});
|
|
18
15
|
//
|
|
19
16
|
//
|
|
20
17
|
//
|
|
21
|
-
|
|
22
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
23
|
-
accountApi = _useState2[0],
|
|
24
|
-
setAccountApi = _useState2[1];
|
|
18
|
+
const [accountApi, setAccountApi] = useState(createAccountApi);
|
|
25
19
|
//
|
|
26
20
|
//
|
|
27
21
|
//
|
|
28
|
-
useEffect(
|
|
29
|
-
return setAccountApi(createAccountApi);
|
|
30
|
-
},
|
|
22
|
+
useEffect(() => setAccountApi(createAccountApi),
|
|
31
23
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32
24
|
[props.eliceAccountApiConfiguration]);
|
|
33
25
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-video-file",
|
|
3
|
-
"version": "1.240718.
|
|
3
|
+
"version": "1.240718.1",
|
|
4
4
|
"description": "User view and editing components of Elice material video file",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "run-s watch",
|
|
19
19
|
"prebuild": "run-s clean",
|
|
20
|
-
"build": "
|
|
21
|
-
"
|
|
20
|
+
"build": "run-p build:es build:cjs",
|
|
21
|
+
"build:es": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es",
|
|
22
|
+
"build:cjs": "rollup -c ../../rollup.config.ts --configPlugin typescript -f cjs",
|
|
23
|
+
"watch": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es -w",
|
|
22
24
|
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
23
25
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
24
26
|
},
|
|
@@ -45,17 +47,17 @@
|
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
47
49
|
"@elice/api-client": "1.240619.0",
|
|
48
|
-
"@elice/blocks": "^1.
|
|
50
|
+
"@elice/blocks": "^1.240514.0",
|
|
49
51
|
"@elice/design-tokens": "^1.220803.0",
|
|
50
52
|
"@elice/icons": "^1.230814.0",
|
|
51
53
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
52
54
|
"@elice/intl": "0.240425.0-rc.2",
|
|
53
|
-
"@elice/material-shared-types": "1.240718.
|
|
54
|
-
"@elice/material-shared-utils": "1.240718.
|
|
55
|
+
"@elice/material-shared-types": "1.240718.1",
|
|
56
|
+
"@elice/material-shared-utils": "1.240718.1",
|
|
55
57
|
"@elice/messenger": "^1.240426.0",
|
|
56
58
|
"@elice/openapi-client-account": "^1.230814.0",
|
|
57
|
-
"@elice/types": "
|
|
58
|
-
"@elice/videoplayer-client": "^2.
|
|
59
|
+
"@elice/types": "1.240619.0",
|
|
60
|
+
"@elice/videoplayer-client": "^2.240618.1",
|
|
59
61
|
"@types/classnames": "^2.3.1",
|
|
60
62
|
"@types/query-string": "^6.3.0",
|
|
61
63
|
"@types/react": "~17.0.9",
|
|
@@ -63,5 +65,6 @@
|
|
|
63
65
|
"react": "^17.0.2",
|
|
64
66
|
"react-use": "^17.2.4",
|
|
65
67
|
"styled-components": "^5.3.0"
|
|
66
|
-
}
|
|
68
|
+
},
|
|
69
|
+
"gitHead": "c1b2b8f98c5eed547941a327188a09f6ed21f6e4"
|
|
67
70
|
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _iterableToArrayLimit(arr, i) {
|
|
4
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
5
|
-
if (null != _i) {
|
|
6
|
-
var _s,
|
|
7
|
-
_e,
|
|
8
|
-
_x,
|
|
9
|
-
_r,
|
|
10
|
-
_arr = [],
|
|
11
|
-
_n = !0,
|
|
12
|
-
_d = !1;
|
|
13
|
-
try {
|
|
14
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) ; else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
15
|
-
} catch (err) {
|
|
16
|
-
_d = !0, _e = err;
|
|
17
|
-
} finally {
|
|
18
|
-
try {
|
|
19
|
-
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
20
|
-
} finally {
|
|
21
|
-
if (_d) throw _e;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
return _arr;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function _slicedToArray(arr, i) {
|
|
28
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
29
|
-
}
|
|
30
|
-
function _arrayWithHoles(arr) {
|
|
31
|
-
if (Array.isArray(arr)) return arr;
|
|
32
|
-
}
|
|
33
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
34
|
-
if (!o) return;
|
|
35
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
36
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
37
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
38
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
39
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
40
|
-
}
|
|
41
|
-
function _arrayLikeToArray(arr, len) {
|
|
42
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
43
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
44
|
-
return arr2;
|
|
45
|
-
}
|
|
46
|
-
function _nonIterableRest() {
|
|
47
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
exports.arrayLikeToArray = _arrayLikeToArray;
|
|
51
|
-
exports.arrayWithHoles = _arrayWithHoles;
|
|
52
|
-
exports.iterableToArrayLimit = _iterableToArrayLimit;
|
|
53
|
-
exports.nonIterableRest = _nonIterableRest;
|
|
54
|
-
exports.slicedToArray = _slicedToArray;
|
|
55
|
-
exports.unsupportedIterableToArray = _unsupportedIterableToArray;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var en = require('./en.json.js');
|
|
4
|
-
var ko = require('./ko.json.js');
|
|
5
|
-
var th = require('./th.json.js');
|
|
6
|
-
var ja = require('./ja.json.js');
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
exports.messageEn = en.default;
|
|
11
|
-
exports.messageKo = ko.default;
|
|
12
|
-
exports.messageTh = th.default;
|
|
13
|
-
exports.messageJa = ja.default;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
function _iterableToArrayLimit(arr, i) {
|
|
2
|
-
var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3
|
-
if (null != _i) {
|
|
4
|
-
var _s,
|
|
5
|
-
_e,
|
|
6
|
-
_x,
|
|
7
|
-
_r,
|
|
8
|
-
_arr = [],
|
|
9
|
-
_n = !0,
|
|
10
|
-
_d = !1;
|
|
11
|
-
try {
|
|
12
|
-
if (_x = (_i = _i.call(arr)).next, 0 === i) ; else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
|
|
13
|
-
} catch (err) {
|
|
14
|
-
_d = !0, _e = err;
|
|
15
|
-
} finally {
|
|
16
|
-
try {
|
|
17
|
-
if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return;
|
|
18
|
-
} finally {
|
|
19
|
-
if (_d) throw _e;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return _arr;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function _slicedToArray(arr, i) {
|
|
26
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
27
|
-
}
|
|
28
|
-
function _arrayWithHoles(arr) {
|
|
29
|
-
if (Array.isArray(arr)) return arr;
|
|
30
|
-
}
|
|
31
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
32
|
-
if (!o) return;
|
|
33
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
34
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
35
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
36
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
37
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
38
|
-
}
|
|
39
|
-
function _arrayLikeToArray(arr, len) {
|
|
40
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
41
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
42
|
-
return arr2;
|
|
43
|
-
}
|
|
44
|
-
function _nonIterableRest() {
|
|
45
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _slicedToArray as slicedToArray, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as MaterialVideoFile } from './MaterialVideoFile.js';
|