Now Playing Service

The now playing service arbitrates between media players (including phones) and media controllers on the system, so that their activities do not clash, and publishes information about their activities. Applications can use this information to help them manage concurrent audio streams.

Overview

The now playing service arbitrates between the different media players (including phones) and media controllers on the system, and publishes information about media player activity. The audio manager is used to control audio stream routing, volume, and ducking behavior.

The now playing service (nowplaying) can be used along with the audio manager to manage audio stream concurrency and ensure that:

The now playing service supports two distinct PPS interfaces, one for media players (including phones), and one for media controllers. Each interface has its own PPS objects.

Media players

All media players on a system should register with the now playing service and subscribe to the media player PPS objects in order to receive information about the other media players on the system. They should also publish information about their activities to these objects, so that the now playing service can know what they are doing and make this information available to the other media players. Media players can also use these objects to publish metadata about the media they are playing, and receive control commands, such as pause and resume.

For example, the phone application (which generally has precedence over other media players) should use the now playing service to inform other media players when a call comes in, so that they can pause playback during the call.

Media controllers

Media controllers on the system (such as a controller tied to the physical buttons on a phone) should subscribe to the media controller PPS object, so that they can receive information about the content (if any) that is currently playing on the system. They can also publish requests to this object when they need to control playback of the currently active media player in the system.