Comments (3)
I guess you are right about this. I'm already overriding ForwardingPlayer
, so I'll just add more overrides that handle these cases. Will come back if I have more issues.
from media.
I think there are multiple APIs available that may be helpful for your case below the Callback
API of the session.
In cases when the media structure of an app differs considerably to the media structure of what a standard ExoPlayer
it can be useful to implement SimpleBasePlayer
that is backed by an ExoPlayer
instance. You would kind of wrap an ExoPlayer
instance inside the SimpleBasePlayer
instance. This way you get in between the session and the player and you can for instance handle the setMediaItems(List<MediaItem>)
after it went through the onAddMediaItems/onSetMediaItems
callback. In this case you would just not override these and received the params in SimpleBasePlayer
. ForwardingPlayer
is a similar approach, but for your complex case SimpleBasePlayer
is probably a better choice. With both approaches ytou get in between the session and the actual player instance.
If you want to create your MediaSource
in a complex way before it is added to the player as a consequence of for instance setMediaItems(List<MediaItem>)
being called, you can inject your own MediaSource.Factory
into the player when you build it with ExoPlayer.Builder
..
from media.
Okay, this worked for me. Thanks.
from media.
Related Issues (20)
- LL-HLS Streams with CMCD enabled lead to ExoPlaybackException HOT 1
- Force reset ExoPlayer internals to generate new audioSessionId and clear audio tracks
- How to call setMediaSource method by MediaController? HOT 1
- How to call setMediaSource method by MediaController? HOT 1
- Long freezes with ConcatenatingMediaSource and ConcatenatingMediaSource2
- Exoplayer misinterprets RTSP streams audioInputFormat as mp4a.40.1 instead of mp4a.40.2 HOT 1
- ExoPlayer clarification on DASH Byte-Range request against Player Buffer params' adjustments
- Unable to style default `SubtitleView` of the Media3 ExoPlayer HOT 3
- DefaultDrmSession should handle when key is already available (getKeyRequest() -> REQUEST_TYPE_NONE) HOT 4
- Support for playing Kotlin Multiplatform resources HOT 13
- HLS playback crash on Android 6 and below. HOT 2
- AGP 8.3.0 and newer crash: IllegalAccessError: Illegal class access: 'androidx.media3.session.MediaSessionStub' attempting to access 'com.google.common.util.concurrent.ImmediateFuture' HOT 10
- Media3 Exoplayer subtitle font size increase HOT 1
- Stall in ExoPlayer when EventStream falls out of window and is removed from the DASH manifest
- Sound disappears when custom equalizer is enabled
- Playback Error on Image Track (IllegalArgumentException: x + width must be <= bitmap.width()) HOT 1
- Multiple DRM protection levels in DASH stream with low DRM protection level on device HOT 7
- Captions can't be turned on using Google Assistant HOT 3
- Support for setting the start and end times of playback in TextOverlay. HOT 4
- Media Controllers — Slot reservation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from media.