Skip to main content

Function: getContentUriOpener()

function getContentUriOpener(): ContentUriOpener | undefined;

Defined in: packages/player/src/content-uri.ts:184

The platform's content:// opener, created on first use.

Returns

ContentUriOpener | undefined

The opener on Android, undefined everywhere else.

Remarks

Capability detection, not Platform.OS. The RnMediaContentSource HybridObject is declared for Android only, so createHybridObject throws on iOS — and on an Android binary built before this shipped, which is the same answer for the same reason. Asking the module registry rather than the platform keeps this package free of a react-native import in the playback path (the visualizer's AppState is the only one, and it is a hook), and it is the same shape getScreenStateSource() uses.

Memoised either way, so a missing native module costs one failed lookup per process rather than one per load.