mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
When sending a custom command with `browser.sendCustomCommand` when connected to a legacy browser service, the custom command was delivered to `MediaSessionCompat.Callback.onCustomAction` instead of the service method `onCustomAction`. The difference is that the service version can return an async response with a bundle, while the session callback version doesn't have a return value. Hence, the service method was never called and it wasn't possible to send a reponse or signal an error back to the browser. The resulting `ListanableFuture` simply always immediately resolved to a success. This change overrides `ListenableFuture<SessionResult> sendCustomCommand(SessionCommand command, Bundle args)` in `MediaBrowserImplLegacy` to use the `MediaBrowserCompat` method to send instead of the `MediaControlleCompat` method that was used by the subclass `MediaControllerImplLegacy`. This involves the service callback instead of the session callback and enables `MediaBrowser` to get the actual return value from the legacy service. Issue: androidx/media#1474 #cherrypick PiperOrigin-RevId: 676519314 |
||
|---|---|---|
| .. | ||
| cast | ||
| common | ||
| common_ktx | ||
| container | ||
| database | ||
| datasource | ||
| datasource_cronet | ||
| datasource_okhttp | ||
| datasource_rtmp | ||
| decoder | ||
| decoder_av1 | ||
| decoder_ffmpeg | ||
| decoder_flac | ||
| decoder_iamf | ||
| decoder_midi | ||
| decoder_opus | ||
| decoder_vp9 | ||
| effect | ||
| exoplayer | ||
| exoplayer_dash | ||
| exoplayer_hls | ||
| exoplayer_ima | ||
| exoplayer_rtsp | ||
| exoplayer_smoothstreaming | ||
| exoplayer_workmanager | ||
| extractor | ||
| muxer | ||
| session | ||
| test_data | ||
| test_exoplayer_playback | ||
| test_session_common | ||
| test_session_current | ||
| test_utils | ||
| test_utils_robolectric | ||
| transformer | ||
| ui | ||
| ui_leanback | ||
| lint.xml | ||