addListener
Registers a listener to receive notifications about playback and media state changes in AstroPlayer.
This method adds the provided AstroPlayerListener
to the internal list of listeners maintained by AstroPlayer. When events related to playback, media state, or settings changes occur, all registered listeners will be notified with the corresponding callback methods.
The method returns an integer that can be used as an identifier for the registered listener. This ID might be useful for future calls to removeListener
if you want to unregister the listener using a specific identifier.
Return
An integer representing the ID of the registered listener (implementation-specific behavior).
Parameters
The AstroPlayerListener
object that will be registered to receive notifications.