PlaybackGlue

This package is part of the
Android support library which
is no longer maintained.
The support library has been superseded by AndroidX
which is part of Jetpack.
We recommend using the AndroidX libraries in all new projects. You should also consider
migrating existing projects to AndroidX.

A helper class for managing a PlaybackControlsRow
and PlaybackGlueHost that implements a
recommended approach to handling standard playback control actions such as play/pause,
fast forward/rewind at progressive speed levels, and skip to next/previous.

Base class for abstraction of media play/pause feature. A subclass of PlaybackGlue will contain
implementation of Media Player or a connection to playback Service. App initializes
PlaybackGlue subclass, associated it with a PlaybackGlueHost. PlaybackGlueHost
is typically implemented by a Fragment or an Activity, it provides the environment to render UI
for PlaybackGlue object, it optionally provides SurfaceHolder via SurfaceHolderGlueHost
to render video. A typical PlaybackGlue should release resources (e.g. MediaPlayer or connection
to playback Service) in onDetachedFromHost().
onDetachedFromHost() is called in two cases:

onDetachedFromHost

This method is called when current associated PlaybackGlueHost is attached to a
different PlaybackGlue or PlaybackGlueHost is destroyed . Subclass may
override and call super.onDetachedFromHost() at last. A typical PlaybackGlue will release
resources (e.g. MediaPlayer or connection to playback service) in this method.