One Logo Pool Ball
MediaPlayer · IOS API REFERENCE

MPNowPlayingSession

class · iOS 16.0+ · SDK 27.1

class MPNowPlayingSession

Members (13)

method · iOS 16.0+

addPlayer

TypeScript
addPlayer(player: _AVFoundation_AVPlayer): void
Swift declaration
func addPlayer(_ player: AVPlayer)
method · iOS 16.0+

becomeActiveIfPossible

TypeScript
becomeActiveIfPossible(completion?: (((arg0: boolean) => void)) | null): void
Swift declaration
func becomeActiveIfPossible() async -> Bool
init · iOS 16.0+

init

TypeScript
static init(players: Array<_AVFoundation_AVPlayer>): MPNowPlayingSession
Swift declaration
init(players: [AVPlayer])
method · iOS 16.0+

removePlayer

TypeScript
removePlayer(player: _AVFoundation_AVPlayer): void
Swift declaration
func removePlayer(_ player: AVPlayer)
get · iOS 16.0+

isActive

TypeScript
get isActive(): boolean
Swift declaration
var isActive: Bool { get }
get · iOS 16.0+

automaticallyPublishesNowPlayingInfo

TypeScript
get automaticallyPublishesNowPlayingInfo(): boolean
Swift declaration
var automaticallyPublishesNowPlayingInfo: Bool { get set }
set · iOS 16.0+

automaticallyPublishesNowPlayingInfo

TypeScript
set automaticallyPublishesNowPlayingInfo(value: boolean)
Swift declaration
var automaticallyPublishesNowPlayingInfo: Bool { get set }
get · iOS 16.0+

canBecomeActive

TypeScript
get canBecomeActive(): boolean
Swift declaration
var canBecomeActive: Bool { get }
get · iOS 16.0+

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
weak var delegate: (any MPNowPlayingSessionDelegate)? { get set }
set · iOS 16.0+

delegate

TypeScript
set delegate(value: (Implements<MPNowPlayingSessionDelegate> | SDKHandle) | null)
Swift declaration
weak var delegate: (any MPNowPlayingSessionDelegate)? { get set }
get · iOS 16.0+

nowPlayingInfoCenter

TypeScript
get nowPlayingInfoCenter(): MPNowPlayingInfoCenter
Swift declaration
var nowPlayingInfoCenter: MPNowPlayingInfoCenter { get }
get · iOS 16.0+

players

TypeScript
get players(): Array<_AVFoundation_AVPlayer>
Swift declaration
var players: [AVPlayer] { get }
get · iOS 16.0+

remoteCommandCenter

TypeScript
get remoteCommandCenter(): MPRemoteCommandCenter
Swift declaration
var remoteCommandCenter: MPRemoteCommandCenter { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

MPNowPlayingSession.init()

inherited init: cannot prove legal (class declares 1 custom initializer)

All MediaPlayer types →