@elice/material-video-file 1.240716.0 → 1.240718.0-trasncript.0
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/MaterialVideoFilePlayer.d.ts +2 -0
- package/cjs/components/material-video-file/MaterialVideoFilePlayer.js +6 -0
- package/es/components/material-video-file/MaterialVideoFile.d.ts +1 -1
- package/es/components/material-video-file/MaterialVideoFilePlayer.d.ts +2 -0
- package/es/components/material-video-file/MaterialVideoFilePlayer.js +6 -0
- package/package.json +5 -5
|
@@ -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' | 'onTranscriptToggle'>;
|
|
6
6
|
export interface MaterialVideoFileProps extends PickedVideoPlayerProps, UseMaterialVideoFileApiProps {
|
|
7
7
|
materialVideoFileId: number;
|
|
8
8
|
className?: string;
|
|
@@ -38,6 +38,8 @@ 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;
|
|
41
43
|
}
|
|
42
44
|
declare const MaterialVideoFilePlayer: React.FC<MaterialVideoFilePlayerProps>;
|
|
43
45
|
export default MaterialVideoFilePlayer;
|
|
@@ -38,6 +38,7 @@ const MaterialVideoFilePlayer = ({
|
|
|
38
38
|
emptyComponent = null,
|
|
39
39
|
onNavigatePreviousLecturePage,
|
|
40
40
|
onNavigateNextLecturePage,
|
|
41
|
+
onTranscriptToggle,
|
|
41
42
|
accountApi
|
|
42
43
|
}) => {
|
|
43
44
|
var _a;
|
|
@@ -135,6 +136,11 @@ const MaterialVideoFilePlayer = ({
|
|
|
135
136
|
} else if (dir === 'next' && onNavigateNextLecturePage) {
|
|
136
137
|
onNavigateNextLecturePage();
|
|
137
138
|
}
|
|
139
|
+
},
|
|
140
|
+
onTranscriptToggle: enabled => {
|
|
141
|
+
if (typeof onTranscriptToggle === 'function') {
|
|
142
|
+
onTranscriptToggle(enabled);
|
|
143
|
+
}
|
|
138
144
|
}
|
|
139
145
|
});
|
|
140
146
|
};
|
|
@@ -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' | 'onTranscriptToggle'>;
|
|
6
6
|
export interface MaterialVideoFileProps extends PickedVideoPlayerProps, UseMaterialVideoFileApiProps {
|
|
7
7
|
materialVideoFileId: number;
|
|
8
8
|
className?: string;
|
|
@@ -38,6 +38,8 @@ 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;
|
|
41
43
|
}
|
|
42
44
|
declare const MaterialVideoFilePlayer: React.FC<MaterialVideoFilePlayerProps>;
|
|
43
45
|
export default MaterialVideoFilePlayer;
|
|
@@ -34,6 +34,7 @@ const MaterialVideoFilePlayer = ({
|
|
|
34
34
|
emptyComponent = null,
|
|
35
35
|
onNavigatePreviousLecturePage,
|
|
36
36
|
onNavigateNextLecturePage,
|
|
37
|
+
onTranscriptToggle,
|
|
37
38
|
accountApi
|
|
38
39
|
}) => {
|
|
39
40
|
var _a;
|
|
@@ -131,6 +132,11 @@ const MaterialVideoFilePlayer = ({
|
|
|
131
132
|
} else if (dir === 'next' && onNavigateNextLecturePage) {
|
|
132
133
|
onNavigateNextLecturePage();
|
|
133
134
|
}
|
|
135
|
+
},
|
|
136
|
+
onTranscriptToggle: enabled => {
|
|
137
|
+
if (typeof onTranscriptToggle === 'function') {
|
|
138
|
+
onTranscriptToggle(enabled);
|
|
139
|
+
}
|
|
134
140
|
}
|
|
135
141
|
});
|
|
136
142
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-video-file",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240718.0-trasncript.0",
|
|
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",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"@elice/icons": "^1.230814.0",
|
|
53
53
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
54
54
|
"@elice/intl": "0.240425.0-rc.2",
|
|
55
|
-
"@elice/material-shared-types": "1.
|
|
56
|
-
"@elice/material-shared-utils": "1.
|
|
55
|
+
"@elice/material-shared-types": "1.240718.0-trasncript.0",
|
|
56
|
+
"@elice/material-shared-utils": "1.240718.0-trasncript.0",
|
|
57
57
|
"@elice/messenger": "^1.240426.0",
|
|
58
58
|
"@elice/openapi-client-account": "^1.230814.0",
|
|
59
59
|
"@elice/types": "1.240619.0",
|
|
60
|
-
"@elice/videoplayer-client": "^2.
|
|
60
|
+
"@elice/videoplayer-client": "^2.240717.0-transcript.0",
|
|
61
61
|
"@types/classnames": "^2.3.1",
|
|
62
62
|
"@types/query-string": "^6.3.0",
|
|
63
63
|
"@types/react": "~17.0.9",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-use": "^17.2.4",
|
|
67
67
|
"styled-components": "^5.3.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "832dc77a5e38ff02e0bfec8905a3a9706b9b9593"
|
|
70
70
|
}
|