@instructure/studio-player 0.1.1 → 0.1.4

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.
Files changed (54) hide show
  1. package/dist/StudioPlayer/useStudioPlayer.d.ts +9 -0
  2. package/dist/index.css +1 -1
  3. package/dist/studio-player.es.js +1127 -4
  4. package/dist/types.d.ts +1 -0
  5. package/package.json +16 -14
  6. package/dist/StudioPlayer/StudioPlayerContext.d.ts +0 -11
  7. package/dist/StudioPlayer/components/BufferingIndicator/BufferingIndicator.d.ts +0 -1
  8. package/dist/StudioPlayer/components/CaptionsButton/CaptionsButton.d.ts +0 -1
  9. package/dist/StudioPlayer/components/CaptionsOverlay/CaptionsOverlay.d.ts +0 -5
  10. package/dist/StudioPlayer/components/ControlsLayout/ControlsLayout.d.ts +0 -1
  11. package/dist/StudioPlayer/components/CustomSettingsMenu/CustomSettingsMenu.d.ts +0 -1
  12. package/dist/StudioPlayer/components/CustomSettingsMenu/CustomSettingsMenuContext.d.ts +0 -8
  13. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/CaptionsMenu/CaptionsFontSizeMenu.d.ts +0 -1
  14. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/CaptionsMenu/CaptionsLanguageMenu.d.ts +0 -1
  15. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/CaptionsMenu/CaptionsMenu.d.ts +0 -1
  16. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/MainMenu/MainMenu.d.ts +0 -1
  17. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/QualityMenu/QualityMenu.d.ts +0 -1
  18. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/SpeedMenu/SpeedMenu.d.ts +0 -1
  19. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/buttons/BaseButton.d.ts +0 -8
  20. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/buttons/CaptionsButton.d.ts +0 -1
  21. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/buttons/CaptionsFontSizeButton.d.ts +0 -1
  22. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/buttons/CaptionsLanguageButton.d.ts +0 -1
  23. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/buttons/QualityButton.d.ts +0 -1
  24. package/dist/StudioPlayer/components/CustomSettingsMenu/menus/buttons/SpeedButton.d.ts +0 -1
  25. package/dist/StudioPlayer/components/CustomSettingsMenu/useCustomSettingsMenu.d.ts +0 -18
  26. package/dist/StudioPlayer/components/FeedbackOverlay/FeedbackIcon.d.ts +0 -1
  27. package/dist/StudioPlayer/components/FeedbackOverlay/FeedbackMessage.d.ts +0 -1
  28. package/dist/StudioPlayer/components/FeedbackOverlay/FeedbackOverlay.d.ts +0 -1
  29. package/dist/StudioPlayer/components/FeedbackOverlay/createFeedbackComponent.d.ts +0 -1
  30. package/dist/StudioPlayer/components/FullscreenButton/FullscreenButton.d.ts +0 -1
  31. package/dist/StudioPlayer/components/GesturesContainer/GesturesContainer.d.ts +0 -1
  32. package/dist/StudioPlayer/components/PlayPauseButton/PlayPauseButton.d.ts +0 -1
  33. package/dist/StudioPlayer/components/PosterContainer/PosterContainer.d.ts +0 -4
  34. package/dist/StudioPlayer/components/SmallLayoutOverlay/SmallLayoutOverlay.d.ts +0 -1
  35. package/dist/StudioPlayer/components/TimeIndicator/TimeIndicator.d.ts +0 -1
  36. package/dist/StudioPlayer/components/TimeLine/TimeLine.d.ts +0 -4
  37. package/dist/StudioPlayer/components/VolumeMenu/VolumeMenu.d.ts +0 -1
  38. package/dist/StudioPlayer/components/index.d.ts +0 -14
  39. package/dist/StudioPlayer/shortcuts.d.ts +0 -2
  40. package/dist/errors-DCJKAXTz.js +0 -70
  41. package/dist/index-BM9a_WKH.js +0 -33480
  42. package/dist/prod-DTLJXtPo.js +0 -994
  43. package/dist/srt-parser-CWqahKwO.js +0 -27
  44. package/dist/ssa-parser-BqjjKy4M.js +0 -209
  45. package/dist/vidstack-B-YW57m0-DZMwUKSQ.js +0 -140
  46. package/dist/vidstack-BFbyAy5g-DqVWIlTG.js +0 -378
  47. package/dist/vidstack-BGEqnOoX-BiZsT73r.js +0 -434
  48. package/dist/vidstack-CC0Rsbn0-Cf76Gp3K.js +0 -32
  49. package/dist/vidstack-CbSFenOv-DX2VhxT6.js +0 -60
  50. package/dist/vidstack-D2cUZes0-BnrvKkrf.js +0 -237
  51. package/dist/vidstack-Xu8hy52p-DHV2kI-e.js +0 -323
  52. package/dist/vidstack-Zc3I7oOd-DDsBgkhs.js +0 -31
  53. package/dist/vidstack-krOAtKMi-B4IZWKdc.js +0 -29
  54. /package/dist/StudioPlayer/{components/CustomSettingsMenu → hooks}/useCallbackOnEsc.d.ts +0 -0
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export type { VideoMimeType } from '@vidstack/react';
1
2
  export type CaptionMetaData = {
2
3
  src: string;
3
4
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/studio-player",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "private": false,
5
5
  "description": "Next generation media player for Instructure",
6
6
  "module": "./dist/studio-player.es.js",
@@ -11,9 +11,22 @@
11
11
  ],
