tonihei 11257ecacb Forward presumed no-op seeks to handler methods in (Simple)BasePlayer
Some seek operations are currently filtered in the base classes if
the target index is not explicitly specified and the implicitly
assumed operation doesn't have an obvious target index. (Example:
calling seekToNext() at the last item in a playlist)

This is too opinionated because the actual player implementation
using this base class may be able to handle this seek request (e.g.
by adding new items on the fly or using other logic to select
the most suitable next item).

This can be solved by forwarding all seek requests to the respective
handler methods even if they are a presumed no-op. Also clarify the
Javadoc that the provided index is just an assumption if it wasn't
provided explicitly in the method call.

PiperOrigin-RevId: 624887116
2024-04-15 02:38:29 -07:00
..

Cast module

This module provides a Player implementation that controls a Cast receiver app.

Getting the module

The easiest way to get the module is to add it as a gradle dependency:

implementation 'androidx.media3:media3-cast:1.X.X'

where 1.X.X is the version, which must match the version of the other media modules being used.

Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.

Using the module

Create a CastPlayer and use it to control a Cast receiver app. Since CastPlayer implements the Player interface, it can be passed to all media components that accept a Player, including the UI components provided by the UI module.