@oxyhq/bloom 1.1.0 → 1.2.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.
- package/docs/media-flight.mdx +282 -0
- package/docs/migrating-the-media-gallery.mdx +103 -0
- package/docs/migrating-to-1.0.mdx +1 -1
- package/docs/zoomable-media-gallery.mdx +116 -0
- package/lib/commonjs/image-aspect-ratio-cache/aspect-ratio-cache.js +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/media-flight/MediaFlightLayer.js +151 -0
- package/lib/commonjs/media-flight/MediaFlightLayer.js.map +1 -0
- package/lib/commonjs/media-flight/MediaSurface.js +207 -0
- package/lib/commonjs/media-flight/MediaSurface.js.map +1 -0
- package/lib/commonjs/media-flight/constants.js +39 -0
- package/lib/commonjs/media-flight/constants.js.map +1 -0
- package/lib/commonjs/media-flight/expo-video-module.js +180 -0
- package/lib/commonjs/media-flight/expo-video-module.js.map +1 -0
- package/lib/commonjs/media-flight/index.js +108 -0
- package/lib/commonjs/media-flight/index.js.map +1 -0
- package/lib/commonjs/media-flight/store.js +457 -0
- package/lib/commonjs/media-flight/store.js.map +1 -0
- package/lib/commonjs/media-flight/types.js +6 -0
- package/lib/commonjs/media-flight/types.js.map +1 -0
- package/lib/commonjs/media-flight/use-media-flight.js +41 -0
- package/lib/commonjs/media-flight/use-media-flight.js.map +1 -0
- package/lib/commonjs/tab-bar/TabBarBase.js +1 -1
- package/lib/commonjs/{zoomable-image-gallery/ZoomableImageGallery.js → zoomable-media-gallery/ZoomableMediaGallery.js} +185 -131
- package/lib/commonjs/zoomable-media-gallery/ZoomableMediaGallery.js.map +1 -0
- package/lib/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/constants.js.map +1 -1
- package/lib/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/index.js +5 -5
- package/lib/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/index.js.map +1 -1
- package/lib/commonjs/zoomable-media-gallery/types.js +6 -0
- package/lib/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/types.js.map +1 -1
- package/lib/module/image-aspect-ratio-cache/aspect-ratio-cache.js +1 -1
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +2 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/media-flight/MediaFlightLayer.js +146 -0
- package/lib/module/media-flight/MediaFlightLayer.js.map +1 -0
- package/lib/module/media-flight/MediaSurface.js +199 -0
- package/lib/module/media-flight/MediaSurface.js.map +1 -0
- package/lib/module/media-flight/constants.js +35 -0
- package/lib/module/media-flight/constants.js.map +1 -0
- package/lib/module/media-flight/expo-video-module.js +173 -0
- package/lib/module/media-flight/expo-video-module.js.map +1 -0
- package/lib/module/media-flight/index.js +9 -0
- package/lib/module/media-flight/index.js.map +1 -0
- package/lib/module/media-flight/store.js +439 -0
- package/lib/module/media-flight/store.js.map +1 -0
- package/lib/module/media-flight/types.js +4 -0
- package/lib/module/media-flight/types.js.map +1 -0
- package/lib/module/media-flight/use-media-flight.js +36 -0
- package/lib/module/media-flight/use-media-flight.js.map +1 -0
- package/lib/module/tab-bar/TabBarBase.js +1 -1
- package/lib/module/{zoomable-image-gallery/ZoomableImageGallery.js → zoomable-media-gallery/ZoomableMediaGallery.js} +184 -130
- package/lib/module/zoomable-media-gallery/ZoomableMediaGallery.js.map +1 -0
- package/lib/module/{zoomable-image-gallery → zoomable-media-gallery}/constants.js.map +1 -1
- package/lib/module/zoomable-media-gallery/index.js +5 -0
- package/lib/module/zoomable-media-gallery/index.js.map +1 -0
- package/lib/module/zoomable-media-gallery/types.js +4 -0
- package/lib/module/{zoomable-image-gallery → zoomable-media-gallery}/types.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/media-flight/MediaFlightLayer.d.ts +11 -0
- package/lib/typescript/commonjs/media-flight/MediaFlightLayer.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-flight/MediaSurface.d.ts +106 -0
- package/lib/typescript/commonjs/media-flight/MediaSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-flight/constants.d.ts +18 -0
- package/lib/typescript/commonjs/media-flight/constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-flight/expo-video-module.d.ts +125 -0
- package/lib/typescript/commonjs/media-flight/expo-video-module.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-flight/index.d.ts +9 -0
- package/lib/typescript/commonjs/media-flight/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-flight/store.d.ts +132 -0
- package/lib/typescript/commonjs/media-flight/store.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-flight/types.d.ts +195 -0
- package/lib/typescript/commonjs/media-flight/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/media-flight/use-media-flight.d.ts +4 -0
- package/lib/typescript/commonjs/media-flight/use-media-flight.d.ts.map +1 -0
- package/lib/typescript/commonjs/zoomable-media-gallery/ZoomableMediaGallery.d.ts +5 -0
- package/lib/typescript/commonjs/zoomable-media-gallery/ZoomableMediaGallery.d.ts.map +1 -0
- package/lib/typescript/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/zoomable-media-gallery/index.d.ts +4 -0
- package/lib/typescript/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/zoomable-media-gallery/types.d.ts +90 -0
- package/lib/typescript/commonjs/zoomable-media-gallery/types.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/media-flight/MediaFlightLayer.d.ts +11 -0
- package/lib/typescript/module/media-flight/MediaFlightLayer.d.ts.map +1 -0
- package/lib/typescript/module/media-flight/MediaSurface.d.ts +106 -0
- package/lib/typescript/module/media-flight/MediaSurface.d.ts.map +1 -0
- package/lib/typescript/module/media-flight/constants.d.ts +18 -0
- package/lib/typescript/module/media-flight/constants.d.ts.map +1 -0
- package/lib/typescript/module/media-flight/expo-video-module.d.ts +125 -0
- package/lib/typescript/module/media-flight/expo-video-module.d.ts.map +1 -0
- package/lib/typescript/module/media-flight/index.d.ts +9 -0
- package/lib/typescript/module/media-flight/index.d.ts.map +1 -0
- package/lib/typescript/module/media-flight/store.d.ts +132 -0
- package/lib/typescript/module/media-flight/store.d.ts.map +1 -0
- package/lib/typescript/module/media-flight/types.d.ts +195 -0
- package/lib/typescript/module/media-flight/types.d.ts.map +1 -0
- package/lib/typescript/module/media-flight/use-media-flight.d.ts +4 -0
- package/lib/typescript/module/media-flight/use-media-flight.d.ts.map +1 -0
- package/lib/typescript/module/zoomable-media-gallery/ZoomableMediaGallery.d.ts +5 -0
- package/lib/typescript/module/zoomable-media-gallery/ZoomableMediaGallery.d.ts.map +1 -0
- package/lib/typescript/module/{zoomable-image-gallery → zoomable-media-gallery}/constants.d.ts.map +1 -1
- package/lib/typescript/module/zoomable-media-gallery/index.d.ts +4 -0
- package/lib/typescript/module/{zoomable-image-gallery → zoomable-media-gallery}/index.d.ts.map +1 -1
- package/lib/typescript/module/zoomable-media-gallery/types.d.ts +90 -0
- package/lib/typescript/module/zoomable-media-gallery/types.d.ts.map +1 -0
- package/package.json +42 -8
- package/src/image-aspect-ratio-cache/aspect-ratio-cache.ts +1 -1
- package/src/index.ts +2 -1
- package/src/index.web.ts +2 -1
- package/src/media-flight/MediaFlightLayer.tsx +144 -0
- package/src/media-flight/MediaSurface.tsx +251 -0
- package/src/media-flight/constants.ts +32 -0
- package/src/media-flight/expo-video-module.ts +212 -0
- package/src/media-flight/index.ts +34 -0
- package/src/media-flight/store.ts +497 -0
- package/src/media-flight/types.ts +210 -0
- package/src/media-flight/use-media-flight.ts +42 -0
- package/src/tab-bar/TabBarBase.tsx +1 -1
- package/src/{zoomable-image-gallery/ZoomableImageGallery.tsx → zoomable-media-gallery/ZoomableMediaGallery.tsx} +192 -117
- package/src/zoomable-media-gallery/index.ts +11 -0
- package/src/zoomable-media-gallery/types.ts +100 -0
- package/docs/zoomable-image-gallery.mdx +0 -66
- package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +0 -1
- package/lib/commonjs/zoomable-image-gallery/types.js +0 -2
- package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +0 -1
- package/lib/module/zoomable-image-gallery/index.js +0 -5
- package/lib/module/zoomable-image-gallery/index.js.map +0 -1
- package/lib/module/zoomable-image-gallery/types.js +0 -2
- package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts +0 -5
- package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +0 -1
- package/lib/typescript/commonjs/zoomable-image-gallery/index.d.ts +0 -4
- package/lib/typescript/commonjs/zoomable-image-gallery/types.d.ts +0 -56
- package/lib/typescript/commonjs/zoomable-image-gallery/types.d.ts.map +0 -1
- package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts +0 -5
- package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +0 -1
- package/lib/typescript/module/zoomable-image-gallery/index.d.ts +0 -4
- package/lib/typescript/module/zoomable-image-gallery/types.d.ts +0 -56
- package/lib/typescript/module/zoomable-image-gallery/types.d.ts.map +0 -1
- package/src/zoomable-image-gallery/index.ts +0 -9
- package/src/zoomable-image-gallery/types.ts +0 -59
- /package/lib/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/constants.js +0 -0
- /package/lib/module/{zoomable-image-gallery → zoomable-media-gallery}/constants.js +0 -0
- /package/lib/typescript/commonjs/{zoomable-image-gallery → zoomable-media-gallery}/constants.d.ts +0 -0
- /package/lib/typescript/module/{zoomable-image-gallery → zoomable-media-gallery}/constants.d.ts +0 -0
- /package/src/{zoomable-image-gallery → zoomable-media-gallery}/constants.ts +0 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.loadExpoVideo = loadExpoVideo;
|
|
7
|
+
exports.provideExpoVideo = provideExpoVideo;
|
|
8
|
+
exports.resetExpoVideoModule = resetExpoVideoModule;
|
|
9
|
+
exports.warnExpoVideoUnavailable = warnExpoVideoUnavailable;
|
|
10
|
+
/**
|
|
11
|
+
* The optional-peer boundary for `expo-video`.
|
|
12
|
+
*
|
|
13
|
+
* Bloom ships no native code and never will, so `expo-video` cannot be a hard
|
|
14
|
+
* dependency: an app that renders no video must not be made to install a native
|
|
15
|
+
* module. It is therefore an OPTIONAL peer, and a static `import` contradicts
|
|
16
|
+
* that — Metro resolves every static import in the eager graph, so an omitted
|
|
17
|
+
* "optional" peer does not degrade, it aborts the whole bundle with `Unable to
|
|
18
|
+
* resolve module expo-video`, naming a package the app never mentions.
|
|
19
|
+
*
|
|
20
|
+
* The load has to be dynamic in the ONE shape Metro understands: a `require()`
|
|
21
|
+
* of a STRING LITERAL as a DIRECT STATEMENT of a `try` block, which Metro
|
|
22
|
+
* collects as an optional dependency (resolving the real module when installed,
|
|
23
|
+
* writing `null` into the dependency map when it is not, so the failure lands in
|
|
24
|
+
* the `catch` below at evaluation time instead of at build time). One `if` of
|
|
25
|
+
* nesting loses that — `isOptionalDependency` returns at the FIRST BlockStatement
|
|
26
|
+
* it meets — hence the `typeof require` guard sits OUTSIDE the try.
|
|
27
|
+
*
|
|
28
|
+
* `require` may also not exist at all (this file backs the `import` condition
|
|
29
|
+
* too, i.e. an ESM build under Node), hence that guard.
|
|
30
|
+
*
|
|
31
|
+
* A missing video module is invisible — a poster where a video should be looks
|
|
32
|
+
* exactly like a video that has not started — so {@link warnExpoVideoUnavailable}
|
|
33
|
+
* names the package once, in dev.
|
|
34
|
+
*
|
|
35
|
+
* @see connection-status/netinfo.ts — the same boundary for netinfo.
|
|
36
|
+
* @see hooks/haptics-module.ts — the same boundary for expo-haptics.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Declared locally rather than taken from the ambient `NodeRequire`, which
|
|
41
|
+
* returns `any`: `unknown` forces the module handle to be narrowed below instead
|
|
42
|
+
* of leaking an untyped value into the caller.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The slice of `expo-video`'s `VideoPlayer` Bloom depends on.
|
|
47
|
+
*
|
|
48
|
+
* Hand-written rather than `typeof import('expo-video')` so no expo-video type
|
|
49
|
+
* reaches Bloom's emitted declarations — a consumer that skips the optional peer
|
|
50
|
+
* must not inherit a TS7016 from Bloom's own `.d.ts`. The two are kept in step by
|
|
51
|
+
* the assignability check in `__tests__/MediaFlight.test.tsx`, which is excluded
|
|
52
|
+
* from the build and so may name the real package.
|
|
53
|
+
*
|
|
54
|
+
* Bloom never CALLS any of this. **The consumer creates the player, owns it and
|
|
55
|
+
* destroys it**; Bloom only hands the object back to a `VideoView`, which is the
|
|
56
|
+
* whole mechanism that lets a video move between surfaces without restarting
|
|
57
|
+
* (expo-video's own docs: "when the same player is playing in multiple video
|
|
58
|
+
* views"). The three members below exist so the type is not `object` — a
|
|
59
|
+
* structural minimum the real `VideoPlayer` satisfies, and that an arbitrary
|
|
60
|
+
* object does not.
|
|
61
|
+
*
|
|
62
|
+
* `play`/`pause` are declared in METHOD syntax deliberately: `strictFunctionTypes`
|
|
63
|
+
* exempts method parameters from contravariance, which keeps a real
|
|
64
|
+
* `VideoPlayer` assignable here across `@types/react` copies.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
/** How a video is scaled inside its box. Mirrors expo-video's `VideoContentFit`. */
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Android's rendering surface for a video view.
|
|
71
|
+
*
|
|
72
|
+
* `textureView` is what Bloom asks for everywhere, because a `SurfaceView` is
|
|
73
|
+
* composited by the system OUTSIDE the app's view hierarchy: it ignores the
|
|
74
|
+
* parent's clip, corner radius and transform, so a video flying between two
|
|
75
|
+
* rects would paint as an un-rounded rectangle at the wrong place. It also
|
|
76
|
+
* cannot be changed at runtime (expo-video: "This prop should not be changed at
|
|
77
|
+
* runtime"), which is why {@link MediaSurfaceProps.surfaceType} is captured on
|
|
78
|
+
* first render.
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
/** The slice of `VideoViewProps` Bloom passes. */
|
|
82
|
+
|
|
83
|
+
/** The slice of expo-video's module surface Bloom renders. */
|
|
84
|
+
|
|
85
|
+
/** `undefined` until the first load attempt, then the module or `null`. */
|
|
86
|
+
let videoModule;
|
|
87
|
+
/** Set by {@link provideExpoVideo}; wins over the `require` below. */
|
|
88
|
+
let providedModule;
|
|
89
|
+
/** Why the load failed, quoted verbatim in the dev warning. */
|
|
90
|
+
let unavailableReason = '';
|
|
91
|
+
let hasWarned = false;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Hand Bloom the expo-video module explicitly.
|
|
95
|
+
*
|
|
96
|
+
* REQUIRED ON ANY ESM WEB BUNDLER, and measured rather than assumed: in a Vite
|
|
97
|
+
* bundle `typeof require` is `undefined`, so the optional-peer `require` below
|
|
98
|
+
* cannot run and video silently degrades to its poster **even when expo-video
|
|
99
|
+
* is installed**. Metro has a real `require` and is unaffected, which is why
|
|
100
|
+
* this went unnoticed — the app that uses this is Metro-built.
|
|
101
|
+
*
|
|
102
|
+
* There is no bundler-agnostic sync alternative: `import()` is async and this is
|
|
103
|
+
* called during render, so making it async would mean the surface renders
|
|
104
|
+
* without video for a frame and then upgrades. Handing the module over is
|
|
105
|
+
* explicit, synchronous, and costs the consumer one line at startup:
|
|
106
|
+
*
|
|
107
|
+
* ```ts
|
|
108
|
+
* import * as ExpoVideo from 'expo-video';
|
|
109
|
+
* provideExpoVideo(ExpoVideo);
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* Pass `null` to clear it.
|
|
113
|
+
*/
|
|
114
|
+
function provideExpoVideo(module) {
|
|
115
|
+
providedModule = module;
|
|
116
|
+
// Drop any cached `require` result so the next load reflects this decision.
|
|
117
|
+
videoModule = undefined;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** The expo-video module, or `null` when the optional peer is not installed. */
|
|
121
|
+
function loadExpoVideo() {
|
|
122
|
+
if (providedModule !== undefined && providedModule !== null) return providedModule;
|
|
123
|
+
if (videoModule !== undefined) return videoModule;
|
|
124
|
+
videoModule = null;
|
|
125
|
+
|
|
126
|
+
// The `typeof require` guard sits OUTSIDE the try on purpose — see the header.
|
|
127
|
+
// Nested one `if`/`else` deeper, the require below is no longer a direct
|
|
128
|
+
// statement of the try block, Metro stops marking it optional, and an app
|
|
129
|
+
// without expo-video fails to BUILD instead of losing the video surface.
|
|
130
|
+
if (typeof require === 'undefined') {
|
|
131
|
+
unavailableReason = 'this bundle has no CommonJS `require`';
|
|
132
|
+
return videoModule;
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
const loaded = require('expo-video');
|
|
136
|
+
// `VideoView` is a class component upstream, so `typeof` is `'function'`
|
|
137
|
+
// either way; a memo/forwardRef build would be an object carrying
|
|
138
|
+
// `$$typeof`. Both are accepted, nothing else is.
|
|
139
|
+
const resolved = isComponentBearing(loaded) ? loaded : loaded?.default;
|
|
140
|
+
if (isComponentBearing(resolved)) {
|
|
141
|
+
videoModule = {
|
|
142
|
+
VideoView: resolved.VideoView
|
|
143
|
+
};
|
|
144
|
+
} else {
|
|
145
|
+
unavailableReason = 'the module resolved without a `VideoView` export';
|
|
146
|
+
}
|
|
147
|
+
} catch (error) {
|
|
148
|
+
unavailableReason = error instanceof Error ? error.message : String(error);
|
|
149
|
+
}
|
|
150
|
+
return videoModule;
|
|
151
|
+
}
|
|
152
|
+
function isComponentBearing(candidate) {
|
|
153
|
+
const view = candidate?.VideoView;
|
|
154
|
+
if (typeof view === 'function') return true;
|
|
155
|
+
return typeof view === 'object' && view !== null && '$$typeof' in view;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* One warning per module lifetime, and none in production — the same mechanism
|
|
160
|
+
* as `connection-status/netinfo.ts` and `hooks/haptics-module.ts`. Metro and
|
|
161
|
+
* Vite/Rolldown both fold the `NODE_ENV` check statically, so a production
|
|
162
|
+
* bundle keeps neither the branch nor the message.
|
|
163
|
+
*/
|
|
164
|
+
function warnExpoVideoUnavailable() {
|
|
165
|
+
if (process.env.NODE_ENV === 'production' || hasWarned) return;
|
|
166
|
+
hasWarned = true;
|
|
167
|
+
// Internal Bloom diagnostic: only the consumer's package.json can fix this,
|
|
168
|
+
// so it names the package, the install command and what is lost.
|
|
169
|
+
// eslint-disable-next-line no-console
|
|
170
|
+
console.warn('[Bloom] A video media surface fell back to its poster: the optional peer ' + '`expo-video` could not be loaded, so no video is rendered and the shared ' + 'media transition carries a still frame instead. Install it ' + '(`npx expo install expo-video`) or pass image content only. ' + `Reason: ${unavailableReason}`);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** Test seam — drops the cached module handle so a suite can load it again. */
|
|
174
|
+
function resetExpoVideoModule() {
|
|
175
|
+
videoModule = undefined;
|
|
176
|
+
providedModule = undefined;
|
|
177
|
+
unavailableReason = '';
|
|
178
|
+
hasWarned = false;
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=expo-video-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["videoModule","providedModule","unavailableReason","hasWarned","provideExpoVideo","module","undefined","loadExpoVideo","require","loaded","resolved","isComponentBearing","default","VideoView","error","Error","message","String","candidate","view","warnExpoVideoUnavailable","process","env","NODE_ENV","console","warn","resetExpoVideoModule"],"sourceRoot":"../../../src","sources":["media-flight/expo-video-module.ts"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;;AAkBA;;AAKA;AACA,IAAIA,WAA6C;AACjD;AACA,IAAIC,cAAgD;AACpD;AACA,IAAIC,iBAAiB,GAAG,EAAE;AAC1B,IAAIC,SAAS,GAAG,KAAK;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,gBAAgBA,CAACC,MAA4B,EAAQ;EACnEJ,cAAc,GAAGI,MAAM;EACvB;EACAL,WAAW,GAAGM,SAAS;AACzB;;AAEA;AACO,SAASC,aAAaA,CAAA,EAAyB;EACpD,IAAIN,cAAc,KAAKK,SAAS,IAAIL,cAAc,KAAK,IAAI,EAAE,OAAOA,cAAc;EAClF,IAAID,WAAW,KAAKM,SAAS,EAAE,OAAON,WAAW;EACjDA,WAAW,GAAG,IAAI;;EAElB;EACA;EACA;EACA;EACA,IAAI,OAAOQ,OAAO,KAAK,WAAW,EAAE;IAClCN,iBAAiB,GAAG,uCAAuC;IAC3D,OAAOF,WAAW;EACpB;EAEA,IAAI;IACF,MAAMS,MAAM,GAAGD,OAAO,CAAC,YAAY,CAGtB;IACb;IACA;IACA;IACA,MAAME,QAAQ,GAAGC,kBAAkB,CAACF,MAAM,CAAC,GAAGA,MAAM,GAAGA,MAAM,EAAEG,OAAO;IAEtE,IAAID,kBAAkB,CAACD,QAAQ,CAAC,EAAE;MAChCV,WAAW,GAAG;QAAEa,SAAS,EAAEH,QAAQ,CAACG;MAA+C,CAAC;IACtF,CAAC,MAAM;MACLX,iBAAiB,GAAG,kDAAkD;IACxE;EACF,CAAC,CAAC,OAAOY,KAAK,EAAE;IACdZ,iBAAiB,GAAGY,KAAK,YAAYC,KAAK,GAAGD,KAAK,CAACE,OAAO,GAAGC,MAAM,CAACH,KAAK,CAAC;EAC5E;EAEA,OAAOd,WAAW;AACpB;AAEA,SAASW,kBAAkBA,CACzBO,SAA8E,EACU;EACxF,MAAMC,IAAI,GAAGD,SAAS,EAAEL,SAAS;EACjC,IAAI,OAAOM,IAAI,KAAK,UAAU,EAAE,OAAO,IAAI;EAC3C,OAAO,OAAOA,IAAI,KAAK,QAAQ,IAAIA,IAAI,KAAK,IAAI,IAAI,UAAU,IAAIA,IAAI;AACxE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,wBAAwBA,CAAA,EAAS;EAC/C,IAAIC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,IAAIpB,SAAS,EAAE;EACxDA,SAAS,GAAG,IAAI;EAChB;EACA;EACA;EACAqB,OAAO,CAACC,IAAI,CACV,2EAA2E,GACzE,2EAA2E,GAC3E,6DAA6D,GAC7D,8DAA8D,GAC9D,WAAWvB,iBAAiB,EAChC,CAAC;AACH;;AAEA;AACO,SAASwB,oBAAoBA,CAAA,EAAS;EAC3C1B,WAAW,GAAGM,SAAS;EACvBL,cAAc,GAAGK,SAAS;EAC1BJ,iBAAiB,GAAG,EAAE;EACtBC,SAAS,GAAG,KAAK;AACnB","ignoreList":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DEFAULT_FLIGHT_CORNER_RADIUS", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _store.DEFAULT_FLIGHT_CORNER_RADIUS;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "EmptyMediaSurface", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _MediaSurface.EmptyMediaSurface;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "MediaFlightLayer", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _MediaFlightLayer.MediaFlightLayer;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "MediaPoster", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _MediaSurface.MediaPoster;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "MediaSurface", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _MediaSurface.MediaSurface;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "SURFACE_MOUNT_TIMEOUT_MS", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _constants.SURFACE_MOUNT_TIMEOUT_MS;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "flightProgress", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _store.flightProgress;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "handOffFlight", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _store.handOffFlight;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "hasFlight", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _store.hasFlight;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "loadExpoVideo", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _expoVideoModule.loadExpoVideo;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "provideExpoVideo", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _expoVideoModule.provideExpoVideo;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "releaseFlight", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _store.releaseFlight;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "resetExpoVideoModule", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _expoVideoModule.resetExpoVideoModule;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "resetMediaFlight", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _store.resetMediaFlight;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "useMediaFlight", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _useMediaFlight.useMediaFlight;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "warnExpoVideoUnavailable", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _expoVideoModule.warnExpoVideoUnavailable;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
var _MediaFlightLayer = require("./MediaFlightLayer.js");
|
|
103
|
+
var _MediaSurface = require("./MediaSurface.js");
|
|
104
|
+
var _useMediaFlight = require("./use-media-flight.js");
|
|
105
|
+
var _store = require("./store.js");
|
|
106
|
+
var _constants = require("./constants.js");
|
|
107
|
+
var _expoVideoModule = require("./expo-video-module.js");
|
|
108
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_MediaFlightLayer","require","_MediaSurface","_useMediaFlight","_store","_constants","_expoVideoModule"],"sourceRoot":"../../../src","sources":["media-flight/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAQA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA","ignoreList":[]}
|