@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
@@ -1,4 +1,5 @@
1
1
  export * from './StudioPlayer/StudioPlayer';
2
+ export * from './StudioPlayer/StudioPlayer.types';
2
3
  export * from './types';
3
4
  export * from './constants';
4
5
  export * from './languageTypes';
@@ -2293,7 +2293,7 @@ function Ii({
2293
2293
  children: /* @__PURE__ */ n(Et, { contextValue: le, children: /* @__PURE__ */ r(
2294
2294
  kt,
2295
2295
  {
2296
- "data-version": "0.5.0",
2296
+ "data-version": "0.5.1",
2297
2297
  crossOrigin: et,
2298
2298
  storage: j ? null : it,
2299
2299
  title: e,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/studio-player",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "private": false,
5
5
  "description": "Next generation media player for Instructure",
6
6
  "module": "./dist/studio-player.es.js",