mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Add constructor that takes only a Context
#minor-release
PiperOrigin-RevId: 604659845
(cherry picked from commit c2273345c5)
This commit is contained in:
parent
ca2779e774
commit
dc8d3eaf30
2 changed files with 15 additions and 0 deletions
|
|
@ -22,6 +22,8 @@
|
|||
* Session:
|
||||
* Fix issue where `MediaItem.RequestMetadata` with just non-null extras is
|
||||
not sent transmitted between media controllers and sessions.
|
||||
* Add constructor to `MediaLibrarySession.Builder` that only takes a
|
||||
`Context` instead of a `MediaLibraryService`.
|
||||
* UI:
|
||||
* Downloads:
|
||||
* OkHttp Extension:
|
||||
|
|
|
|||
|
|
@ -413,6 +413,19 @@ public abstract class MediaLibraryService extends MediaSessionService {
|
|||
super(service, player, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a builder for {@link MediaLibrarySession}.
|
||||
*
|
||||
* @param context The {@link Context}.
|
||||
* @param player The underlying player to perform playback and handle transport controls.
|
||||
* @param callback The callback to handle requests from {@link MediaBrowser}.
|
||||
* @throws IllegalArgumentException if {@link Player#canAdvertiseSession()} returns false.
|
||||
*/
|
||||
@UnstableApi
|
||||
public Builder(Context context, Player player, Callback callback) {
|
||||
super(context, player, callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a {@link PendingIntent} to launch an {@link android.app.Activity} for the {@link
|
||||
* MediaLibrarySession}. This can be used as a quick link to an ongoing media screen.
|
||||
|
|
|
|||
Loading…
Reference in a new issue