12
12
  "exports": {
13
13
  ".": {
14
- "import": "./dist/studio-player.es.js"
14
+ "import": "./dist/studio-player.es.js",
15
+ "types": "./dist/index.d.ts"
15
16
  }
16
17
  },
18
+ "scripts": {
19
+ "build": "vite build",
20
+ "build-storybook": "storybook build",
21
+ "check:types": "tsc --noEmit",
22
+ "lint": "pnpm check:types && eslint",
23
+ "storybook": "storybook dev -p 6006",
24
+ "test": "vitest",
25
+ "test:ci": "vitest --reporter=basic --disable-console-intercept --no-watch",
26
+ "stylelint": "stylelint 'src/**/*.css'",
27
+ "stylelint:fix": "stylelint 'src/**/*.css' --fix",
28
+ "prepare": "husky"
29
+ },
17
30
  "lint-staged": {
18
31
  "*.css": "pnpm stylelint"
19
32
  },
@@ -63,16 +76,5 @@
63
76
  "@vidstack/react": "^1.12.11",
64
77
  "react": "^18.3.1",
65
78
  "react-dom": "^18.3.1"
66
- },
67
- "scripts": {
68
- "build": "vite build",
69
- "build-storybook": "storybook build",
70
- "check:types": "tsc --noEmit",
71
- "lint": "pnpm check:types && eslint",
72
- "storybook": "storybook dev -p 6006",
73
- "test": "vitest",
74
- "test:ci": "vitest --reporter=basic --disable-console-intercept --no-watch",
75
- "stylelint": "stylelint 'src/**/*.css'",
76
- "stylelint:fix": "stylelint 'src/**/*.css' --fix"
77
79
  }
