DoubleClick Studio AS3 API Reference

class com.google.ads.studio.video.AbstractPlayerState

An abstract state player state that changes the functionality of the play, pause, stop, etc. methods depending on the player state.

Test the state of the current state of the player when the state changes:
   import com.google.ads.studio.events.StudioVideoEvent;
   import com.google.ads.studio.video.AbstractPlayerState;
   import com.google.ads.studio.video.PlayingState;
   import com.google.ads.studio.video.VideoController;
    
    
   videoPlayer.addEventListener(
       StudioVideoEvent.STATE_CHANGE,
       function(event:StudioVideoEvent):void {
         var controller:VideoController = (
             videoPlayer.getCurrentVideoController());
         var state:AbstractPlayerState = controller.getPlayerState();
         if (state is PlayingState) {
           playPauseButton.gotoAndStop(1);
         } else {
           playPauseButton.gotoAndStop(2);
         }
       });
   

Constructors

Expand
AbstractPlayerState(videoController: VideoController)

Creates a new AbstractPlayerState.

Instance Methods

Defined in com.google.ads.studio.video:AbstractPlayerState

getStateType() : String

Returns the player state as a string such as "InitialState", "BufferingState", "LoadingState", "PausedState", "PlayingState", or "StoppedState". It is encouraged to use videoController.getPlayerState() and match against the relevant class using instanceof or is.

Expand
pause(alwaysPause:Boolean=false) : AbstractPlayerState

The pause command implementation for the current state.

play() : AbstractPlayerState

The play command implementation for the current state.

Expand
seek(time:Number) : AbstractPlayerState

The seek command implementation for the current state.

stop() : AbstractPlayerState

The stop command implementation for the current state.

Back to top

  1. com.google.ads.studio
    1. AssetLoader
    2. ContextualDiscovery
    3. F2fEnabler
    4. FullScreenButton
    5. HtmlEnabler
    6. ProxyEnabler
    7. VpaidEnabler
  1. com.google.ads.studio.configurable
    1. Configurable
  1. com.google.ads.studio.display
    1. StudioLoader
  1. com.google.ads.studio.events
    1. StudioEvent
    2. StudioVideoEvent
  1. com.google.ads.studio.expanding
    1. Expanding
  1. com.google.ads.studio.localconnect
    1. LocalConnectWrapper
  1. com.google.ads.studio.video
    1. ConfigurableVideoPlayer
    2. EnhancedVideoController
    3. PlayPauseButton
    4. Playlist
    5. Scrubber
    6. SoundToggleButton
    7. VideoController
    8. VideoEntry
    9. VideoPlayer
    10. VideoPlayerAdvanced
  1. com.google.ads.studio.vpaid
    1. VpaidTimer