@instructure/studio-player 0.5.0 → 0.5.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.
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { MutableRefObject, RefCallback } from 'react';
|
|
2
|
+
import { MediaPlayerInstance, MediaPlayerProps } from '@vidstack/react';
|
|
3
|
+
import { StudioPlayerLanguage } from '../languageTypes';
|
|
4
|
+
import { Annotation, CaptionMetaData, CaptionOffsetOverride, Comment, InteractiveMenuElement, KebabMenuElement, QuizMarker } from '../types';
|
|
5
|
+
export type Defined<T> = Exclude<T, undefined>;
|
|
6
|
+
export type StudioPlayerProps = {
|
|
7
|
+
title: string;
|
|
8
|
+
playerRef?: MutableRefObject<MediaPlayerInstance | null> | RefCallback<MediaPlayerInstance | null>;
|
|
9
|
+
src: MediaPlayerProps['src'];
|
|
10
|
+
captions?: CaptionMetaData[];
|
|
11
|
+
thumbnail?: string;
|
|
12
|
+
hideFullScreen?: boolean;
|
|
13
|
+
comments?: Comment[];
|
|
14
|
+
locale?: StudioPlayerLanguage;
|
|
15
|
+
annotations?: Annotation[];
|
|
16
|
+
quizMarkers?: QuizMarker[];
|
|
17
|
+
interactive?: boolean;
|
|
18
|
+
onAnnotationClick?: (annotation: Annotation) => void;
|
|
19
|
+
onQuizMarkerClick?: (quizMarkers: QuizMarker[]) => void;
|
|
20
|
+
/** Handler called whenever player reaches time defined in quizMarkers array */
|
|
21
|
+
onQuizMarkerShow?: (quizMarker: QuizMarker, playerIsPlaying: boolean) => void;
|
|
22
|
+
onInteractivePinClick?: (time: number) => void;
|
|
23
|
+
/** Define time ranges on the actual media timeline where interactive pin should not be displayed */
|
|
24
|
+
disableInteractivePinRanges?: [number, number][];
|
|
25
|
+
interactiveMenuElements?: InteractiveMenuElement[];
|
|
26
|
+
kebabMenuElements?: KebabMenuElement[];
|
|
27
|
+
darkMode?: boolean;
|
|
28
|
+
/** Player with auto load and display given caption if src is given */
|
|
29
|
+
autoLoadCaptionSrc?: CaptionMetaData['src'];
|
|
30
|
+
forceComments?: boolean;
|
|
31
|
+
/** Should player disable any caption related UI from player or not */
|
|
32
|
+
disableCaptionSettings?: boolean;
|
|
33
|
+
disableStorage?: boolean;
|
|
34
|
+
/** Specify to start video playback at a given time */
|
|
35
|
+
startAt?: number;
|
|
36
|
+
crossOrigin?: MediaPlayerProps['crossOrigin'];
|
|
37
|
+
/** Allows customization of the caption position offset. You can override the offset for both the bottom and top positions, or just one. Not specified will use players default. */
|
|
38
|
+
captionOffsetOverride?: Partial<CaptionOffsetOverride>;
|
|
39
|
+
/** Allows setting up an overlay for user */
|
|
40
|
+
customOverlay?: () => JSX.Element;
|
|
41
|
+
onCaptionsDelete?: (caption: CaptionMetaData) => void;
|
|
42
|
+
controlsLayout?: 'normal' | 'compact';
|
|
43
|
+
};
|
package/dist/index.d.ts
CHANGED
package/dist/studio-player.es.js
CHANGED