Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.pdf.actions.MediaPlayerCallback Class Reference

Inherits SystemIDisposable.

## Public Types
enum | JSMediaPlayerState { JSMediaPlayerState.e_JSMediaPlayerStateOpen = 0, JSMediaPlayerState.e_JSMediaPlayerStateClose = 1, JSMediaPlayerState.e_JSMediaPlayerStatePlaying = 2, JSMediaPlayerState.e_JSMediaPlayerStateStop = 3, JSMediaPlayerState.e_JSMediaPlayerStateSuspend = 4 }
| Enumeration for media player state. More...

## Public Member Functions
virtual void | Close ()
| A callback function to close the media player. More...
virtual MediaSettings | GetPlayerSettings ()
| A callback function to get the media player settings. More...
virtual MediaPlayerCallback.JSMediaPlayerState | GetState ()
| A callback function to get the media player state. More...
virtual bool | Play ()
| A callback function to play the media player. More...
virtual void | Release ()
| A callback function used to release current callback object itself. More...
virtual bool | Seek (int current_pos)
| A callback function to seek the media player. More...
virtual 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.

## Member Enumeration Documentation

## ◆ JSMediaPlayerState

enum foxit.pdf.actions.MediaPlayerCallback.JSMediaPlayerState
| strong

Enumeration for media player state.

Values of this enumeration should be used alone.

Enumerator
e_JSMediaPlayerStateOpen | media player state: Open.
e_JSMediaPlayerStateClose | media player state: Close.
e_JSMediaPlayerStatePlaying | media player state: Playing.
e_JSMediaPlayerStateStop | media player state: Stop.
e_JSMediaPlayerStateSuspend | media player state: Suspend.

## Member Function Documentation

## ◆ Close()

void foxit.pdf.actions.MediaPlayerCallback.Close | ( |  | ) |
| inline virtual

A callback function to close the media player.

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

Returns
  None.

## ◆ GetPlayerSettings()

MediaSettings foxit.pdf.actions.MediaPlayerCallback.GetPlayerSettings | ( |  | ) |
| inline virtual

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

MediaPlayerCallback.JSMediaPlayerState foxit.pdf.actions.MediaPlayerCallback.GetState | ( |  | ) |
| inline virtual

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 foxit.pdf.actions.MediaPlayerCallback.Play | ( |  | ) |
| inline virtual

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 foxit.pdf.actions.MediaPlayerCallback.Release | ( |  | ) |
| inline virtual

A callback function used to release current callback object itself.

Returns
  None.

## ◆ Seek()

bool foxit.pdf.actions.MediaPlayerCallback.Seek | ( | int | current_pos | ) |
| inline virtual

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

bool foxit.pdf.actions.MediaPlayerCallback.Stop | ( |  | ) |
| inline virtual

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.