Closed U3Goliath closed 1 month ago
Test response: "One or more sample lists failed to load"
This is coming from here in SampleChooserActivity
and is likely due to malformed JSON (e.g. the parser is very picky about whether trailing commas are present or absent in specific places). I suggest you log the IOException e
that's available there and see if it helps resolve your issue:
https://github.com/androidx/media/blob/1c0345e69f240ccabb20cbce7701fb536032623b/demos/main/src/main/java/androidx/media3/demo/main/SampleChooserActivity.java#L120-L123
final MediaSource.Factory mediaSourceFactory = [...]
This part looks problematic, because you don't seem to do anything with this MediaSource.Factory
. Ultimately you need to pass it to ExoPlayer.Builder.setMediaSourceFactory
(see examples in https://developer.android.com/media/media3/exoplayer/customization#player-customization), but in the demo app this would happen in PlayerActivity.initializePlayer
, which is the other side of an Intent
connection from SampleChooserActivity
, and you can't pass a MediaSource.Factory
(or DefaultDrmSessionManager(Provider)
) via the Intent
:
I would suggest changing your logic so you can either pass the kid
and key
(or the complete drmBody
string) via the Intent
, and do the rest of the logic in PlayerActivity
.
I suggest you log the
IOException e
that's available there and see if it helps resolve your issue
I've just submitted a change that does this, so you can rebase your local changes to pick it up instead: https://github.com/androidx/media/commit/c01babe9bb15a6031b618d8085294c558d8124d2
Sorry but, need help for this...
I have tried several ways but it doesn't work.
Please, could someone help me develop it?
I'm afraid we don't have capacity to provide detailed help beyond what I've already explained above, so I'm closing this.
Hello everyone.
I have taken the "MAIN" demo as a base.
I am trying to add the reading of KEY and KID values, to play mpd content with CLEARKEY. But no work...
Test response: "One or more sample lists failed to load"
I'm starting to program in android studio, if anyone could help me I would appreciate it.
Key/Kid reading code: https://github.com/androidx/media/issues/1208
The implemented code: