-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add DecoderConfig to Player #622
base: development
Are you sure you want to change the base?
Conversation
Android: - Remove unnecessary `resolveOnUiThread` call - Remove unnecessary `DecoderConfigBridge` - Add `decoderConfigModule` extension val to `ReactApplicationContext` and `RejectPromiseOnExceptionBlock` - Add additional parameter to `PlayerModule` `init` functions (add `decoderNativeId`, similar to `networkNativeId`) - Add extension function `ReadableArray.toMediaCodecInfo` to parse the decoder priority result from rn RN - Fix `DecoderContextMediaType` enum values - `DecoderConfig` extends `NativeInstanceConfig` now - Refactor and fix `decoder/index.ts` - add `export` statement to export the decoderConfig - Add missing `destroy` to the decoderConfig on player destroy
src/player.ts
Outdated
console.warn( | ||
`[Player ${this.nativeId}] config: PlaybackConfig.DecoderConfig is not available for iOS. Only Android devices.` | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be called on iOS as this results in a visible warning in the application!
I think keeping just the return
should be enough.
Otherwise you need the same check on the caller side of initDecoderConfig
e8d56eb
to
c3529bf
Compare
c3529bf
to
c38b514
Compare
c38b514
to
e2a2f68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to have a minimal PR description.
I performed some basic tests and it's looking good on Android. I'm having some issues building on iOS, but still looking into it.
Please feel free to ping me if you need any help working through the comments I added 🙂
@@ -105,6 +105,6 @@ dependencies { | |||
// Bitmovin | |||
implementation 'com.google.ads.interactivemedia.v3:interactivemedia:3.35.1' | |||
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1' | |||
implementation 'com.bitmovin.player:player:3.104.2+jason' | |||
implementation 'com.bitmovin.player:player-media-session:3.104.2+jason' | |||
implementation 'com.bitmovin.player:player:3.106.0-a.1-decoderconfig+jason' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a reminder comment to update this when the final release is out 🙂
android/src/main/java/com/bitmovin/player/reactnative/DecoderConfigModule.kt
Show resolved
Hide resolved
android/src/main/java/com/bitmovin/player/reactnative/DecoderConfigModule.kt
Show resolved
Hide resolved
- Update comments - Fix formatting - Make fields private Co-authored-by: Žiga Vehovec <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing to add on top of @zigavehovec's thorough review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure to take a look at #622 (comment)
After that we are ready to go IMO 🙂
Description
With the player-android
3.106
release we will introduce a newDecoderConfig
to thePlaybackConfig
.With this PR we introduce the
DecoderConfig
API on react-native.In addition, the
3.106
release will remove some Tweaks. The affected tweak will also be removed in this react-native project in favor of theDecoderConfig
(Removed tweak:preferSoftwareDecodingForAds
)Changes
DecoderConfigModule
decoderConfig
(+ usage inPlaybackConfig
TweaksConfig.preferSoftwareDecodingForAds
Checklist
CHANGELOG
entry