目录

Checklist for Playback Control Access

To access AVSession, adhere to the table below based on your application's specific use case, and conduct a self-check prior to application release to ensure a solid user experience.

If your application needs to play audio in the background or when the screen is locked, you need to access AVSession. If your application only needs to play audio and video in the foreground, you can choose not to access AVSession.

Basic Playback Control: Playback Information

Applications are classified by type and must access to all mandatory items (marked with "√"). For optional items (marked with "-"), applications can access them as required.

For mandatory items, the application determines whether to access them based on the actual functions. Access is required if the application has a specific function; otherwise, it is unnecessary.

Function Music/Audiobook Video Live Streaming Browser News VoIP
Media cover √ √ √ √ √ -
Main title √ √ √ √ √ -
Progress and time √ √ - √ √ -
Subtitle √ √ √ √ √ -
Lyrics √ - - - - -
Special media source ID - - - - - -

Basic Playback Control: Playback Control

Applications are classified by type and must access to all mandatory items (marked with "√"). For optional items (marked with "-"), applications can access them as required.

For mandatory items, the application determines whether to access them based on the actual functions. Access is required if the application has a specific function; otherwise, it is unnecessary.

Function Music/Audiobook Video Live Streaming Browser News VoIP
Play/Pause √ √ √ √ √ -
Previous/Next √ √ - - - -
Disabled button state √ √ √ √ √ -
Redirection √ √ √ √ √ -
Favorites √ - - - - -
Loop mode √ - - - - -
Fast-forward/rewind - √ - - - -

Audio and Video Casting

Applications are classified by type and must access to all mandatory items (marked with "√"). For optional items (marked with "-"), applications can access them as required.

For mandatory items, the application determines whether to access them based on the actual functions. Access is required if the application has a specific function; otherwise, it is unnecessary.

Function Music/Audiobook Video Live Streaming Browser News VoIP
Using the call device switching component - - - - - √
Cast+ audio and video casting √ √ - - - -
DRM video projection - - - - - -
DLNA audio and video casting √ √ - - - -
Automatic switching to resource casting - - - - - -
AVCastPicker development (sheet) √ √ - - - -

Enhanced Playback Control

Applications are classified by type and must access to all mandatory items (marked with "√"). For optional items (marked with "-"), applications can access them as required.

For mandatory items, the application determines whether to access them based on the actual functions. Access is required if the application has a specific function; otherwise, it is unnecessary.

Function Music/Audiobook Video Live Streaming Browser News VoIP
Instant cold start playback √ - - - - -
Historical playlists √ - - - - -
Playlist recommendation √ - - - - -
Unified volume component - √ - - - -

Sample Code