Ticket #415 (closed feature: fixed)

Opened 4 years ago

Last modified 4 years ago

Clean up player API

Reported by: jeroen Owned by: pablo
Priority: Milestone: Flash 5.0
Component: Keywords:
Cc: Forum thread:

Description (last modified by pablo) (diff)

Player 5 plugins will have a new API to interact with the player, which simplifies player interaction and removes the need for plugin developers to understand the player's internal structure.

Initialization

Initialization of the player happens before the first LOAD and before the first REDRAW occurs. It is different for plugins, ActionScript and javascript:

  • Plugins have an initPlugin(player, config) call, which returns a reference to the Player API class and the plugin's config object.
  • ActionScript can subscribe to the PlayerEvent.JWPLAYER_PLAYER_READY event.
  • Javascript can set the 'playerready' flashvar with the name of a callback function which is executed when the player setup is complete.

Public Player properties (read-only)

  • playlist:Playlist
  • config:PlayerConfig
  • skin:ISkin
  • isBlocking:Boolean
  • fullscreen:Boolean
  • mute:Boolean
  • controls:PlayerControls

Public Player methods

  • addEventListener(event type,listener):Boolean
  • removeEventListener(event type,listener):Boolean
  • play()
  • pause()
  • stop()
  • playlistNext()
  • playlistPrev()
  • playlistItem(index)
  • seek(position)
  • load(toLoad)
  • blockPlayback(plugin)
  • unblockPlayback(plugin)

Change History

comment:1 Changed 4 years ago by jeroen

  • Description modified (diff)

comment:2 Changed 4 years ago by jeroen

  • Description modified (diff)

comment:3 Changed 4 years ago by jeroen

  • Description modified (diff)

comment:4 Changed 4 years ago by jeroen

every event should also be its own class, so the event parameters are strong typed.

comment:5 Changed 4 years ago by jeroen

  • Owner changed from jeroen to pablo

comment:6 Changed 4 years ago by jeroen

  • Description modified (diff)

comment:7 Changed 4 years ago by pablo

  • Status changed from new to closed
  • Resolution set to fixed
  • Description modified (diff)
Note: See TracTickets for help on using tickets.