78
- }
80
+ }
@@ -1,11 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- import { CAPTION_FONT_SIZE_MULTIPLIERS } from '@/constants';
3
- export type StudioPlayerState = {
4
- captionsFontSizeMultiplier: (typeof CAPTION_FONT_SIZE_MULTIPLIERS)[number];
5
- };
6
- export type StudioPlayerContextType = {
7
- hideFullScreen: boolean;
8
- state: StudioPlayerState;
9
- setState: Dispatch<SetStateAction<StudioPlayerState>>;
10
- };
11
- export declare const StudioPlayerContext: import('react').Context<StudioPlayerContextType | null>;
@@ -1 +0,0 @@
1
- export declare function BufferingIndicator(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function CaptionsButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,5 +0,0 @@
1
- import { CaptionMetaData } from '@/types';
2
- export type CaptionsOverlayProps = {
3
- captions: CaptionMetaData[];
4
- };
5
- export declare function CaptionsOverlay({ captions }: CaptionsOverlayProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function ControlsLayout(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function CustomSettingsMenu(): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- import { SettingsMenuState } from './useCustomSettingsMenu';
2
- export type CustomSettingsMenuContextType = {
3
- setPage: (page: SettingsMenuState) => void;
4
- backToMain: () => void;
5
- backToCaptions: () => void;
6
- toggle: () => void;
7
- };
8
- export declare const CustomSettingsMenuContext: import('react').Context<CustomSettingsMenuContextType | null>;
@@ -1 +0,0 @@
1
- export declare function CaptionsFontSizeMenu(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function CaptionsLanguageMenu(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function CaptionsMenu(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function MainMenu(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function QualityMenu(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function SpeedMenu(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,8 +0,0 @@
1
- type BaseButtonProps = {
2
- label: string;
3
- hint: string;
4
- onClick: () => void;
5
- Icon?: (props: React.SVGProps<SVGSVGElement>) => React.ReactElement;
6
- };
7
- export declare function BaseButton({ label, hint, onClick, Icon }: BaseButtonProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1 +0,0 @@
1
- export declare function CaptionsButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function CaptionsFontSizeButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function CaptionsLanguageButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function QualityButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function SpeedButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,18 +0,0 @@
1
- import { useFloating, useInteractions } from '@floating-ui/react';
2
- export type SettingsMenuState = 'main' | 'speed' | 'captions' | 'captionLanguage' | 'captionFontSize' | 'quality';
3
- type useCustomSettingsMenuReturnType = {
4
- Page: React.FunctionComponent;
5
- open: boolean;
6
- toggle: () => void;
7
- setPage: (page: SettingsMenuState) => void;
8
- backToCaptions: () => void;
9
- backToMain: () => void;
10
- arrowRef: React.LegacyRef<SVGSVGElement> | undefined;
11
- refs: ReturnType<typeof useFloating>['refs'];
12
- floatingStyles: ReturnType<typeof useFloating>['floatingStyles'];
13
- context: ReturnType<typeof useFloating>['context'];
14
- getReferenceProps: ReturnType<typeof useInteractions>['getReferenceProps'];
15
- getFloatingProps: ReturnType<typeof useInteractions>['getFloatingProps'];
16
- };
17
- export declare function useCustomSettingsMenu(): useCustomSettingsMenuReturnType;
18
- export {};
@@ -1 +0,0 @@
1
- export declare function FeedbackIcon(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function FeedbackMessage(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function FeedbackOverlay(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function createFeedbackComponent(Component: React.FunctionComponent, timeout?: number): () => import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function FullscreenButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function GesturesContainer(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function PlayPauseButton(): import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +0,0 @@
1
- export type PosterContainerProps = {
2
- src?: string | null;
3
- };
4
- export declare function PosterContainer({ src }: PosterContainerProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare function SmallLayoutOverlay(): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function TimeIndicator(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export type TimeLineProps = {
2
- className?: string;
3
- };
4
- export declare function TimeLine({ className }: TimeLineProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function VolumeMenu(): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +0,0 @@
1
- export * from './BufferingIndicator/BufferingIndicator';
2
- export * from './CaptionsButton/CaptionsButton';
3
- export * from './CaptionsOverlay/CaptionsOverlay';
4
- export * from './ControlsLayout/ControlsLayout';
5
- export * from './CustomSettingsMenu/CustomSettingsMenu';
6
- export * from './FeedbackOverlay/FeedbackOverlay';
7
- export * from './FullscreenButton/FullscreenButton';
8
- export * from './GesturesContainer/GesturesContainer';
9
- export * from './PlayPauseButton/PlayPauseButton';
10
- export * from './PosterContainer/PosterContainer';
11
- export * from './SmallLayoutOverlay/SmallLayoutOverlay';
12
- export * from './TimeIndicator/TimeIndicator';
13
- export * from './TimeLine/TimeLine';
14
- export * from './VolumeMenu/VolumeMenu';
@@ -1,2 +0,0 @@
1
- import { MediaKeyShortcuts } from '@vidstack/react';
2
- export declare const keyShortcuts: MediaKeyShortcuts;
@@ -1,70 +0,0 @@
1
- import { P as a, c as t } from "./prod-DTLJXtPo.js";
2
- const i = {
3
- r() {
4
- return new a({
5
- code: t.BadSignature,
6
- reason: "missing WEBVTT file header",
7
- line: 1
8
- });
9
- },
10
- s(n, e) {
11
- return new a({
12
- code: t.BadTimestamp,
13
- reason: `cue start timestamp \`${n}\` is invalid on line ${e}`,
14
- line: e
15
- });
16
- },
17
- t(n, e) {
18
- return new a({
19
- code: t.BadTimestamp,
20
- reason: `cue end timestamp \`${n}\` is invalid on line ${e}`,
21
- line: e
22
- });
23
- },
24
- u(n, e, r) {
25
- return new a({
26
- code: t.BadTimestamp,
27
- reason: `cue end timestamp \`${e}\` is greater than start \`${n}\` on line ${r}`,
28
- line: r
29
- });
30
- },
31
- y(n, e, r) {
32
- return new a({
33
- code: t.BadSettingValue,
34
- reason: `invalid value for cue setting \`${n}\` on line ${r} (value: ${e})`,
35
- line: r
36
- });
37
- },
38
- x(n, e, r) {
39
- return new a({
40
- code: t.UnknownSetting,
41
- reason: `unknown cue setting \`${n}\` on line ${r} (value: ${e})`,
42
- line: r
43
- });
44
- },
45
- w(n, e, r) {
46
- return new a({
47
- code: t.BadSettingValue,
48
- reason: `invalid value for region setting \`${n}\` on line ${r} (value: ${e})`,
49
- line: r
50
- });
51
- },
52
- v(n, e, r) {
53
- return new a({
54
- code: t.UnknownSetting,
55
- reason: `unknown region setting \`${n}\` on line ${r} (value: ${e})`,
56
- line: r
57
- });
58
- },
59
- // SSA-specific errors
60
- T(n, e) {
61
- return new a({
62
- code: t.BadFormat,
63
- reason: `format missing for \`${n}\` block on line ${e}`,
64
- line: e
65
- });
66
- }
67
- };
68
- export {
69
- i as ParseErrorBuilder
70
- };