Foxit PDF SDK
<FSMediaPlayerCallback> Protocol Reference

Inherits <NSObject>.

Instance Methods

(void) - close
 A callback function to close the media player. More...
 
(FSMediaSettings *) - getPlayerSettings
 A callback function to get the media player settings. More...
 
(FSMediaPlayerCallbackJSMediaPlayerState- getState
 A callback function to get the media player state. More...
 
(BOOL) - play
 A callback function to play the media player. More...
 
(BOOL) - seek:
 A callback function to seek the media player. More...
 
(BOOL) - stop
 A callback function to stop the media player. More...
 

Detailed Description

This class represents a callback object for performing media player actions. All the pure virtual functions in this class are used as callback functions and should be implemented by user.

Method Documentation

◆ close()

- (void) close
required

A callback function to close the media player.

This callback function will be triggered by the javascript method "MediaPlayer.close".

Returns
None.

◆ getPlayerSettings()

- (FSMediaSettings*) getPlayerSettings
required

A callback function to get the media player settings.

This callback function will be triggered by the javascript property "MediaPlayer.visible".

Returns
A MediaSettings object.

◆ getState()

A callback function to get the media player state.

This callback function will be triggered by the javascript property "MediaPlayer.isOpen".

Returns
The media player state.

◆ play()

- (BOOL) play
required

A callback function to play the media player.

This callback function will be triggered by the javascript method "MediaPlayer.play".

Returns
true means success, while false means failure.

◆ seek:()

- (BOOL) seek: (int)  current_pos
required

A callback function to seek the media player.

This callback function will be triggered by the javascript method "MediaPlayer.seek".

Parameters
[in]current_posIndicate the playback location.
Returns
true means success, while false means failure.

◆ stop()

- (BOOL) stop
required

A callback function to stop the media player.

This callback function will be triggered by the javascript method "MediaPlayer.stop".

Returns
true means success, while false means failure.