@symbiote-native/video 0.0.0-stage → 0.1.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.
Files changed (141) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +240 -2
  3. package/build/angular/index.d.ts +4 -0
  4. package/build/angular/index.js +5 -0
  5. package/build/angular/inject-video-player.d.ts +4 -0
  6. package/build/angular/inject-video-player.js +6 -0
  7. package/build/angular/video-airplay-button/index.d.ts +12 -0
  8. package/build/angular/video-airplay-button/index.js +78 -0
  9. package/build/angular/video-view/index.d.ts +17 -0
  10. package/build/angular/video-view/index.js +97 -0
  11. package/build/core/constants.d.ts +12 -0
  12. package/build/core/constants.js +13 -0
  13. package/build/core/index.d.ts +10 -0
  14. package/build/core/index.js +8 -0
  15. package/build/core/native-module.d.ts +10 -0
  16. package/build/core/native-module.js +3 -0
  17. package/build/core/player-types.d.ts +221 -0
  18. package/build/core/player-types.js +1 -0
  19. package/build/core/video-airplay-button.d.ts +4 -0
  20. package/build/core/video-airplay-button.js +29 -0
  21. package/build/core/video-module.d.ts +12 -0
  22. package/build/core/video-module.js +21 -0
  23. package/build/core/video-player-controller.d.ts +15 -0
  24. package/build/core/video-player-controller.js +21 -0
  25. package/build/core/video-player.d.ts +7 -0
  26. package/build/core/video-player.js +22 -0
  27. package/build/core/video-source.d.ts +3 -0
  28. package/build/core/video-source.js +20 -0
  29. package/build/core/video-thumbnail.d.ts +4 -0
  30. package/build/core/video-thumbnail.js +3 -0
  31. package/build/core/video-view.d.ts +18 -0
  32. package/build/core/video-view.js +63 -0
  33. package/build/core/view-types.d.ts +90 -0
  34. package/build/core/view-types.js +1 -0
  35. package/build/react/index.d.ts +4 -0
  36. package/build/react/index.js +4 -0
  37. package/build/react/use-video-player.d.ts +7 -0
  38. package/build/react/use-video-player.js +11 -0
  39. package/build/react/video-view.d.ts +13 -0
  40. package/build/react/video-view.js +10 -0
  41. package/build/solid/index.d.ts +3 -0
  42. package/build/solid/index.js +4 -0
  43. package/build/solid/use-video-player.d.ts +8 -0
  44. package/build/solid/use-video-player.js +11 -0
  45. package/build/solid/video-view.d.ts +33 -0
  46. package/build/solid/video-view.js +6 -0
  47. package/build/svelte/index.d.ts +5 -0
  48. package/build/svelte/index.js +5 -0
  49. package/build/svelte/use-video-player.svelte.d.ts +10 -0
  50. package/build/svelte/use-video-player.svelte.js +15 -0
  51. package/build/svelte/video-airplay-button.svelte +12 -0
  52. package/build/svelte/video-airplay-button.svelte.d.ts +4 -0
  53. package/build/svelte/video-view.svelte +25 -0
  54. package/build/svelte/video-view.svelte.d.ts +9 -0
  55. package/build/vue/index.d.ts +3 -0
  56. package/build/vue/index.js +4 -0
  57. package/build/vue/use-video-player.d.ts +8 -0
  58. package/build/vue/use-video-player.js +16 -0
  59. package/build/vue/video-view.d.ts +5 -0
  60. package/build/vue/video-view.js +14 -0
  61. package/build-ngc/angular/index.d.ts +4 -0
  62. package/build-ngc/angular/index.js +6 -0
  63. package/build-ngc/angular/index.js.map +1 -0
  64. package/build-ngc/angular/inject-video-player.d.ts +4 -0
  65. package/build-ngc/angular/inject-video-player.js +7 -0
  66. package/build-ngc/angular/inject-video-player.js.map +1 -0
  67. package/build-ngc/angular/video-airplay-button/index.d.ts +15 -0
  68. package/build-ngc/angular/video-airplay-button/index.js +37 -0
  69. package/build-ngc/angular/video-airplay-button/index.js.map +1 -0
  70. package/build-ngc/angular/video-view/index.d.ts +20 -0
  71. package/build-ngc/angular/video-view/index.js +56 -0
  72. package/build-ngc/angular/video-view/index.js.map +1 -0
  73. package/build-ngc/core/constants.d.ts +12 -0
  74. package/build-ngc/core/constants.js +14 -0
  75. package/build-ngc/core/constants.js.map +1 -0
  76. package/build-ngc/core/index.d.ts +10 -0
  77. package/build-ngc/core/index.js +9 -0
  78. package/build-ngc/core/index.js.map +1 -0
  79. package/build-ngc/core/native-module.d.ts +10 -0
  80. package/build-ngc/core/native-module.js +4 -0
  81. package/build-ngc/core/native-module.js.map +1 -0
  82. package/build-ngc/core/player-types.d.ts +221 -0
  83. package/build-ngc/core/player-types.js +2 -0
  84. package/build-ngc/core/player-types.js.map +1 -0
  85. package/build-ngc/core/video-airplay-button.d.ts +4 -0
  86. package/build-ngc/core/video-airplay-button.js +30 -0
  87. package/build-ngc/core/video-airplay-button.js.map +1 -0
  88. package/build-ngc/core/video-module.d.ts +12 -0
  89. package/build-ngc/core/video-module.js +22 -0
  90. package/build-ngc/core/video-module.js.map +1 -0
  91. package/build-ngc/core/video-player-controller.d.ts +15 -0
  92. package/build-ngc/core/video-player-controller.js +22 -0
  93. package/build-ngc/core/video-player-controller.js.map +1 -0
  94. package/build-ngc/core/video-player.d.ts +7 -0
  95. package/build-ngc/core/video-player.js +23 -0
  96. package/build-ngc/core/video-player.js.map +1 -0
  97. package/build-ngc/core/video-source.d.ts +3 -0
  98. package/build-ngc/core/video-source.js +21 -0
  99. package/build-ngc/core/video-source.js.map +1 -0
  100. package/build-ngc/core/video-thumbnail.d.ts +4 -0
  101. package/build-ngc/core/video-thumbnail.js +4 -0
  102. package/build-ngc/core/video-thumbnail.js.map +1 -0
  103. package/build-ngc/core/video-view.d.ts +18 -0
  104. package/build-ngc/core/video-view.js +64 -0
  105. package/build-ngc/core/video-view.js.map +1 -0
  106. package/build-ngc/core/view-types.d.ts +90 -0
  107. package/build-ngc/core/view-types.js +2 -0
  108. package/build-ngc/core/view-types.js.map +1 -0
  109. package/native-link.json +33 -0
  110. package/package.json +144 -3
  111. package/src/angular/index.ts +6 -0
  112. package/src/angular/inject-video-player.ts +20 -0
  113. package/src/angular/video-airplay-button/index.ts +38 -0
  114. package/src/angular/video-view/index.ts +59 -0
  115. package/src/core/constants.ts +16 -0
  116. package/src/core/index.ts +56 -0
  117. package/src/core/native-module.ts +15 -0
  118. package/src/core/player-types.ts +241 -0
  119. package/src/core/video-airplay-button.ts +45 -0
  120. package/src/core/video-module.ts +25 -0
  121. package/src/core/video-player-controller.ts +53 -0
  122. package/src/core/video-player.ts +38 -0
  123. package/src/core/video-source.ts +21 -0
  124. package/src/core/video-thumbnail.ts +7 -0
  125. package/src/core/video-view.ts +119 -0
  126. package/src/core/view-types.ts +114 -0
  127. package/src/react/index.ts +6 -0
  128. package/src/react/use-video-player.ts +22 -0
  129. package/src/react/video-view.ts +35 -0
  130. package/src/solid/index.ts +5 -0
  131. package/src/solid/use-video-player.ts +24 -0
  132. package/src/solid/video-view.ts +22 -0
  133. package/src/svelte/index.ts +7 -0
  134. package/src/svelte/svelte-ambient.d.ts +3 -0
  135. package/src/svelte/svelte-compile.test-helper.ts +6 -0
  136. package/src/svelte/use-video-player.svelte.ts +31 -0
  137. package/src/svelte/video-airplay-button.svelte +12 -0
  138. package/src/svelte/video-view.svelte +25 -0
  139. package/src/vue/index.ts +5 -0
  140. package/src/vue/use-video-player.ts +33 -0
  141. package/src/vue/video-view.ts +24 -0
