18 Commits

Author SHA1 Message Date
Googler
ecaf219d74 Adding mime type checking to Transformer to identify images.
PiperOrigin-RevId: 530711523
2023-05-11 09:58:15 +00:00
tonihei
2cbab10419 Deprecate onPlayerCommandRequest
This method doesn't really serve a purpose that isn't handled
elsewhere. The return value is also not forwarded to anyone.

PiperOrigin-RevId: 527283166
2023-04-27 12:24:39 +01:00
tonihei
3693ca4bbb Add MediaSession.getControllerForCurrentRequest
This is a helper method that can used to obtain information about
the controller that is currently calling a Player method.

PiperOrigin-RevId: 527268994
2023-04-27 12:21:19 +01:00
tonihei
9128244dc3 Use Util method for common UI play/pause button logic.
This ensures the logic is consistent and can also be easily
used from custom UIs.

PiperOrigin-RevId: 527249127
2023-04-26 15:52:50 +01:00
tonihei
0bac4e24e4 Add routing controller id to DeviceInfo
And forward the id to the VolumeProviderCompat and read it from the platform
MediaController for compatibility.

PiperOrigin-RevId: 526046892
2023-04-24 11:35:08 +01:00
tonihei
d9fd8f4310 Add Builder for DeviceInfo
This simplifies the addition of new fields in the future.

Also do some misc clean up for the volume limit values:
 - Add some documentation to mention assumed defaults
 - Add the IntRange annotations to match the ones we have in Player
   already
 - Mention the limits in the relevant Player methods
 - Avoid bundling default values
 - Improve range checks for masking in MediaController

PiperOrigin-RevId: 526029619
2023-04-24 11:33:13 +01:00
jbibik
c71e4bf1ff Extend Player interface, overloading 4 device-volume methods with flags
Previously, ExoPlayerImpl had volume flags hardcoded to SHOW_UI, but now the developer can choose what happens on volume change. The old methods have been deprecated.

PiperOrigin-RevId: 523974358
2023-04-13 16:30:30 +01:00
tonihei
c5baf2388c Rename misleading COMMAND_GET/SET_MEDIA_ITEMS_METADATA
The setter command is only used for setPlaylistMetadata and can
be named COMMAND_SET_PLAYLIST_METADATA. The getter commnad is
used to access getMediaMetadata and getPlaylistMetadata and can
be better named COMMAND_GET_METADATA to reflect this usage.

PiperOrigin-RevId: 523673286
2023-04-12 16:59:38 +01:00
tonihei
2a6472f930 Mark MediaController methods final to prevent accidental overrides
It's currently not possible to even subclass MediaController because
the constructor is package-private. To avoid any accidental usage or
future indirect subclassing, all methods can be marked as final.

PiperOrigin-RevId: 523648114
2023-04-12 16:57:44 +01:00
tonihei
3fc61bb7c7 Deprecate MediaMetadata folderType and stabilize mediaType+isBrowsable
PiperOrigin-RevId: 522058915
2023-04-11 10:28:39 +01:00
tonihei
ff919fe74d Mark MediaSession methods final to prevent accidental overrides
It's currently not possible to even subclass MediaSession because
the constructor is package-private. To avoid any accidental usage or
future indirect subclassing, all methods can be marked as final.

PiperOrigin-RevId: 521775373
2023-04-05 15:46:40 +01:00
ibaker
43ad45dbef Remove all RawCC references from media3
RawCC is a Google-internal subtitle format that is no longer directly
supported by this library (since 4f616d6003).

PiperOrigin-RevId: 520591591
2023-03-30 17:25:20 +00:00
tonihei
fc54a7a487 Add COMMAND_RELEASE to set whether Player instances can be released
This wasn't added so far because releasing is always allowed from a
MediaController (as it just releases the connection, not the session
player). But Player instances can be created for other purposes and
the receiver of a Player instance should not always be allowed to
call release if it doesn't own the player resource.

PiperOrigin-RevId: 519121122
2023-03-30 17:09:28 +00:00
tianyifeng
df558b59db Deprecate onUpdateNotification(MediaSession)
PiperOrigin-RevId: 518612625
2023-03-30 17:03:28 +00:00
yschimke
278853a2a1 Add suppression reason for unsuitable audio route.
A follow up to stopping speaker playback with a Player decorator from
https://github.com/androidx/media/issues/15.

It looks like we will need to change to using playback suppression to avoid
errors like https://github.com/androidx/media/issues/167, when we don't start
a foreground service.

We may not have this implemented by 1.0, but would like it in the API and it seems to be appropriate.

PiperOrigin-RevId: 478835686
2022-10-17 15:29:26 +00:00
samrobinson
7c055c9676 Clarify PlaybackParameters constructor range.
PiperOrigin-RevId: 476937845
2022-09-30 18:24:31 +00:00
ibaker
ad46cb1c81 Group COMMAND_SET_MEDIA_ITEM and COMMAND_CHANGE_MEDIA_ITEMS together
I don't think it's useful to keep these in numerical order, it makes
more sense to keep them grouped into a 'logical' ordering.

#minor-release

PiperOrigin-RevId: 460453464
2022-07-12 15:14:12 +00:00
ibaker
c7f1b465d4 Publish api.txt to media3 GitHub
#minor-release

PiperOrigin-RevId: 455372568
2022-06-16 13:58:42 +00:00