react-native-alpha-video 0.0.0-stage → 1.0.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/LICENSE +21 -0
- package/README.md +908 -2
- package/THIRD_PARTY_NOTICES.md +30 -0
- package/android/av1/build.gradle +67 -0
- package/android/av1/consumer-rules.pro +4 -0
- package/android/av1/src/main/cpp/Av1Codec_jni.cpp +8 -0
- package/android/av1/src/main/cpp/CMakeLists.txt +34 -0
- package/android/av1/src/main/java/dev/mediacache/alphavideo/av1/Av1Codec.java +21 -0
- package/android/build.gradle +90 -0
- package/android/consumer-rules.pro +2 -0
- package/android/gradle.properties +1 -0
- package/android/publish.gradle +82 -0
- package/android/settings.gradle +5 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/cpp/CMakeLists.txt +59 -0
- package/android/src/main/java/dev/mediacache/alphavideo/AlphaVideoCodecs.java +73 -0
- package/android/src/main/java/dev/mediacache/alphavideo/AlphaVideoView.java +1982 -0
- package/android/src/main/java/dev/mediacache/alphavideo/BufferedDualStreamPlayer.java +978 -0
- package/android/src/main/java/dev/mediacache/alphavideo/Fetcher.java +37 -0
- package/android/src/main/java/dev/mediacache/alphavideo/HttpFetcher.java +156 -0
- package/android/src/main/java/dev/mediacache/alphavideo/MediaCodecColor.java +47 -0
- package/android/src/main/java/dev/mediacache/alphavideo/MediaCodecDecoders.java +135 -0
- package/android/src/main/java/dev/mediacache/alphavideo/RangeSourceLink.java +54 -0
- package/android/src/main/java/dev/mediacache/alphavideo/SourceReader.java +174 -0
- package/android/src/main/java/dev/mediacache/alphavideo/SurfaceTextureVideoDecoder.java +802 -0
- package/android/src/main/java/dev/mediacache/alphavideo/WebMAlphaPlayerNative.java +95 -0
- package/android/src/main/java/dev/mediacache/alphavideo/WebMFrame.java +54 -0
- package/android/src/main/java/dev/mediacache/alphavideo/WebMSource.java +160 -0
- package/android/src/rangesource/java/dev/mediacache/alphavideo/AppDataSource.java +50 -0
- package/android/vpx/build.gradle +67 -0
- package/android/vpx/consumer-rules.pro +4 -0
- package/android/vpx/src/main/cpp/CMakeLists.txt +34 -0
- package/android/vpx/src/main/cpp/VpxCodec_jni.cpp +8 -0
- package/android/vpx/src/main/java/dev/mediacache/alphavideo/vpx/VpxCodec.java +21 -0
- package/codecs/av1/Dav1dDecoderPlugin.cpp +157 -0
- package/codecs/av1/Dav1dDecoderPlugin.h +17 -0
- package/codecs/vpx/VpxDecoderPlugin.cpp +103 -0
- package/codecs/vpx/VpxDecoderPlugin.h +17 -0
- package/cpp/AlphaDemuxer.cpp +984 -0
- package/cpp/AlphaDemuxer.h +123 -0
- package/cpp/AlphaVideoDecoderPlugin.h +84 -0
- package/cpp/Av1SequenceHeader.cpp +175 -0
- package/cpp/Av1SequenceHeader.h +25 -0
- package/cpp/ByteSource.cpp +116 -0
- package/cpp/ByteSource.h +59 -0
- package/cpp/RangeSourceClient.h +40 -0
- package/cpp/VideoDecoder.cpp +157 -0
- package/cpp/VideoDecoder.h +83 -0
- package/cpp/WebMAlphaPlayer.cpp +1666 -0
- package/cpp/WebMAlphaPlayer.h +389 -0
- package/cpp/WebMAlphaPlayer_jni.cpp +1380 -0
- package/cpp/YuvToRgb.cpp +39 -0
- package/cpp/YuvToRgb.h +40 -0
- package/ios/Sources/AlphaVideo/AlphaVideoCodecs.mm +63 -0
- package/ios/Sources/AlphaVideo/AlphaVideoInternal.h +70 -0
- package/ios/Sources/AlphaVideo/AlphaVideoPlayer.mm +994 -0
- package/ios/Sources/AlphaVideo/AlphaVideoSource.mm +476 -0
- package/ios/Sources/AlphaVideo/AlphaVideoView.mm +374 -0
- package/ios/Sources/AlphaVideo/include/AlphaVideo.h +303 -0
- package/ios/Sources/AlphaVideoAV1/AlphaVideoAV1Codec.mm +16 -0
- package/ios/Sources/AlphaVideoAV1/include/AlphaVideoAV1.h +18 -0
- package/ios/Sources/AlphaVideoVPX/AlphaVideoVPXCodec.mm +16 -0
- package/ios/Sources/AlphaVideoVPX/include/AlphaVideoVPX.h +17 -0
- package/lib/commonjs/AlphaVideoView.js +187 -0
- package/lib/commonjs/AlphaVideoView.js.map +1 -0
- package/lib/commonjs/AlphaVideoViewNativeComponent.js +47 -0
- package/lib/commonjs/AlphaVideoViewNativeComponent.js.map +1 -0
- package/lib/commonjs/AlphaVideoViewNativeComponent.web.js +11 -0
- package/lib/commonjs/AlphaVideoViewNativeComponent.web.js.map +1 -0
- package/lib/commonjs/NativeAlphaVideoModule.js +10 -0
- package/lib/commonjs/NativeAlphaVideoModule.js.map +1 -0
- package/lib/commonjs/NativeAlphaVideoModule.web.js +9 -0
- package/lib/commonjs/NativeAlphaVideoModule.web.js.map +1 -0
- package/lib/commonjs/WebPlayer.js +12 -0
- package/lib/commonjs/WebPlayer.js.map +1 -0
- package/lib/commonjs/WebPlayer.web.js +115 -0
- package/lib/commonjs/WebPlayer.web.js.map +1 -0
- package/lib/commonjs/index.js +124 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/AlphaVideoView.js +187 -0
- package/lib/module/AlphaVideoView.js.map +1 -0
- package/lib/module/AlphaVideoViewNativeComponent.js +47 -0
- package/lib/module/AlphaVideoViewNativeComponent.js.map +1 -0
- package/lib/module/AlphaVideoViewNativeComponent.web.js +11 -0
- package/lib/module/AlphaVideoViewNativeComponent.web.js.map +1 -0
- package/lib/module/NativeAlphaVideoModule.js +10 -0
- package/lib/module/NativeAlphaVideoModule.js.map +1 -0
- package/lib/module/NativeAlphaVideoModule.web.js +9 -0
- package/lib/module/NativeAlphaVideoModule.web.js.map +1 -0
- package/lib/module/WebPlayer.js +12 -0
- package/lib/module/WebPlayer.js.map +1 -0
- package/lib/module/WebPlayer.web.js +115 -0
- package/lib/module/WebPlayer.web.js.map +1 -0
- package/lib/module/index.js +124 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/react-native/src/AlphaVideoView.d.ts +189 -0
- package/lib/typescript/react-native/src/AlphaVideoView.d.ts.map +1 -0
- package/lib/typescript/react-native/src/AlphaVideoViewNativeComponent.d.ts +109 -0
- package/lib/typescript/react-native/src/AlphaVideoViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/react-native/src/AlphaVideoViewNativeComponent.web.d.ts +5 -0
- package/lib/typescript/react-native/src/AlphaVideoViewNativeComponent.web.d.ts.map +1 -0
- package/lib/typescript/react-native/src/NativeAlphaVideoModule.d.ts +21 -0
- package/lib/typescript/react-native/src/NativeAlphaVideoModule.d.ts.map +1 -0
- package/lib/typescript/react-native/src/NativeAlphaVideoModule.web.d.ts +3 -0
- package/lib/typescript/react-native/src/NativeAlphaVideoModule.web.d.ts.map +1 -0
- package/lib/typescript/react-native/src/WebPlayer.d.ts +3 -0
- package/lib/typescript/react-native/src/WebPlayer.d.ts.map +1 -0
- package/lib/typescript/react-native/src/WebPlayer.web.d.ts +9 -0
- package/lib/typescript/react-native/src/WebPlayer.web.d.ts.map +1 -0
- package/lib/typescript/react-native/src/index.d.ts +77 -0
- package/lib/typescript/react-native/src/index.d.ts.map +1 -0
- package/licenses/dav1d-COPYING.txt +23 -0
- package/licenses/libvpx-LICENSE.txt +31 -0
- package/licenses/libvpx-PATENTS.txt +23 -0
- package/licenses/libwebm-LICENSE.txt +30 -0
- package/licenses/libwebm-PATENTS.txt +23 -0
- package/package.json +152 -4
- package/prebuilt/android/arm64-v8a/lib/libdav1d.a +0 -0
- package/prebuilt/android/arm64-v8a/lib/libvpx.a +0 -0
- package/prebuilt/android/armeabi-v7a/lib/libdav1d.a +0 -0
- package/prebuilt/android/armeabi-v7a/lib/libvpx.a +0 -0
- package/prebuilt/android/x86_64/lib/libdav1d.a +0 -0
- package/prebuilt/android/x86_64/lib/libvpx.a +0 -0
- package/prebuilt/include/dav1d/common.h +94 -0
- package/prebuilt/include/dav1d/data.h +117 -0
- package/prebuilt/include/dav1d/dav1d.h +329 -0
- package/prebuilt/include/dav1d/headers.h +440 -0
- package/prebuilt/include/dav1d/picture.h +157 -0
- package/prebuilt/include/dav1d/version.h +50 -0
- package/prebuilt/include/vpx/vp8.h +136 -0
- package/prebuilt/include/vpx/vp8dx.h +228 -0
- package/prebuilt/include/vpx/vpx_codec.h +475 -0
- package/prebuilt/include/vpx/vpx_decoder.h +365 -0
- package/prebuilt/include/vpx/vpx_frame_buffer.h +83 -0
- package/prebuilt/include/vpx/vpx_image.h +209 -0
- package/prebuilt/include/vpx/vpx_integer.h +40 -0
- package/prebuilt/ios/lib/libdav1d.a +0 -0
- package/prebuilt/ios/lib/libvpx.a +0 -0
- package/prebuilt/ios-simulator/include/dav1d/common.h +94 -0
- package/prebuilt/ios-simulator/include/dav1d/data.h +117 -0
- package/prebuilt/ios-simulator/include/dav1d/dav1d.h +329 -0
- package/prebuilt/ios-simulator/include/dav1d/headers.h +440 -0
- package/prebuilt/ios-simulator/include/dav1d/picture.h +157 -0
- package/prebuilt/ios-simulator/include/dav1d/version.h +50 -0
- package/prebuilt/ios-simulator/include/vpx/vp8.h +136 -0
- package/prebuilt/ios-simulator/include/vpx/vp8dx.h +228 -0
- package/prebuilt/ios-simulator/include/vpx/vpx_codec.h +475 -0
- package/prebuilt/ios-simulator/include/vpx/vpx_decoder.h +365 -0
- package/prebuilt/ios-simulator/include/vpx/vpx_frame_buffer.h +83 -0
- package/prebuilt/ios-simulator/include/vpx/vpx_image.h +209 -0
- package/prebuilt/ios-simulator/include/vpx/vpx_integer.h +40 -0
- package/prebuilt/ios-simulator/lib/libdav1d.a +0 -0
- package/prebuilt/ios-simulator/lib/libvpx.a +0 -0
- package/react-native/android/CMakeLists.txt +14 -0
- package/react-native/android/build.gradle +113 -0
- package/react-native/android/src/main/AndroidManifest.xml +1 -0
- package/react-native/android/src/main/java/dev/mediacache/alphavideo/reactnative/AlphaVideoModule.java +102 -0
- package/react-native/android/src/main/java/dev/mediacache/alphavideo/reactnative/AlphaVideoPackage.java +50 -0
- package/react-native/android/src/main/java/dev/mediacache/alphavideo/reactnative/AlphaVideoViewManager.java +317 -0
- package/react-native/android/src/newarch/java/dev/mediacache/alphavideo/reactnative/AlphaVideoModuleSpec.java +10 -0
- package/react-native/android/src/newarch/java/dev/mediacache/alphavideo/reactnative/AlphaVideoViewManagerSpec.java +23 -0
- package/react-native/android/src/norangesource/java/dev/mediacache/alphavideo/AppDataSource.java +15 -0
- package/react-native/android/src/oldarch/java/dev/mediacache/alphavideo/reactnative/AlphaVideoModuleSpec.java +30 -0
- package/react-native/android/src/oldarch/java/dev/mediacache/alphavideo/reactnative/AlphaVideoViewManagerSpec.java +61 -0
- package/react-native/ios/RNAlphaVideoViewComponentView.mm +173 -0
- package/react-native/ios/RNAlphaVideoViewManager.mm +147 -0
- package/react-native/src/AlphaVideoView.tsx +329 -0
- package/react-native/src/AlphaVideoViewNativeComponent.ts +132 -0
- package/react-native/src/AlphaVideoViewNativeComponent.web.ts +5 -0
- package/react-native/src/NativeAlphaVideoModule.ts +22 -0
- package/react-native/src/NativeAlphaVideoModule.web.ts +2 -0
- package/react-native/src/WebPlayer.tsx +7 -0
- package/react-native/src/WebPlayer.web.tsx +87 -0
- package/react-native/src/index.tsx +144 -0
- package/react-native-alpha-video.podspec +99 -0
- package/react-native.config.js +12 -0
- package/scripts/build_codecs_android.sh +246 -0
- package/scripts/build_codecs_ios.sh +31 -0
- package/scripts/build_codecs_ios_device.sh +210 -0
- package/scripts/build_codecs_ios_simulator.sh +256 -0
- package/scripts/build_wasm.sh +230 -0
- package/scripts/build_xcframework.sh +49 -0
- package/scripts/fetch-prebuilt.sh +48 -0
- package/scripts/package_release.sh +107 -0
- package/scripts/publish-android.sh +85 -0
- package/scripts/vendor_range_source.sh +47 -0
- package/third_party/libwebm/AUTHORS.TXT +5 -0
- package/third_party/libwebm/LICENSE.TXT +30 -0
- package/third_party/libwebm/PATENTS.TXT +23 -0
- package/third_party/libwebm/README.md +7 -0
- package/third_party/libwebm/webm_parser/include/webm/buffer_reader.h +138 -0
- package/third_party/libwebm/webm_parser/include/webm/callback.h +363 -0
- package/third_party/libwebm/webm_parser/include/webm/dom_types.h +1781 -0
- package/third_party/libwebm/webm_parser/include/webm/element.h +208 -0
- package/third_party/libwebm/webm_parser/include/webm/file_reader.h +103 -0
- package/third_party/libwebm/webm_parser/include/webm/id.h +1085 -0
- package/third_party/libwebm/webm_parser/include/webm/istream_reader.h +99 -0
- package/third_party/libwebm/webm_parser/include/webm/reader.h +94 -0
- package/third_party/libwebm/webm_parser/include/webm/status.h +166 -0
- package/third_party/libwebm/webm_parser/include/webm/webm_parser.h +133 -0
- package/third_party/libwebm/webm_parser/src/ancestory.cc +334 -0
- package/third_party/libwebm/webm_parser/src/ancestory.h +83 -0
- package/third_party/libwebm/webm_parser/src/audio_parser.h +84 -0
- package/third_party/libwebm/webm_parser/src/bit_utils.cc +26 -0
- package/third_party/libwebm/webm_parser/src/bit_utils.h +24 -0
- package/third_party/libwebm/webm_parser/src/block_additions_parser.h +30 -0
- package/third_party/libwebm/webm_parser/src/block_group_parser.h +71 -0
- package/third_party/libwebm/webm_parser/src/block_header_parser.cc +76 -0
- package/third_party/libwebm/webm_parser/src/block_header_parser.h +65 -0
- package/third_party/libwebm/webm_parser/src/block_more_parser.h +32 -0
- package/third_party/libwebm/webm_parser/src/block_parser.cc +285 -0
- package/third_party/libwebm/webm_parser/src/block_parser.h +126 -0
- package/third_party/libwebm/webm_parser/src/bool_parser.h +95 -0
- package/third_party/libwebm/webm_parser/src/buffer_reader.cc +110 -0
- package/third_party/libwebm/webm_parser/src/byte_parser.h +144 -0
- package/third_party/libwebm/webm_parser/src/callback.cc +155 -0
- package/third_party/libwebm/webm_parser/src/chapter_atom_parser.h +42 -0
- package/third_party/libwebm/webm_parser/src/chapter_display_parser.h +34 -0
- package/third_party/libwebm/webm_parser/src/chapters_parser.h +28 -0
- package/third_party/libwebm/webm_parser/src/cluster_parser.h +48 -0
- package/third_party/libwebm/webm_parser/src/colour_parser.h +55 -0
- package/third_party/libwebm/webm_parser/src/content_enc_aes_settings_parser.h +32 -0
- package/third_party/libwebm/webm_parser/src/content_encoding_parser.h +38 -0
- package/third_party/libwebm/webm_parser/src/content_encodings_parser.h +30 -0
- package/third_party/libwebm/webm_parser/src/content_encryption_parser.h +37 -0
- package/third_party/libwebm/webm_parser/src/cue_point_parser.h +38 -0
- package/third_party/libwebm/webm_parser/src/cue_track_positions_parser.h +39 -0
- package/third_party/libwebm/webm_parser/src/cues_parser.h +27 -0
- package/third_party/libwebm/webm_parser/src/date_parser.cc +72 -0
- package/third_party/libwebm/webm_parser/src/date_parser.h +64 -0
- package/third_party/libwebm/webm_parser/src/ebml_parser.h +48 -0
- package/third_party/libwebm/webm_parser/src/edition_entry_parser.h +35 -0
- package/third_party/libwebm/webm_parser/src/element_parser.h +102 -0
- package/third_party/libwebm/webm_parser/src/file_reader.cc +142 -0
- package/third_party/libwebm/webm_parser/src/float_parser.cc +77 -0
- package/third_party/libwebm/webm_parser/src/float_parser.h +65 -0
- package/third_party/libwebm/webm_parser/src/id_element_parser.cc +49 -0
- package/third_party/libwebm/webm_parser/src/id_element_parser.h +56 -0
- package/third_party/libwebm/webm_parser/src/id_parser.cc +75 -0
- package/third_party/libwebm/webm_parser/src/id_parser.h +45 -0
- package/third_party/libwebm/webm_parser/src/info_parser.h +44 -0
- package/third_party/libwebm/webm_parser/src/int_parser.h +121 -0
- package/third_party/libwebm/webm_parser/src/istream_reader.cc +133 -0
- package/third_party/libwebm/webm_parser/src/master_parser.cc +298 -0
- package/third_party/libwebm/webm_parser/src/master_parser.h +230 -0
- package/third_party/libwebm/webm_parser/src/master_value_parser.h +533 -0
- package/third_party/libwebm/webm_parser/src/mastering_metadata_parser.h +57 -0
- package/third_party/libwebm/webm_parser/src/parser.h +34 -0
- package/third_party/libwebm/webm_parser/src/parser_utils.cc +34 -0
- package/third_party/libwebm/webm_parser/src/parser_utils.h +64 -0
- package/third_party/libwebm/webm_parser/src/projection_parser.h +40 -0
- package/third_party/libwebm/webm_parser/src/recursive_parser.h +93 -0
- package/third_party/libwebm/webm_parser/src/seek_head_parser.h +27 -0
- package/third_party/libwebm/webm_parser/src/seek_parser.h +37 -0
- package/third_party/libwebm/webm_parser/src/segment_parser.cc +86 -0
- package/third_party/libwebm/webm_parser/src/segment_parser.h +53 -0
- package/third_party/libwebm/webm_parser/src/simple_tag_parser.h +37 -0
- package/third_party/libwebm/webm_parser/src/size_parser.cc +56 -0
- package/third_party/libwebm/webm_parser/src/size_parser.h +43 -0
- package/third_party/libwebm/webm_parser/src/skip_callback.h +63 -0
- package/third_party/libwebm/webm_parser/src/skip_parser.cc +59 -0
- package/third_party/libwebm/webm_parser/src/skip_parser.h +35 -0
- package/third_party/libwebm/webm_parser/src/slices_parser.h +30 -0
- package/third_party/libwebm/webm_parser/src/tag_parser.h +37 -0
- package/third_party/libwebm/webm_parser/src/tags_parser.h +27 -0
- package/third_party/libwebm/webm_parser/src/targets_parser.h +35 -0
- package/third_party/libwebm/webm_parser/src/time_slice_parser.h +30 -0
- package/third_party/libwebm/webm_parser/src/track_entry_parser.h +65 -0
- package/third_party/libwebm/webm_parser/src/tracks_parser.h +27 -0
- package/third_party/libwebm/webm_parser/src/unknown_parser.cc +49 -0
- package/third_party/libwebm/webm_parser/src/unknown_parser.h +38 -0
- package/third_party/libwebm/webm_parser/src/var_int_parser.cc +71 -0
- package/third_party/libwebm/webm_parser/src/var_int_parser.h +56 -0
- package/third_party/libwebm/webm_parser/src/video_parser.h +122 -0
- package/third_party/libwebm/webm_parser/src/virtual_block_parser.cc +72 -0
- package/third_party/libwebm/webm_parser/src/virtual_block_parser.h +69 -0
- package/third_party/libwebm/webm_parser/src/void_parser.cc +49 -0
- package/third_party/libwebm/webm_parser/src/void_parser.h +41 -0
- package/third_party/libwebm/webm_parser/src/webm_parser.cc +282 -0
- package/third_party/range-source/LICENSE +21 -0
- package/third_party/range-source/README.md +8 -0
- package/third_party/range-source/include/range_source.h +395 -0
- package/third_party/range-source/include/range_source_download.h +309 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The player view, split out from the package barrel.
|
|
3
|
+
*
|
|
4
|
+
* Separate from `index.tsx` so that anything built ON the player can import it without the barrel
|
|
5
|
+
* importing that code back. A cycle through the entry point happens to work while every reference
|
|
6
|
+
* is inside a render, which makes it a trap rather than a design.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { ViewProps, StyleProp, ViewStyle } from 'react-native';
|
|
10
|
+
import { type Decoder } from './AlphaVideoViewNativeComponent';
|
|
11
|
+
import type { ByteSource } from 'alpha-video-web';
|
|
12
|
+
export type { Decoder, ByteSource };
|
|
13
|
+
/**
|
|
14
|
+
* The web engine (default `'auto'`): `'browser'` (`<video>`), `'webcodecs'`, `'webcodecs-hw'`,
|
|
15
|
+
* `'webcodecs-sw'` or `'software'` (WebAssembly). `'auto'` tries them in that order and uses the
|
|
16
|
+
* first that shows the alpha; a forced engine never falls back.
|
|
17
|
+
*/
|
|
18
|
+
export type WebDecoder = 'auto' | 'browser' | 'webcodecs' | 'webcodecs-hw' | 'webcodecs-sw' | 'software';
|
|
19
|
+
/**
|
|
20
|
+
* Source types for WebM video
|
|
21
|
+
*/
|
|
22
|
+
export interface AlphaVideoSource {
|
|
23
|
+
/**
|
|
24
|
+
* https:// (read by range as it plays), file://, an absolute path, asset://relative/path
|
|
25
|
+
* (app bundle / APK assets; the site root on web), content:// (Android), or
|
|
26
|
+
* Image.resolveAssetSource(require(...)).uri. With `dataSource`, any URI that source reads.
|
|
27
|
+
*/
|
|
28
|
+
uri: string;
|
|
29
|
+
/** Names the stored copy, for URLs that change while the file doesn't (presigned URLs); same as the `cacheKey` prop */
|
|
30
|
+
cacheKey?: string;
|
|
31
|
+
/** Sent with every request for the URL, e.g. Authorization; given to a `dataSource` too */
|
|
32
|
+
headers?: Record<string, string>;
|
|
33
|
+
/**
|
|
34
|
+
* Read the file through the data source registered under this name instead of the built-in
|
|
35
|
+
* fetcher: range-source's `RangeDataSources` on Android and iOS, and range-source-web's on the
|
|
36
|
+
* web. MediaCache registers as `'mediacache'` with `cache.registerRangeDataSource()`.
|
|
37
|
+
*/
|
|
38
|
+
dataSource?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Web only: the file itself (a Blob or File), or a byte source that reads it by offset
|
|
42
|
+
* (`{ size, read(offset, length, signal) }`, the app's own fetcher or decryption). Keep the same
|
|
43
|
+
* object between renders: a new one loads again. On iOS and Android use `source.dataSource`.
|
|
44
|
+
*/
|
|
45
|
+
export type AlphaVideoWebSource = Blob | ByteSource;
|
|
46
|
+
/** True for `{ uri, ... }`, false for a web-only Blob or byte source. */
|
|
47
|
+
export declare function isUriSource(source: AlphaVideoSource | AlphaVideoWebSource | null | undefined): source is AlphaVideoSource;
|
|
48
|
+
/**
|
|
49
|
+
* Where a URL's bytes are kept between plays, read back by range: `'disk'` (the cache folder;
|
|
50
|
+
* OPFS, else IndexedDB, on the web), `'memory'` (for the app's lifetime) or `'none'`. `'auto'`,
|
|
51
|
+
* the default, is `'disk'` for URLs and `'none'` for a `dataSource` and local files.
|
|
52
|
+
*/
|
|
53
|
+
export type AlphaVideoStorage = 'auto' | 'disk' | 'memory' | 'none';
|
|
54
|
+
/**
|
|
55
|
+
* Props for the AlphaVideoView component
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Playback mode for the WebM player.
|
|
59
|
+
*/
|
|
60
|
+
export type PlaybackMode = 'preload' | 'stream' | 'streamAndPreload';
|
|
61
|
+
export interface AlphaVideoLoadEvent {
|
|
62
|
+
totalFrames: number;
|
|
63
|
+
width: number;
|
|
64
|
+
height: number;
|
|
65
|
+
/**
|
|
66
|
+
* The engine and decoders playing the file: `'software (libvpx)'`, `'software (dav1d)'` (AV1),
|
|
67
|
+
* `'mediacodec-hw (c2.qti.vp9.decoder)'`, `'mediacodec-sw (...)'`, `'mediacodec (hardware, software)'`
|
|
68
|
+
* for one of each. On the web: `'browser'`, `'webcodecs (vp09.00.41.08)'` (with the alpha track's
|
|
69
|
+
* codec when it differs), `'software (vp9)'`, `'software (vp9, 4+2 threads)'` or `'software (dav1d)'`.
|
|
70
|
+
*/
|
|
71
|
+
decoder: string;
|
|
72
|
+
}
|
|
73
|
+
export interface AlphaVideoViewProps extends ViewProps {
|
|
74
|
+
/** Video source URL or path; on the web also a Blob or byte source ({@link AlphaVideoWebSource}) */
|
|
75
|
+
source: AlphaVideoSource | AlphaVideoWebSource;
|
|
76
|
+
/** Auto-play video when loaded (default: true) */
|
|
77
|
+
autoPlay?: boolean;
|
|
78
|
+
/** Loop video playback (default: true) */
|
|
79
|
+
loop?: boolean;
|
|
80
|
+
/** Pause video playback (default: false) */
|
|
81
|
+
paused?: boolean;
|
|
82
|
+
/** Playback speed multiplier (default: 1.0) */
|
|
83
|
+
playbackSpeed?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Names the stored copy instead of the URL, for URLs that change while the file doesn't
|
|
86
|
+
* (presigned URLs). `source.cacheKey` wins over it.
|
|
87
|
+
*/
|
|
88
|
+
cacheKey?: string;
|
|
89
|
+
/** See {@link AlphaVideoStorage}. */
|
|
90
|
+
storage?: AlphaVideoStorage;
|
|
91
|
+
/**
|
|
92
|
+
* Cap on the bytes this player stores across every clip, evicting the least recently played
|
|
93
|
+
* (default 512 MB).
|
|
94
|
+
*/
|
|
95
|
+
maxStorageBytes?: number;
|
|
96
|
+
/**
|
|
97
|
+
* Playback mode for the player.
|
|
98
|
+
* - 'stream' (default): Decode frames on-demand with a sliding window cache.
|
|
99
|
+
* - 'preload': Decode all frames upfront before playback starts.
|
|
100
|
+
* - 'streamAndPreload': Start playing immediately while decoding in background.
|
|
101
|
+
*
|
|
102
|
+
* Applies to the software decoders only: a file MediaCodec plays on Android (see `decoder`) decodes as it is read.
|
|
103
|
+
*/
|
|
104
|
+
mode?: PlaybackMode;
|
|
105
|
+
/**
|
|
106
|
+
* Android: the decoder for files with colour and alpha as separate VP8/VP9/AV1 bitstreams
|
|
107
|
+
* (default `'auto'`; see {@link Decoder}). `onLoad` reports the one used. iOS always uses
|
|
108
|
+
* the C++ core; the web has `webDecoder`.
|
|
109
|
+
*/
|
|
110
|
+
decoder?: Decoder;
|
|
111
|
+
/** Web: the engine (default `'auto'`; see {@link WebDecoder}). `onLoad` reports the one used. */
|
|
112
|
+
webDecoder?: WebDecoder;
|
|
113
|
+
/**
|
|
114
|
+
* @deprecated Use `mode` instead.
|
|
115
|
+
* Enable streaming mode for low RAM usage.
|
|
116
|
+
* When true: decode on-demand with sliding window cache (good for long videos like YouTube)
|
|
117
|
+
* When false: preload all frames to RAM (good for short loops like glow effects)
|
|
118
|
+
* When omitted, `mode` (default 'stream') applies.
|
|
119
|
+
*/
|
|
120
|
+
stream?: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Number of frames decoded ahead of the shown one when streaming. Stream mode keeps only
|
|
123
|
+
* these, so this is also its memory: more absorbs slow decodes, fewer uses less memory.
|
|
124
|
+
* Default: 8 frames (about 0.27 seconds at 30fps)
|
|
125
|
+
* Only used when mode='stream'
|
|
126
|
+
*/
|
|
127
|
+
streamPrefetchAhead?: number;
|
|
128
|
+
/**
|
|
129
|
+
* Enable global decode queue for non-stream mode.
|
|
130
|
+
* When true (default): decoding is serialized across all players, preventing CPU saturation
|
|
131
|
+
* When false: each player decodes independently (can freeze with many)
|
|
132
|
+
* Has no effect when mode='stream'.
|
|
133
|
+
*/
|
|
134
|
+
useDecodeQueue?: boolean;
|
|
135
|
+
/**
|
|
136
|
+
* Enable verbose per-frame logging for debugging.
|
|
137
|
+
* When true: logs every frame queue, release, and render event.
|
|
138
|
+
* When false (default): only logs lifecycle events and periodic performance stats.
|
|
139
|
+
*/
|
|
140
|
+
verbose?: boolean;
|
|
141
|
+
/** Container style */
|
|
142
|
+
style?: StyleProp<ViewStyle>;
|
|
143
|
+
/** Callback when video loads */
|
|
144
|
+
onLoad?: (event: AlphaVideoLoadEvent) => void;
|
|
145
|
+
/**
|
|
146
|
+
* Callback when error occurs. On the web, `code` tells the errors apart: `'LOAD_FAILED'`,
|
|
147
|
+
* `'UNSUPPORTED_FILE'`, `'NO_ALPHA_PATH'`, `'DECODER_UNSUPPORTED'`, `'DECODE_FAILED'`, `'WEBGL_UNSUPPORTED'`
|
|
148
|
+
* or `'NEEDS_SERVICE_WORKER'`.
|
|
149
|
+
* On iOS and Android, `'NO_DECODER'` is a file needing a codec left out of the build (see the
|
|
150
|
+
* app's `package.json` `"react-native-alpha-video": { "codecs": [...] }`); other errors have none.
|
|
151
|
+
*/
|
|
152
|
+
onError?: (event: {
|
|
153
|
+
error: string;
|
|
154
|
+
code?: string;
|
|
155
|
+
}) => void;
|
|
156
|
+
/** Callback when video ends */
|
|
157
|
+
onEnd?: (event: {}) => void;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Methods exposed by the AlphaVideoView ref
|
|
161
|
+
*/
|
|
162
|
+
export interface AlphaVideoViewRef {
|
|
163
|
+
play: () => void;
|
|
164
|
+
pause: () => void;
|
|
165
|
+
stop: () => void;
|
|
166
|
+
/** Shows that frame (clamped to the clip) and keeps playing or stays paused. */
|
|
167
|
+
seekToFrame: (frame: number) => void;
|
|
168
|
+
/** Seeks to the frame showing at that time, in seconds. */
|
|
169
|
+
seekToTime: (seconds: number) => void;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* AlphaVideoView - Cross-platform WebM VP8/VP9/AV1 video player with alpha transparency support
|
|
173
|
+
*
|
|
174
|
+
* Uses native C++ implementation with Metal (iOS) and OpenGL ES (Android) for optimal performance.
|
|
175
|
+
* On the web, alpha-video-web: `<video>` where the browser keeps the alpha, otherwise WebCodecs or
|
|
176
|
+
* WebAssembly decoding drawn in WebGL2.
|
|
177
|
+
*
|
|
178
|
+
* @example
|
|
179
|
+
* ```tsx
|
|
180
|
+
* <AlphaVideoView
|
|
181
|
+
* source={{ uri: 'https://example.com/video.webm' }}
|
|
182
|
+
* autoPlay={true}
|
|
183
|
+
* loop={true}
|
|
184
|
+
* style={{ width: 300, height: 300 }}
|
|
185
|
+
* />
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
export declare const AlphaVideoView: React.ForwardRefExoticComponent<AlphaVideoViewProps & React.RefAttributes<AlphaVideoViewRef>>;
|
|
189
|
+
//# sourceMappingURL=AlphaVideoView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlphaVideoView.d.ts","sourceRoot":"","sources":["../../../../react-native/src/AlphaVideoView.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
3
|
+
import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
|
+
/**
|
|
5
|
+
* Playback mode for the WebM player.
|
|
6
|
+
*
|
|
7
|
+
* - `'stream'` (default): Decode frames on-demand with a sliding window cache.
|
|
8
|
+
* Best for long videos or memory-constrained devices. Frames are evicted
|
|
9
|
+
* from cache, so looping requires re-decoding.
|
|
10
|
+
*
|
|
11
|
+
* - `'preload'`: Decode all frames upfront before playback starts.
|
|
12
|
+
* Best for short loops. Zero CPU during playback, instant looping.
|
|
13
|
+
*
|
|
14
|
+
* - `'streamAndPreload'`: Start playing immediately while decoding in background.
|
|
15
|
+
* After first pass completes, all frames are cached for instant looping.
|
|
16
|
+
* Best of both worlds: fast start + smooth loops.
|
|
17
|
+
*/
|
|
18
|
+
export type PlaybackMode = 'preload' | 'stream' | 'streamAndPreload';
|
|
19
|
+
/**
|
|
20
|
+
* Decoder for files with colour and alpha as separate VP8/VP9/AV1 bitstreams (two tracks, or a
|
|
21
|
+
* standard alpha WebM's BlockAdditional). Android only; iOS always uses the C++ core and web the browser.
|
|
22
|
+
*
|
|
23
|
+
* - `'auto'` (default): MediaCodec hardware decoders that list every track's profile, else
|
|
24
|
+
* MediaCodec's software decoders, else the C++ core.
|
|
25
|
+
* - `'mediacodec'`: per track, a hardware decoder if one lists the profile and has an instance
|
|
26
|
+
* free, else a software one.
|
|
27
|
+
* - `'mediacodec-hw'` / `'mediacodec-sw'`: hardware / software decoders only, for both tracks.
|
|
28
|
+
* - `'software'`: the C++ core, with the codecs built in (libvpx for VP8 and 8-bit VP9, dav1d for 8- to
|
|
29
|
+
* 12-bit AV1).
|
|
30
|
+
*
|
|
31
|
+
* A forced engine never falls back: a file it can't play calls `onError`. One that needs a codec
|
|
32
|
+
* left out of the build reports the code `'NO_DECODER'`.
|
|
33
|
+
*/
|
|
34
|
+
export type Decoder = 'auto' | 'mediacodec' | 'mediacodec-hw' | 'mediacodec-sw' | 'software';
|
|
35
|
+
type LoadEvent = Readonly<{
|
|
36
|
+
totalFrames: Int32;
|
|
37
|
+
width: Int32;
|
|
38
|
+
height: Int32;
|
|
39
|
+
/** The engine and decoders playing the file, e.g. `'mediacodec-hw (c2.qti.vp9.decoder)'`. */
|
|
40
|
+
decoder: string;
|
|
41
|
+
}>;
|
|
42
|
+
type ErrorEvent = Readonly<{
|
|
43
|
+
error: string;
|
|
44
|
+
/** `'NO_DECODER'` when the file needs a software decoder that isn't built in */
|
|
45
|
+
code?: string;
|
|
46
|
+
}>;
|
|
47
|
+
/** Android only: every frame is decoded (preload and streamAndPreload modes). */
|
|
48
|
+
type PreloadCompleteEvent = Readonly<{
|
|
49
|
+
totalFrames: Int32;
|
|
50
|
+
timeMs: Double;
|
|
51
|
+
}>;
|
|
52
|
+
export interface NativeProps extends ViewProps {
|
|
53
|
+
source?: Readonly<{
|
|
54
|
+
uri?: string;
|
|
55
|
+
/** Request headers as name, value, name, value... (codegen has no string maps) */
|
|
56
|
+
headers?: ReadonlyArray<string>;
|
|
57
|
+
/** A data source registered in native code under this name */
|
|
58
|
+
dataSource?: string;
|
|
59
|
+
}>;
|
|
60
|
+
autoPlay?: WithDefault<boolean, true>;
|
|
61
|
+
loop?: WithDefault<boolean, true>;
|
|
62
|
+
paused?: WithDefault<boolean, false>;
|
|
63
|
+
playbackSpeed?: WithDefault<Double, 1.0>;
|
|
64
|
+
/** What the store keeps the source under, instead of its URL */
|
|
65
|
+
cacheKey?: string;
|
|
66
|
+
/** Where a URL's or data source's bytes are kept between plays */
|
|
67
|
+
storage?: WithDefault<'auto' | 'disk' | 'memory' | 'none', 'auto'>;
|
|
68
|
+
/** The store's cap in bytes; 0 for the default (512 MB) */
|
|
69
|
+
maxStorageBytes?: WithDefault<Double, 0>;
|
|
70
|
+
/** See {@link PlaybackMode}. */
|
|
71
|
+
mode?: WithDefault<'preload' | 'stream' | 'streamAndPreload', 'stream'>;
|
|
72
|
+
/** See {@link Decoder}. */
|
|
73
|
+
decoder?: WithDefault<'auto' | 'mediacodec' | 'mediacodec-hw' | 'mediacodec-sw' | 'software', 'auto'>;
|
|
74
|
+
/**
|
|
75
|
+
* Number of frames decoded ahead of the shown one when streaming; stream mode keeps only these.
|
|
76
|
+
* Default: 8 frames (about 0.27 seconds at 30fps)
|
|
77
|
+
* Only used when mode='stream'
|
|
78
|
+
*/
|
|
79
|
+
streamPrefetchAhead?: WithDefault<Int32, 8>;
|
|
80
|
+
/**
|
|
81
|
+
* Enable global decode queue for non-stream mode.
|
|
82
|
+
* When true (default): decoding is serialized across all players, preventing CPU saturation
|
|
83
|
+
* When false: each player decodes independently (can freeze with many)
|
|
84
|
+
* Has no effect when mode='stream'.
|
|
85
|
+
*/
|
|
86
|
+
useDecodeQueue?: WithDefault<boolean, true>;
|
|
87
|
+
/**
|
|
88
|
+
* Enable verbose per-frame logging for debugging.
|
|
89
|
+
* When true: logs every frame queue, release, and render event.
|
|
90
|
+
* When false (default): only logs lifecycle events and periodic performance stats.
|
|
91
|
+
*/
|
|
92
|
+
verbose?: WithDefault<boolean, false>;
|
|
93
|
+
onLoad?: DirectEventHandler<LoadEvent>;
|
|
94
|
+
onError?: DirectEventHandler<ErrorEvent>;
|
|
95
|
+
onEnd?: DirectEventHandler<Readonly<{}>>;
|
|
96
|
+
onPreloadComplete?: DirectEventHandler<PreloadCompleteEvent>;
|
|
97
|
+
}
|
|
98
|
+
type NativeComponentType = HostComponent<NativeProps>;
|
|
99
|
+
interface NativeCommands {
|
|
100
|
+
play: (viewRef: React.ElementRef<NativeComponentType>) => void;
|
|
101
|
+
pause: (viewRef: React.ElementRef<NativeComponentType>) => void;
|
|
102
|
+
stop: (viewRef: React.ElementRef<NativeComponentType>) => void;
|
|
103
|
+
seekToFrame: (viewRef: React.ElementRef<NativeComponentType>, frame: Int32) => void;
|
|
104
|
+
seekToTime: (viewRef: React.ElementRef<NativeComponentType>, seconds: Double) => void;
|
|
105
|
+
}
|
|
106
|
+
export declare const Commands: NativeCommands;
|
|
107
|
+
declare const _default: NativeComponentType;
|
|
108
|
+
export default _default;
|
|
109
|
+
//# sourceMappingURL=AlphaVideoViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlphaVideoViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../react-native/src/AlphaVideoViewNativeComponent.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlphaVideoViewNativeComponent.web.d.ts","sourceRoot":"","sources":["../../../../react-native/src/AlphaVideoViewNativeComponent.web.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,UAAU,IAAK,CAAC;AAEtB,OAAO,EAAE,UAAU,IAAI,QAAQ,EAAE,CAAC;;AAClC,wBAAoB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { TurboModule } from 'react-native';
|
|
2
|
+
/** The decoder utilities. Android only: iOS has no native module, so `get` returns null there. */
|
|
3
|
+
export interface Spec extends TurboModule {
|
|
4
|
+
getDecoderInfo(): Promise<string>;
|
|
5
|
+
getMaxDecoderInstances(mimeType: string): Promise<number>;
|
|
6
|
+
getActiveDecoderCount(): Promise<number>;
|
|
7
|
+
getDecoderStatus(): Promise<{
|
|
8
|
+
maxVp9Instances: number;
|
|
9
|
+
maxAv1Instances: number;
|
|
10
|
+
vp9HardwareAvailable: boolean;
|
|
11
|
+
av1HardwareAvailable: boolean;
|
|
12
|
+
activeDecoders: number;
|
|
13
|
+
availableVp9Slots: number;
|
|
14
|
+
maxDualStreamPlayers: number;
|
|
15
|
+
canCreateMore: boolean;
|
|
16
|
+
softwareDecoders: string[];
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: Spec | null;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=NativeAlphaVideoModule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeAlphaVideoModule.d.ts","sourceRoot":"","sources":["../../../../react-native/src/NativeAlphaVideoModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,kGAAkG;AAClG,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,gBAAgB,IAAI,OAAO,CAAC;QAC1B,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;QACxB,oBAAoB,EAAE,OAAO,CAAC;QAC9B,oBAAoB,EAAE,OAAO,CAAC;QAC9B,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,aAAa,EAAE,OAAO,CAAC;QACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;KAC5B,CAAC,CAAC;CACJ;;AAED,wBAA6D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeAlphaVideoModule.web.d.ts","sourceRoot":"","sources":["../../../../react-native/src/NativeAlphaVideoModule.web.ts"],"names":[],"mappings":";AACA,wBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebPlayer.d.ts","sourceRoot":"","sources":["../../../../react-native/src/WebPlayer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,eAAO,MAAM,SAAS,mHAAiE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The web player: alpha-video-web, which shows the alpha in every browser. It plays in `<video>`
|
|
3
|
+
* where the browser keeps WebM alpha, otherwise through WebCodecs or WebAssembly decoding drawn
|
|
4
|
+
* in WebGL2, loading those engines only when a file needs them.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { type AlphaVideoViewProps, type AlphaVideoViewRef } from './AlphaVideoView';
|
|
8
|
+
export declare const WebPlayer: React.ForwardRefExoticComponent<AlphaVideoViewProps & React.RefAttributes<AlphaVideoViewRef>>;
|
|
9
|
+
//# sourceMappingURL=WebPlayer.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebPlayer.web.d.ts","sourceRoot":"","sources":["../../../../react-native/src/WebPlayer.web.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAyC,MAAM,OAAO,CAAC;AAI9D,OAAO,EAAe,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAejG,eAAO,MAAM,SAAS,+FAkDpB,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package entry point.
|
|
3
|
+
*
|
|
4
|
+
* The player view itself lives in `AlphaVideoView.tsx`; this file holds the native-module
|
|
5
|
+
* utilities and re-exports the rest.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Decoder status information (Android only)
|
|
9
|
+
*/
|
|
10
|
+
export interface DecoderStatus {
|
|
11
|
+
/** Maximum VP9 decoder instances supported by the device */
|
|
12
|
+
maxVp9Instances: number;
|
|
13
|
+
/** Maximum AV1 decoder instances supported by the device */
|
|
14
|
+
maxAv1Instances: number;
|
|
15
|
+
/** Whether VP9 hardware decoder is available */
|
|
16
|
+
vp9HardwareAvailable: boolean;
|
|
17
|
+
/** Whether AV1 hardware decoder is available */
|
|
18
|
+
av1HardwareAvailable: boolean;
|
|
19
|
+
/** Currently active decoder instances */
|
|
20
|
+
activeDecoders: number;
|
|
21
|
+
/** Remaining available VP9 decoder slots */
|
|
22
|
+
availableVp9Slots: number;
|
|
23
|
+
/** Maximum dual-stream players possible */
|
|
24
|
+
maxDualStreamPlayers: number;
|
|
25
|
+
/** Whether we can create more dual-stream players */
|
|
26
|
+
canCreateMore: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The C++ core's software decoders, from the codecs built in (`"react-native-alpha-video":
|
|
29
|
+
* { "codecs": [...] }` in the app's package.json), e.g. `['libvpx v1.14.0', 'dav1d 1.5.1']`
|
|
30
|
+
*/
|
|
31
|
+
softwareDecoders: string[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Get detailed decoder information for all supported codecs (VP9, AV1).
|
|
35
|
+
* Returns a string with all decoder capabilities including max instances,
|
|
36
|
+
* hardware acceleration status, supported resolutions, etc.
|
|
37
|
+
*
|
|
38
|
+
* @returns Promise<string> - Detailed decoder information
|
|
39
|
+
* @platform android
|
|
40
|
+
*/
|
|
41
|
+
export declare function getDecoderInfo(): Promise<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Get the maximum number of concurrent decoder instances for a codec.
|
|
44
|
+
* Dual-stream videos require 2 instances per player.
|
|
45
|
+
*
|
|
46
|
+
* @param mimeType - MIME type (e.g. 'video/x-vnd.on2.vp9' or 'video/av01')
|
|
47
|
+
* @returns Promise<number> - Max instances (-1 if unable to determine)
|
|
48
|
+
* @platform android
|
|
49
|
+
*/
|
|
50
|
+
export declare function getMaxDecoderInstances(mimeType: string): Promise<number>;
|
|
51
|
+
/**
|
|
52
|
+
* Get the current number of active VP9 decoder instances.
|
|
53
|
+
*
|
|
54
|
+
* @returns Promise<number> - Active decoder count
|
|
55
|
+
* @platform android
|
|
56
|
+
*/
|
|
57
|
+
export declare function getActiveDecoderCount(): Promise<number>;
|
|
58
|
+
/**
|
|
59
|
+
* Get comprehensive decoder status as a structured object.
|
|
60
|
+
* Useful for determining if more dual-stream players can be created.
|
|
61
|
+
*
|
|
62
|
+
* @returns Promise<DecoderStatus> - Decoder status information
|
|
63
|
+
* @platform android
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* const status = await getDecoderStatus();
|
|
68
|
+
* console.log(`Can create ${status.maxDualStreamPlayers} dual-stream players`);
|
|
69
|
+
* console.log(`Currently using ${status.activeDualStreamPlayers}`);
|
|
70
|
+
* if (!status.canCreateMore) {
|
|
71
|
+
* console.warn('At decoder limit!');
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function getDecoderStatus(): Promise<DecoderStatus>;
|
|
76
|
+
export { AlphaVideoView, type AlphaVideoViewProps, type AlphaVideoViewRef, type AlphaVideoSource, type AlphaVideoWebSource, type ByteSource, type AlphaVideoStorage, type PlaybackMode, type Decoder, type WebDecoder, type AlphaVideoLoadEvent, } from './AlphaVideoView';
|
|
77
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../react-native/src/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,eAAe,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,eAAe,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,oBAAoB,EAAE,OAAO,CAAC;IAC9B,gDAAgD;IAChD,oBAAoB,EAAE,OAAO,CAAC;IAC9B,yCAAyC;IACzC,cAAc,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,2CAA2C;IAC3C,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qDAAqD;IACrD,aAAa,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B;AAOD;;;;;;;GAOG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAQtD;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ9E;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAQ7D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAkB/D;AAED,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,UAAU,EACf,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Copyright © 2018-2019, VideoLAN and dav1d authors
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
8
|
+
list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
11
|
+
this list of conditions and the following disclaimer in the documentation
|
|
12
|
+
and/or other materials provided with the distribution.
|
|
13
|
+
|
|
14
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
15
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
16
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
17
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
18
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
19
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
20
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
21
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
22
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
23
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Copyright (c) 2010, The WebM Project authors. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in
|
|
12
|
+
the documentation and/or other materials provided with the
|
|
13
|
+
distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the name of Google, nor the WebM Project, nor the names
|
|
16
|
+
of its contributors may be used to endorse or promote products
|
|
17
|
+
derived from this software without specific prior written
|
|
18
|
+
permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
21
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
22
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
23
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
24
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
25
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
26
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
27
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
28
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
30
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Additional IP Rights Grant (Patents)
|
|
2
|
+
------------------------------------
|
|
3
|
+
|
|
4
|
+
"These implementations" means the copyrightable works that implement the WebM
|
|
5
|
+
codecs distributed by Google as part of the WebM Project.
|
|
6
|
+
|
|
7
|
+
Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge,
|
|
8
|
+
royalty-free, irrevocable (except as stated in this section) patent license to
|
|
9
|
+
make, have made, use, offer to sell, sell, import, transfer, and otherwise
|
|
10
|
+
run, modify and propagate the contents of these implementations of WebM, where
|
|
11
|
+
such license applies only to those patent claims, both currently owned by
|
|
12
|
+
Google and acquired in the future, licensable by Google that are necessarily
|
|
13
|
+
infringed by these implementations of WebM. This grant does not include claims
|
|
14
|
+
that would be infringed only as a consequence of further modification of these
|
|
15
|
+
implementations. If you or your agent or exclusive licensee institute or order
|
|
16
|
+
or agree to the institution of patent litigation or any other patent
|
|
17
|
+
enforcement activity against any entity (including a cross-claim or
|
|
18
|
+
counterclaim in a lawsuit) alleging that any of these implementations of WebM
|
|
19
|
+
or any code incorporated within any of these implementations of WebM
|
|
20
|
+
constitute direct or contributory patent infringement, or inducement of
|
|
21
|
+
patent infringement, then any patent rights granted to you under this License
|
|
22
|
+
for these implementations of WebM shall terminate as of the date such
|
|
23
|
+
litigation is filed.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Copyright (c) 2010, Google Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in
|
|
12
|
+
the documentation and/or other materials provided with the
|
|
13
|
+
distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the name of Google nor the names of its contributors may
|
|
16
|
+
be used to endorse or promote products derived from this software
|
|
17
|
+
without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Additional IP Rights Grant (Patents)
|
|
2
|
+
------------------------------------
|
|
3
|
+
|
|
4
|
+
"These implementations" means the copyrightable works that implement the WebM
|
|
5
|
+
codecs distributed by Google as part of the WebM Project.
|
|
6
|
+
|
|
7
|
+
Google hereby grants to you a perpetual, worldwide, non-exclusive, no-charge,
|
|
8
|
+
royalty-free, irrevocable (except as stated in this section) patent license to
|
|
9
|
+
make, have made, use, offer to sell, sell, import, transfer, and otherwise
|
|
10
|
+
run, modify and propagate the contents of these implementations of WebM, where
|
|
11
|
+
such license applies only to those patent claims, both currently owned by
|
|
12
|
+
Google and acquired in the future, licensable by Google that are necessarily
|
|
13
|
+
infringed by these implementations of WebM. This grant does not include claims
|
|
14
|
+
that would be infringed only as a consequence of further modification of these
|
|
15
|
+
implementations. If you or your agent or exclusive licensee institute or order
|
|
16
|
+
or agree to the institution of patent litigation or any other patent
|
|
17
|
+
enforcement activity against any entity (including a cross-claim or
|
|
18
|
+
counterclaim in a lawsuit) alleging that any of these implementations of WebM
|
|
19
|
+
or any code incorporated within any of these implementations of WebM
|
|
20
|
+
constitute direct or contributory patent infringement, or inducement of
|
|
21
|
+
patent infringement, then any patent rights granted to you under this License
|
|
22
|
+
for these implementations of WebM shall terminate as of the date such
|
|
23
|
+
litigation is filed.
|