Enter a stream at a specific time

By default, when starting playback, VOD media starts at 0 (MediaPlayer.LIVE_POINT). You can override the default behavior.

  1. Pass a position to MediaPlayer.prepareToPlay.

    TVSDK considers the given position to be the starting point for the asset. No seek operation is required. If the position is not inside the seekable range, TVSDK uses the default position.

    For example:

    long desiredPostion = //TODO : choose a value; 
    @Override 
    public void onStateChanged(MediaPlayer.PlayerState state, MediaPlayerNotification notification) { 
        switch (state) { 
            case INITIALIZED: 
                _mediaPlayer.prepareToPlay(desiredPosition); 
                break; 
                case PREPARING: 
                showBufferingSpinner(); 
                break; 
            ... 
        } 
    } 
    
    

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