Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
com.foxit.sdk.MediaPlayerCallback Class Reference

## Public Member Functions
void | close ()
| A callback function to close the media player. More...
MediaSettings | getPlayerSettings ()
| A callback function to get the media player settings. More...
int | getState ()
| A callback function to get the media player state. More...
boolean | play ()
| A callback function to play the media player. More...
void | release ()
| A callback function used to release current callback object itself. More...
boolean | seek (int current_pos)
| A callback function to seek the media player. More...
boolean | stop ()
| A callback function to stop the media player. More...

## Static Public Attributes
static final int | e_JSMediaPlayerStateClose = 1
| media player state: Close.
static final int | e_JSMediaPlayerStateOpen = 0
| media player state: Open.
static final int | e_JSMediaPlayerStatePlaying = 2
| media player state: Playing.
static final int | e_JSMediaPlayerStateStop = 3
| media player state: Stop.
static final int | e_JSMediaPlayerStateSuspend = 4
| media player state: Suspend.

## 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.

## Member Function Documentation

## ◆ close()

void com.foxit.sdk.MediaPlayerCallback.close | ( |  | ) |

A callback function to close the media player.

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

Returns
  None.

## ◆ getPlayerSettings()

MediaSettings com.foxit.sdk.MediaPlayerCallback.getPlayerSettings | ( |  | ) |

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()

int com.foxit.sdk.MediaPlayerCallback.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()

boolean com.foxit.sdk.MediaPlayerCallback.play | ( |  | ) |

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.

## ◆ release()

void com.foxit.sdk.MediaPlayerCallback.release | ( |  | ) |

A callback function used to release current callback object itself.

Returns
  None.

## ◆ seek()

boolean com.foxit.sdk.MediaPlayerCallback.seek | ( | int | current_pos | ) |

A callback function to seek the media player.

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

Parameters

  [in] | current_pos | Indicate the playback location.

Returns
  true means success, while false means failure.

## ◆ stop()

boolean com.foxit.sdk.MediaPlayerCallback.stop | ( |  | ) |

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.