Retrieve Player state (iOS SDK)

Retrieve data about your Player state.


The Player state can be retrieved at any time using the getState(completion:) method:

self.dmPlayerView?.getState(completion: { [weak self] (playerState) in
     print("playerIsPlaying : \(playerState?.playerIsPlaying)")
     print("videoId : \(playerState?.videoId)")
     print("playerError : \(playerState?.playerError)")
})
➡️

Learn more

For a full list available states, refer to the iOS SDK Reference .