Wait for a valid state

Before you can use most of the Browser TVSDK player methods, the player must be in a valid state.

The player moves through various states. Waiting for the player to be in the correct state ensures that the media resource has successfully loaded. If the player is not in at least the required state, many player methods throw IllegalStateException.

The required state is usually PREPARED.

  1. To confirm that the state is PREPARED:

    When the player is initializing, wait for Browser TVSDK to dispatch the AdobePSDK.MediaPlayerStatusChangeEvent event with an event.status of MediaPlayerStatus.PREPARED.

    To check whether the current state of the MediaPlayer object is at least PREPARED.

    <readonly> status :AdobePSDK.MediaPlayerStatus
    

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now