@assetlib/sdk-expo 0.6.1-preview.1 → 0.6.2-preview.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/README.md +1 -1
- package/package.json +2 -2
- package/src/telemetry.ts +1 -1
- package/src/video.tsx +5 -1
package/README.md
CHANGED
|
@@ -237,7 +237,7 @@ await client.flush();
|
|
|
237
237
|
client.dispose(); // Remove the AppState listener and stop observation timers.
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
The adapter identifies itself as `sdk-expo` version `0.6.
|
|
240
|
+
The adapter identifies itself as `sdk-expo` version `0.6.2-preview.1`. An explicit `telemetry.sdk` or `telemetry.build` takes precedence. When the runtime can optionally require `expo-application` or `expo-constants`, the adapter reads native app version and build number (falling back to Expo config version/build). Missing packages, unavailable runtime loaders, and throwing native bridges are ignored; no new dependency is required. Supply `build` explicitly for reliable production attribution, especially with bundlers that cannot resolve optional runtime requires or in Expo Go. Without complete runtime metadata or an explicit build, batches use platform `expo` and version/build `unknown`.
|
|
241
241
|
|
|
242
242
|
Only the observation contract fields are sent: environment, SDK name/version, build platform/version/number, random install ID, send time, and coalesced events with placement key, kind/count, source, asset ID/release sequence when known, effective arm/appearance when selected, and fallback reason. Bundle outcomes send only `fallback` events without asset ID or sequence. Dynamic catalog references do not emit observations because they have no placement key. Image bytes, descriptions, URLs, device identifiers, account identifiers, and status/error messages are not included.
|
|
243
243
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assetlib/sdk-expo",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2-preview.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.tsx",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test": "node --test test/*.test.mjs"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@assetlib/sdk-core": "0.6.
|
|
23
|
+
"@assetlib/sdk-core": "0.6.2-preview.1"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"expo": ">=57 <58",
|
package/src/telemetry.ts
CHANGED
|
@@ -48,7 +48,7 @@ export function expoTelemetry(telemetry: ClientOptions['telemetry']): ClientOpti
|
|
|
48
48
|
if (!telemetry?.enabled) return telemetry;
|
|
49
49
|
return {
|
|
50
50
|
...telemetry,
|
|
51
|
-
sdk: telemetry.sdk ?? { name: 'sdk-expo', version: '0.6.
|
|
51
|
+
sdk: telemetry.sdk ?? { name: 'sdk-expo', version: '0.6.2-preview.1' },
|
|
52
52
|
build: telemetry.build ?? runtimeBuild() ?? { platform: 'expo', appVersion: 'unknown', buildNumber: 'unknown' },
|
|
53
53
|
};
|
|
54
54
|
}
|
package/src/video.tsx
CHANGED
|
@@ -6,6 +6,10 @@ import { AssetlibImage, type AssetlibImageProps } from './index';
|
|
|
6
6
|
import { videoUri } from './platform';
|
|
7
7
|
import type { ImageUri } from './shared';
|
|
8
8
|
|
|
9
|
+
// On web, expo-video puts the style on the <video> element, which keeps its intrinsic size under
|
|
10
|
+
// absolute positioning alone; an explicit size makes the clip fill the placement like the poster.
|
|
11
|
+
const videoFill = { width: '100%', height: '100%' } as const;
|
|
12
|
+
|
|
9
13
|
export type AssetlibVideoProps<R extends AssetRef = AssetRef> = AssetlibImageProps<R> & {
|
|
10
14
|
/** Show the poster instead of playing, for example while the view is off screen. */
|
|
11
15
|
paused?: boolean;
|
|
@@ -68,7 +72,7 @@ function LoopingClip({ uri, contentFit, onFirstFrame, onFailure }: { uri: string
|
|
|
68
72
|
} catch { fail(); }
|
|
69
73
|
return () => { mounted = false; subscription.remove(); };
|
|
70
74
|
}, [player]);
|
|
71
|
-
return <VideoView ref={view} player={player} nativeControls={false} contentFit={contentFit} allowsPictureInPicture={false} playsInline style={StyleSheet.absoluteFill} onFirstFrameRender={() => callbacks.current.onFirstFrame()} />;
|
|
75
|
+
return <VideoView ref={view} player={player} nativeControls={false} contentFit={contentFit} allowsPictureInPicture={false} playsInline style={[StyleSheet.absoluteFill, videoFill]} onFirstFrameRender={() => callbacks.current.onFirstFrame()} />;
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
/**
|