@@ -0,0 +1,11 @@
1
+ import { createResourceHook } from '@symbiote-native/solid';
2
+ import { createVideoPlayerController } from '../core/video-player-controller.js';
3
+ const usePlayerResource = createResourceHook(createVideoPlayerController);
4
+ /**
5
+ * Solid twin of `expo-video`'s `useVideoPlayer`, released when the owner is disposed
6
+ *
7
+ * `setup` runs once on each new player, a changed source or options make a new one
8
+ */
9
+ export function useVideoPlayer(source, setup, playerBuilderOptions = () => undefined) {
10
+ return usePlayerResource(() => [source(), playerBuilderOptions(), setup]);
11
+ }
@@ -0,0 +1,33 @@
1
+ import type { IVideoAirPlayButtonProps, IVideoViewHandle } from '../core';
2
+ /** Solid twin of `expo-video`'s `VideoView`, `ref` gets the handle of the view */
3
+ export declare const VideoView: (props: import("@symbiote-native/components").IAccessibilityProps & import("@symbiote-native/components").IAriaProps & import("@symbiote-native/components").IResponderProps & {
4
+ player?: import(".").VideoPlayer | null;
5
+ nativeControls?: boolean;
6
+ contentFit?: import(".").IVideoContentFit;
7
+ fullscreenOptions?: import(".").IVideoFullscreenOptions;
8
+ showsTimecodes?: boolean;
9
+ requiresLinearPlayback?: boolean;
10
+ buttonOptions?: import(".").IVideoButtonOptions;
11
+ surfaceType?: import(".").IVideoSurfaceType;
12
+ contentPosition?: {
13
+ dx?: number;
14
+ dy?: number;
15
+ };
16
+ onPictureInPictureStart?: () => void;
17
+ onPictureInPictureStop?: () => void;
18
+ allowsPictureInPicture?: boolean;
19
+ startsPictureInPictureAutomatically?: boolean;
20
+ allowsVideoFrameAnalysis?: boolean;
21
+ onFullscreenEnter?: () => void;
22
+ onFullscreenExit?: () => void;
23
+ onFirstFrameRender?: () => void;
24
+ useExoShutter?: boolean;
25
+ style?: import("@symbiote-native/engine").IStyleProp<import("@symbiote-native/engine").IViewStyle>;
26
+ testID?: string;
27
+ nativeID?: string;
28
+ onLayout?: (event: import("@symbiote-native/engine").ISymbioteEvent) => void;
29
+ } & {
30
+ ref?: ((handle: IVideoViewHandle) => void) | undefined;
31
+ }) => import("@symbiote-native/engine").ISymbioteNode | null;
32
+ /** Solid twin of `expo-video`'s `VideoAirPlayButton`, a plain view off iOS */
33
+ export declare const VideoAirPlayButton: (props: IVideoAirPlayButtonProps) => import("@symbiote-native/engine").ISymbioteNode | null;
@@ -0,0 +1,6 @@
1
+ import { defineNativeViewComponent, defineOptionalDescriptorComponent, } from '@symbiote-native/solid';
2
+ import { createVideoView, renderVideoAirPlayButton } from '../core/index.js';
3
+ /** Solid twin of `expo-video`'s `VideoView`, `ref` gets the handle of the view */
4
+ export const VideoView = defineNativeViewComponent(createVideoView);
5
+ /** Solid twin of `expo-video`'s `VideoAirPlayButton`, a plain view off iOS */
6
+ export const VideoAirPlayButton = defineOptionalDescriptorComponent(renderVideoAirPlayButton);
@@ -0,0 +1,5 @@
1
+ export { default as VideoView } from './video-view.svelte';
2
+ export { default as VideoAirPlayButton } from './video-airplay-button.svelte';
3
+ export { useVideoPlayer } from './use-video-player.svelte';
4
+ export type { IUseVideoPlayerResult } from './use-video-player.svelte';
5
+ export * from '../core';
@@ -0,0 +1,5 @@
1
+ // @symbiote-native/video/svelte: плеер, view, миниатюры, кэш и кнопка AirPlay на общем ядре
2
+ export { default as VideoView } from './video-view.svelte';
3
+ export { default as VideoAirPlayButton } from './video-airplay-button.svelte';
4
+ export { useVideoPlayer } from './use-video-player.svelte';
5
+ export * from '../core/index.js';
@@ -0,0 +1,10 @@
1
+ import type { IVideoPlayerBuilderOptions, IVideoSource, VideoPlayer } from '../core';
2
+ export type IUseVideoPlayerResult = {
3
+ readonly current: VideoPlayer;
4
+ };
5
+ /**
6
+ * Svelte twin of `expo-video`'s `useVideoPlayer`, boxed getter shape of the other resource hooks
7
+ *
8
+ * `setup` runs once on each new player, a changed source or options make a new one
9
+ */
10
+ export declare function useVideoPlayer(getSource: () => IVideoSource, setup?: (player: VideoPlayer) => void, getPlayerBuilderOptions?: () => IVideoPlayerBuilderOptions | undefined): IUseVideoPlayerResult;
@@ -0,0 +1,15 @@
1
+ import { createResourceHook } from '@symbiote-native/svelte/runes/create-resource-hook';
2
+ import { createVideoPlayerController } from '../core/video-player-controller.js';
3
+ const usePlayerResource = createResourceHook(createVideoPlayerController);
4
+ /**
5
+ * Svelte twin of `expo-video`'s `useVideoPlayer`, boxed getter shape of the other resource hooks
6
+ *
7
+ * `setup` runs once on each new player, a changed source or options make a new one
8
+ */
9
+ export function useVideoPlayer(getSource, setup, getPlayerBuilderOptions = () => undefined) {
10
+ return usePlayerResource(() => [
11
+ getSource(),
12
+ getPlayerBuilderOptions(),
13
+ setup,
14
+ ]);
15
+ }
@@ -0,0 +1,12 @@
1
+ <script lang="ts">
2
+ // The native view name is mixed-case, which a literal tag would parse as a component reference,
3
+ // so the tag is dynamic
4
+ import { hostProps } from '@symbiote-native/svelte/native-view-bridge';
5
+ import { renderVideoAirPlayButton } from '../core';
6
+ import type { IVideoAirPlayButtonProps } from '../core';
7
+
8
+ const props: IVideoAirPlayButtonProps = $props();
9
+ const descriptor = $derived(renderVideoAirPlayButton({ ...props }));
10
+ </script>
11
+
12
+ <svelte:element this={descriptor.type} {@attach hostProps(descriptor.props)} />
@@ -0,0 +1,4 @@
1
+ import type { IVideoAirPlayButtonProps } from '../core';
2
+ declare const VideoAirplayButton: import("svelte").Component<IVideoAirPlayButtonProps, {}, "">;
3
+ type VideoAirplayButton = ReturnType<typeof VideoAirplayButton>;
4
+ export default VideoAirplayButton;
@@ -0,0 +1,25 @@
1
+ <script lang="ts">
2
+ // The native view name is mixed-case, which a literal tag would parse as a component reference,
3
+ // so the tag is dynamic
4
+ import { hostProps } from '@symbiote-native/svelte/native-view-bridge';
5
+ import { useNativeViewController } from '@symbiote-native/svelte/runes/use-native-view-controller';
6
+ import { createVideoView } from '../core';
7
+ import type { IVideoViewProps } from '../core';
8
+
9
+ const props: IVideoViewProps = $props();
10
+ const view = useNativeViewController(createVideoView, () => ({ ...props }));
11
+
12
+ // The functions of the view are instance members, `bind:this` reaches them
13
+ export const enterFullscreen = view.handle.enterFullscreen;
14
+ export const exitFullscreen = view.handle.exitFullscreen;
15
+ export const startPictureInPicture = view.handle.startPictureInPicture;
16
+ export const stopPictureInPicture = view.handle.stopPictureInPicture;
17
+ </script>
18
+
19
+ {#if view.descriptor}
20
+ <svelte:element
21
+ this={view.descriptor.type}
22
+ {@attach view.attachHost}
23
+ {@attach hostProps(view.descriptor.props)}
24
+ />
25
+ {/if}
@@ -0,0 +1,9 @@
1
+ import type { IVideoViewProps } from '../core';
2
+ declare const VideoView: import("svelte").Component<IVideoViewProps, {
3
+ enterFullscreen: () => Promise<void>;
4
+ exitFullscreen: () => Promise<void>;
5
+ startPictureInPicture: () => Promise<void>;
6
+ stopPictureInPicture: () => Promise<void>;
7
+ }, "">;
8
+ type VideoView = ReturnType<typeof VideoView>;
9
+ export default VideoView;
@@ -0,0 +1,3 @@
1
+ export { VideoAirPlayButton, VideoView } from './video-view';
2
+ export { useVideoPlayer } from './use-video-player';
3
+ export * from '../core';
@@ -0,0 +1,4 @@
1
+ // @symbiote-native/video/vue: плеер, view, миниатюры, кэш и кнопка AirPlay на общем ядре
2
+ export { VideoAirPlayButton, VideoView } from './video-view.js';
3
+ export { useVideoPlayer } from './use-video-player.js';
4
+ export * from '../core/index.js';
@@ -0,0 +1,8 @@
1
+ import { type ComputedRef, type MaybeRefOrGetter } from '@vue/runtime-core';
2
+ import type { IVideoPlayerBuilderOptions, IVideoSource, VideoPlayer } from '../core';
3
+ /**
4
+ * Vue twin of `expo-video`'s `useVideoPlayer`, released when the owner unmounts
5
+ *
6
+ * `setup` runs once on each new player, a changed source or options make a new one
7
+ */
8
+ export declare function useVideoPlayer(source: MaybeRefOrGetter<IVideoSource>, setup?: (player: VideoPlayer) => void, playerBuilderOptions?: MaybeRefOrGetter<IVideoPlayerBuilderOptions | undefined>): ComputedRef<VideoPlayer>;
@@ -0,0 +1,16 @@
1
+ import { toValue, } from '@vue/runtime-core';
2
+ import { createResourceHook } from '@symbiote-native/vue';
3
+ import { createVideoPlayerController } from '../core/video-player-controller.js';
4
+ const usePlayerResource = createResourceHook(createVideoPlayerController);
5
+ /**
6
+ * Vue twin of `expo-video`'s `useVideoPlayer`, released when the owner unmounts
7
+ *
8
+ * `setup` runs once on each new player, a changed source or options make a new one
9
+ */
10
+ export function useVideoPlayer(source, setup, playerBuilderOptions) {
11
+ return usePlayerResource(() => [
12
+ toValue(source),
13
+ toValue(playerBuilderOptions),
14
+ setup,
15
+ ]);
16
+ }
@@ -0,0 +1,5 @@
1
+ import { type VNode } from '@vue/runtime-core';
2
+ /** Vue twin of `expo-video`'s `VideoView` */
3
+ export declare const VideoView: import("vue").DefineComponent<{}, () => VNode | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
+ /** Vue twin of `expo-video`'s `VideoAirPlayButton`, a plain view off iOS */
5
+ export declare const VideoAirPlayButton: import("vue").DefineComponent<{}, () => VNode, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,14 @@
1
+ import { defineComponent } from '@vue/runtime-core';
2
+ import { defineNativeViewComponent, descriptorToVue, normalizeVueAttrs, } from '@symbiote-native/vue';
3
+ import { createVideoView, renderVideoAirPlayButton } from '../core/index.js';
4
+ /** Vue twin of `expo-video`'s `VideoView` */
5
+ export const VideoView = defineNativeViewComponent('VideoView', createVideoView);
6
+ /** Vue twin of `expo-video`'s `VideoAirPlayButton`, a plain view off iOS */
7
+ export const VideoAirPlayButton = defineComponent({
8
+ name: 'VideoAirPlayButton',
9
+ // Все атрибуты это пропсы нативного view, на обёртку ничего не должно просочиться
10
+ inheritAttrs: false,
11
+ setup(_props, { attrs }) {
12
+ return () => descriptorToVue(renderVideoAirPlayButton(normalizeVueAttrs(attrs)));
13
+ },
14
+ });
@@ -0,0 +1,4 @@
1
+ export { VideoView } from './video-view';
2
+ export { VideoAirPlayButton } from './video-airplay-button';
3
+ export { injectVideoPlayer } from './inject-video-player';
4
+ export * from '../core';
@@ -0,0 +1,6 @@
1
+ // @symbiote-native/video/angular: плеер, view, миниатюры, кэш и кнопка AirPlay на общем ядре
2
+ export { VideoView } from './video-view';
3
+ export { VideoAirPlayButton } from './video-airplay-button';
4
+ export { injectVideoPlayer } from './inject-video-player';
5
+ export * from '../core';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/angular/index.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAE7F,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,cAAc,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Signal } from '@angular/core';
2
+ import type { IVideoPlayerBuilderOptions, IVideoSource, VideoPlayer } from '../core';
3
+ /** Released with the injection context, `setup` runs once on each new player */
4
+ export declare const injectVideoPlayer: (source: () => IVideoSource, setup?: (player: VideoPlayer) => void, options?: () => IVideoPlayerBuilderOptions | undefined) => Signal<VideoPlayer>;
@@ -0,0 +1,7 @@
1
+ // Angular twin of `useVideoPlayer`, `injectX` shape matching `injectAudioPlayer`
2
+ import { createResourceHook } from '@symbiote-native/angular';
3
+ import { createVideoPlayerController } from '../core/video-player-controller';
4
+ const injectPlayerResource = createResourceHook(createVideoPlayerController);
5
+ /** Released with the injection context, `setup` runs once on each new player */
6
+ export const injectVideoPlayer = (source, setup, options) => injectPlayerResource(() => [source(), options?.(), setup]);
7
+ //# sourceMappingURL=inject-video-player.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inject-video-player.js","sourceRoot":"","sources":["../../src/angular/inject-video-player.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAGjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAO9E,MAAM,oBAAoB,GAAG,kBAAkB,CAAC,2BAA2B,CAAC,CAAC;AAE7E,gFAAgF;AAChF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,MAA0B,EAC1B,KAAqC,EACrC,OAAsD,EACjC,EAAE,CACvB,oBAAoB,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { NativeViewBase } from '@symbiote-native/angular';
2
+ import type { IDescriptor } from '@symbiote-native/components';
3
+ import type { IVideoAirPlayButtonProps } from '../../core';
4
+ import * as i0 from "@angular/core";
5
+ declare const AIRPLAY_INPUTS: readonly ["tint", "activeTint", "prioritizeVideoDevices", "onBeginPresentingRoutes", "onEndPresentingRoutes"];
6
+ export interface VideoAirPlayButton extends Partial<Pick<IVideoAirPlayButtonProps, (typeof AIRPLAY_INPUTS)[number]>> {
7
+ }
8
+ /** Angular twin of `expo-video`'s `VideoAirPlayButton`, a plain view off iOS */
9
+ export declare class VideoAirPlayButton extends NativeViewBase {
10
+ protected readonly propNames: readonly ["tint", "activeTint", "prioritizeVideoDevices", "onBeginPresentingRoutes", "onEndPresentingRoutes"];
11
+ protected renderView(props: object): IDescriptor | null;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<VideoAirPlayButton, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<VideoAirPlayButton, "VideoAirPlayButton", never, { "tint": { "alias": "tint"; "required": false; }; "activeTint": { "alias": "activeTint"; "required": false; }; "prioritizeVideoDevices": { "alias": "prioritizeVideoDevices"; "required": false; }; "onBeginPresentingRoutes": { "alias": "onBeginPresentingRoutes"; "required": false; }; "onEndPresentingRoutes": { "alias": "onEndPresentingRoutes"; "required": false; }; }, {}, never, never, true, never>;
14
+ }
15
+ export {};
@@ -0,0 +1,37 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { DescriptorOutlet, NativeViewBase } from '@symbiote-native/angular';
3
+ import { renderVideoAirPlayButton } from '../../core';
4
+ import * as i0 from "@angular/core";
5
+ // One list is the inputs of the component and the props it hands to the native view
6
+ const AIRPLAY_INPUTS = [
7
+ 'tint',
8
+ 'activeTint',
9
+ 'prioritizeVideoDevices',
10
+ 'onBeginPresentingRoutes',
11
+ 'onEndPresentingRoutes',
12
+ ];
13
+ /** Angular twin of `expo-video`'s `VideoAirPlayButton`, a plain view off iOS */
14
+ export class VideoAirPlayButton extends NativeViewBase {
15
+ propNames = AIRPLAY_INPUTS;
16
+ renderView(props) {
17
+ return renderVideoAirPlayButton(props);
18
+ }
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VideoAirPlayButton, deps: null, target: i0.ɵɵFactoryTarget.Component });
20
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: VideoAirPlayButton, isStandalone: true, selector: "VideoAirPlayButton", inputs: { tint: "tint", activeTint: "activeTint", prioritizeVideoDevices: "prioritizeVideoDevices", onBeginPresentingRoutes: "onBeginPresentingRoutes", onEndPresentingRoutes: "onEndPresentingRoutes" }, usesInheritance: true, ngImport: i0, template: `@if (descriptor; as node) {
21
+ <symbiote-descriptor-outlet [node]="node" />
22
+ }`, isInline: true, dependencies: [{ kind: "component", type: DescriptorOutlet, selector: "symbiote-descriptor-outlet", inputs: ["node"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
23
+ }
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VideoAirPlayButton, decorators: [{
25
+ type: Component,
26
+ args: [{
27
+ selector: 'VideoAirPlayButton',
28
+ standalone: true,
29
+ imports: [DescriptorOutlet],
30
+ inputs: [...AIRPLAY_INPUTS],
31
+ changeDetection: ChangeDetectionStrategy.OnPush,
32
+ template: `@if (descriptor; as node) {
33
+ <symbiote-descriptor-outlet [node]="node" />
34
+ }`,
35
+ }]
36
+ }] });
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/angular/video-airplay-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;;AAGtD,oFAAoF;AACpF,MAAM,cAAc,GAAG;IACrB,MAAM;IACN,YAAY;IACZ,wBAAwB;IACxB,yBAAyB;IACzB,uBAAuB;CACf,CAAC;AAOX,gFAAgF;AAWhF,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACxB,SAAS,GAAG,cAAc,CAAC;IAEpC,UAAU,CAAC,KAAa;QACzC,OAAO,wBAAwB,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;uGALU,kBAAkB;2FAAlB,kBAAkB,+SAJnB;;IAER,4DALQ,gBAAgB;;2FAOf,kBAAkB;kBAV9B,SAAS;mBAAC;oBACT,QAAQ,EAAE,oBAAoB;oBAC9B,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,MAAM,EAAE,CAAC,GAAG,cAAc,CAAC;oBAC3B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;IAER;iBACH"}
@@ -0,0 +1,20 @@
1
+ import { NativeViewBase } from '@symbiote-native/angular';
2
+ import type { IDescriptor } from '@symbiote-native/components';
3
+ import type { IVideoViewProps } from '../../core';
4
+ import * as i0 from "@angular/core";
5
+ declare const VIDEO_VIEW_INPUTS: readonly ["player", "nativeControls", "contentFit", "fullscreenOptions", "showsTimecodes", "requiresLinearPlayback", "buttonOptions", "surfaceType", "contentPosition", "onPictureInPictureStart", "onPictureInPictureStop", "allowsPictureInPicture", "startsPictureInPictureAutomatically", "allowsVideoFrameAnalysis", "onFullscreenEnter", "onFullscreenExit", "onFirstFrameRender", "useExoShutter"];
6
+ export interface VideoView extends Partial<Pick<IVideoViewProps, (typeof VIDEO_VIEW_INPUTS)[number]>> {
7
+ }
8
+ /** Angular twin of `expo-video`'s `VideoView` */
9
+ export declare class VideoView extends NativeViewBase {
10
+ private readonly view;
11
+ readonly enterFullscreen: () => Promise<void>;
12
+ readonly exitFullscreen: () => Promise<void>;
13
+ readonly startPictureInPicture: () => Promise<void>;
14
+ readonly stopPictureInPicture: () => Promise<void>;
15
+ protected readonly propNames: readonly ["player", "nativeControls", "contentFit", "fullscreenOptions", "showsTimecodes", "requiresLinearPlayback", "buttonOptions", "surfaceType", "contentPosition", "onPictureInPictureStart", "onPictureInPictureStop", "allowsPictureInPicture", "startsPictureInPictureAutomatically", "allowsVideoFrameAnalysis", "onFullscreenEnter", "onFullscreenExit", "onFirstFrameRender", "useExoShutter"];
16
+ protected renderView(props: object): IDescriptor | null;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<VideoView, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<VideoView, "VideoView", never, { "player": { "alias": "player"; "required": false; }; "nativeControls": { "alias": "nativeControls"; "required": false; }; "contentFit": { "alias": "contentFit"; "required": false; }; "fullscreenOptions": { "alias": "fullscreenOptions"; "required": false; }; "showsTimecodes": { "alias": "showsTimecodes"; "required": false; }; "requiresLinearPlayback": { "alias": "requiresLinearPlayback"; "required": false; }; "buttonOptions": { "alias": "buttonOptions"; "required": false; }; "surfaceType": { "alias": "surfaceType"; "required": false; }; "contentPosition": { "alias": "contentPosition"; "required": false; }; "onPictureInPictureStart": { "alias": "onPictureInPictureStart"; "required": false; }; "onPictureInPictureStop": { "alias": "onPictureInPictureStop"; "required": false; }; "allowsPictureInPicture": { "alias": "allowsPictureInPicture"; "required": false; }; "startsPictureInPictureAutomatically": { "alias": "startsPictureInPictureAutomatically"; "required": false; }; "allowsVideoFrameAnalysis": { "alias": "allowsVideoFrameAnalysis"; "required": false; }; "onFullscreenEnter": { "alias": "onFullscreenEnter"; "required": false; }; "onFullscreenExit": { "alias": "onFullscreenExit"; "required": false; }; "onFirstFrameRender": { "alias": "onFirstFrameRender"; "required": false; }; "useExoShutter": { "alias": "useExoShutter"; "required": false; }; }, {}, never, never, true, never>;
19
+ }
20
+ export {};
@@ -0,0 +1,56 @@
1
+ import { ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { DescriptorOutlet, NativeViewBase } from '@symbiote-native/angular';
3
+ import { createVideoView } from '../../core';
4
+ import * as i0 from "@angular/core";
5
+ // One list is the inputs of the component and the props it hands to the native view
6
+ const VIDEO_VIEW_INPUTS = [
7
+ 'player',
8
+ 'nativeControls',
9
+ 'contentFit',
10
+ 'fullscreenOptions',
11
+ 'showsTimecodes',
12
+ 'requiresLinearPlayback',
13
+ 'buttonOptions',
14
+ 'surfaceType',
15
+ 'contentPosition',
16
+ 'onPictureInPictureStart',
17
+ 'onPictureInPictureStop',
18
+ 'allowsPictureInPicture',
19
+ 'startsPictureInPictureAutomatically',
20
+ 'allowsVideoFrameAnalysis',
21
+ 'onFullscreenEnter',
22
+ 'onFullscreenExit',
23
+ 'onFirstFrameRender',
24
+ 'useExoShutter',
25
+ ];
26
+ /** Angular twin of `expo-video`'s `VideoView` */
27
+ export class VideoView extends NativeViewBase {
28
+ view = createVideoView(() => this.hostNode());
29
+ // The functions of the view are members of the component, a `@ViewChild` reaches them
30
+ enterFullscreen = this.view.handle.enterFullscreen;
31
+ exitFullscreen = this.view.handle.exitFullscreen;
32
+ startPictureInPicture = this.view.handle.startPictureInPicture;
33
+ stopPictureInPicture = this.view.handle.stopPictureInPicture;
34
+ propNames = VIDEO_VIEW_INPUTS;
35
+ renderView(props) {
36
+ return this.view.render(props);
37
+ }
38
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VideoView, deps: null, target: i0.ɵɵFactoryTarget.Component });
39
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: VideoView, isStandalone: true, selector: "VideoView", inputs: { player: "player", nativeControls: "nativeControls", contentFit: "contentFit", fullscreenOptions: "fullscreenOptions", showsTimecodes: "showsTimecodes", requiresLinearPlayback: "requiresLinearPlayback", buttonOptions: "buttonOptions", surfaceType: "surfaceType", contentPosition: "contentPosition", onPictureInPictureStart: "onPictureInPictureStart", onPictureInPictureStop: "onPictureInPictureStop", allowsPictureInPicture: "allowsPictureInPicture", startsPictureInPictureAutomatically: "startsPictureInPictureAutomatically", allowsVideoFrameAnalysis: "allowsVideoFrameAnalysis", onFullscreenEnter: "onFullscreenEnter", onFullscreenExit: "onFullscreenExit", onFirstFrameRender: "onFirstFrameRender", useExoShutter: "useExoShutter" }, usesInheritance: true, ngImport: i0, template: `@if (descriptor; as node) {
40
+ <symbiote-descriptor-outlet [node]="node" />
41
+ }`, isInline: true, dependencies: [{ kind: "component", type: DescriptorOutlet, selector: "symbiote-descriptor-outlet", inputs: ["node"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
42
+ }
43
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: VideoView, decorators: [{
44
+ type: Component,
45
+ args: [{
46
+ selector: 'VideoView',
47
+ standalone: true,
48
+ imports: [DescriptorOutlet],
49
+ inputs: [...VIDEO_VIEW_INPUTS],
50
+ changeDetection: ChangeDetectionStrategy.OnPush,
51
+ template: `@if (descriptor; as node) {
52
+ <symbiote-descriptor-outlet [node]="node" />
53
+ }`,
54
+ }]
55
+ }] });
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/angular/video-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;;AAG7C,oFAAoF;AACpF,MAAM,iBAAiB,GAAG;IACxB,QAAQ;IACR,gBAAgB;IAChB,YAAY;IACZ,mBAAmB;IACnB,gBAAgB;IAChB,wBAAwB;IACxB,eAAe;IACf,aAAa;IACb,iBAAiB;IACjB,yBAAyB;IACzB,wBAAwB;IACxB,wBAAwB;IACxB,qCAAqC;IACrC,0BAA0B;IAC1B,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,eAAe;CACP,CAAC;AAOX,iDAAiD;AAWjD,MAAM,OAAO,SAAU,SAAQ,cAAc;IAC1B,IAAI,GAAG,eAAe,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE/D,sFAAsF;IAC7E,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;IACnD,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;IACjD,qBAAqB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC;IAC/D,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC;IAE1C,SAAS,GAAG,iBAAiB,CAAC;IAEvC,UAAU,CAAC,KAAa;QACzC,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;uGAbU,SAAS;2FAAT,SAAS,o0BAJV;;IAER,4DALQ,gBAAgB;;2FAOf,SAAS;kBAVrB,SAAS;mBAAC;oBACT,QAAQ,EAAE,WAAW;oBACrB,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,gBAAgB,CAAC;oBAC3B,MAAM,EAAE,CAAC,GAAG,iBAAiB,CAAC;oBAC9B,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,QAAQ,EAAE;;IAER;iBACH"}
@@ -0,0 +1,12 @@
1
+ export declare const VIDEO_MODULE_NAME = "ExpoVideo";
2
+ /** Upstream's label for its `UnavailabilityError` */
3
+ export declare const VIDEO_PACKAGE_NAME = "expo-video";
4
+ export declare const VIDEO_VIEW_NAMES: {
5
+ /** The one iOS view */
6
+ readonly video: "VideoView";
7
+ /** The Android default, renders into a `SurfaceView` */
8
+ readonly surface: "SurfaceVideoView";
9
+ /** Android, for overlapping views */
10
+ readonly texture: "TextureVideoView";
11
+ readonly airPlayButton: "VideoAirPlayButtonView";
12
+ };
@@ -0,0 +1,14 @@
1
+ // Apart from `native-module`, which resolves the module on import: the views need the name too
2
+ export const VIDEO_MODULE_NAME = 'ExpoVideo';
3
+ /** Upstream's label for its `UnavailabilityError` */
4
+ export const VIDEO_PACKAGE_NAME = 'expo-video';
5
+ export const VIDEO_VIEW_NAMES = {
6
+ /** The one iOS view */
7
+ video: 'VideoView',
8
+ /** The Android default, renders into a `SurfaceView` */
9
+ surface: 'SurfaceVideoView',
10
+ /** Android, for overlapping views */
11
+ texture: 'TextureVideoView',
12
+ airPlayButton: 'VideoAirPlayButtonView',
13
+ };
14
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAE/F,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAE7C,qDAAqD;AACrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,uBAAuB;IACvB,KAAK,EAAE,WAAW;IAClB,wDAAwD;IACxD,OAAO,EAAE,kBAAkB;IAC3B,qCAAqC;IACrC,OAAO,EAAE,kBAAkB;IAC3B,aAAa,EAAE,wBAAwB;CAC/B,CAAC"}
@@ -0,0 +1,10 @@
1
+ export { VIDEO_MODULE_NAME } from './constants';
2
+ export type { IVideoAudioMixingMode, IVideoAudioTrack, IVideoBufferOptions, IVideoContentType, IVideoDrmOptions, IVideoDrmType, IVideoMetadata, IVideoPlayerBuilderOptions, IVideoPlayerError, IVideoPlayerEvents, IVideoPlayerStatus, IVideoRange, IVideoScrubbingModeOptions, IVideoSeekTolerance, IVideoSize, IVideoSource, IVideoSourceObject, IVideoSubtitleTrack, IVideoThumbnailOptions, IVideoTrack, VideoPlayer, } from './player-types';
3
+ export { createVideoPlayer } from './video-player';
4
+ export { createVideoPlayerController, type IVideoPlayerController, } from './video-player-controller';
5
+ export { clearVideoCacheAsync, getCurrentVideoCacheSize, isPictureInPictureSupported, setVideoCacheSizeAsync, } from './video-module';
6
+ export { parseSource } from './video-source';
7
+ export { VideoThumbnail } from './video-thumbnail';
8
+ export { createVideoView, type IVideoView, type IVideoViewHandle, } from './video-view';
9
+ export { renderVideoAirPlayButton, videoAirPlayButtonViewName, } from './video-airplay-button';
10
+ export type { IVideoAirPlayButtonProps, IVideoButtonOptions, IVideoContentFit, IVideoFullscreenOptions, IVideoFullscreenOrientation, IVideoKeepFullscreenOnPiPStop, IVideoSurfaceType, IVideoViewProps, } from './view-types';
@@ -0,0 +1,9 @@
1
+ export { VIDEO_MODULE_NAME } from './constants';
2
+ export { createVideoPlayer } from './video-player';
3
+ export { createVideoPlayerController, } from './video-player-controller';
4
+ export { clearVideoCacheAsync, getCurrentVideoCacheSize, isPictureInPictureSupported, setVideoCacheSizeAsync, } from './video-module';
5
+ export { parseSource } from './video-source';
6
+ export { VideoThumbnail } from './video-thumbnail';
7
+ export { createVideoView, } from './video-view';
8
+ export { renderVideoAirPlayButton, videoAirPlayButtonViewName, } from './video-airplay-button';
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAwBhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,2BAA2B,GAE5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oBAAoB,EACpB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,eAAe,GAGhB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,wBAAwB,EACxB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { VideoPlayer, VideoThumbnail } from './player-types';
2
+ export type INativeVideoModule = {
3
+ VideoPlayer: typeof VideoPlayer;
4
+ VideoThumbnail: typeof VideoThumbnail;
5
+ isPictureInPictureSupported(): boolean;
6
+ setVideoCacheSizeAsync(sizeBytes: number): Promise<void>;
7
+ clearVideoCacheAsync(): Promise<void>;
8
+ getCurrentVideoCacheSize(): number;
9
+ };
10
+ export declare const expoVideo: INativeVideoModule;
@@ -0,0 +1,4 @@
1
+ import { requireNativeModule } from 'expo-modules-core';
2
+ import { VIDEO_MODULE_NAME } from './constants';
3
+ export const expoVideo = requireNativeModule(VIDEO_MODULE_NAME);
4
+ //# sourceMappingURL=native-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"native-module.js","sourceRoot":"","sources":["../../src/core/native-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAYhD,MAAM,CAAC,MAAM,SAAS,GACpB,mBAAmB,CAAqB,iBAAiB,CAAC,CAAC"}