Comments (1)
Difficult to say. This is a low-level change that you are doing and AFAIU there can be many things that can go wrong. You are kind of doing an open heart surgery on the media session service implementation :).
onConnect function will not called with MediaNotificationController
I guess you are overriding onBind
and then provide your own local binder instead of what the actual implementation does. Not sure how you implemented this, but the original implementation provides an implementation of the IMediaSession.aidl
that provides connect
. The standard implementation implements this here. When connect
is called the session is eventually passed to service.addSession(session)
which is where connecting the media notification controller is triggered.
That's in a nutshell what you'd need to do. I, as an aside, would discourage doing so though because this changes implementation details that are not part of an API that we can ensure to be stable. What I mean is that your implementation may break when we change something in the AIDL interface or the internal implementation. When you update to a new MEdia3 version, you may be in troubles as in you would have to investigate again. That's not something we can support you with closely also I'm afraid.
Out of interest: What are you trying to achieve with a LocalBinder
?
I'm asking because my understanding is that a local binder would be used by clients that bind from the same process. This would mean that this local binder is only given to such a client. A MediaSessionService/MediaLibraryService
is typically also accessed by for instance System UI that isn't running in the same process. Today, System UI uses the platform controller to connect, but this may change and in such a case using a local binder could become problematic in the future when such clients move to Media3.
We also made some changes that make connections from the same process more efficient for local binding:
from media.
Related Issues (20)
- Packaging Widevine for key rotation HOT 1
- CSAI ads with IMA for live stream? HOT 1
- [Transformer] The color of BitmapOverlay is a little off HOT 5
- Not selecting the correct video track for the video exported from Pixel8 captured motion JPEG HOT 1
- DRM Problem (VR Split Screen with Multiple SurfaceView)
- Output switcher appears broken after switching to CastPlayer HOT 8
- FMP4 Multiple Media Sources Seamless seek HOT 2
- Ability to set Dialog for TrackSelectionDialogBuilder
- Killing the app while audio is playing results in "The controller is not connected" and not being able to play again HOT 14
- Battery HOT 3
- Loading custom shaders in media player? HOT 1
- Audio stops playing, the player doesn't stop nor reports an error HOT 2
- How to Add subtitle files or url during playing ? HOT 2
- Playback Resumption with external applications HOT 2
- Videos filmed vertically are rotated 90 degrees on Android 9
- Problem with skippable pre-roll ads when seeking the player to resume a playback HOT 2
- Is it possible with media3 to replace the MediaMetadataRetriever thumbnail extraction functionality? HOT 1
- last frame is black when show VAST ads HOT 13
- DecoderCounters reset before `onVideoDisabled()` is delivered. HOT 1
- Broken playback resumption HOT 1
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.