Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit::MediaPlayerCallback Class Referenceabstract

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

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

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

virtual void foxit::MediaPlayerCallback::Close | ( |  | ) |
| pure virtual

A callback function to close the media player.

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

Returns
  None.

## ◆ GetPlayerSettings()

virtual MediaSettings foxit::MediaPlayerCallback::GetPlayerSettings | ( |  | ) |
| pure 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()

virtual JSMediaPlayerState foxit::MediaPlayerCallback::GetState | ( |  | ) |
| pure 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()

virtual bool foxit::MediaPlayerCallback::Play | ( |  | ) |
| pure 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()

virtual void foxit::MediaPlayerCallback::Release | ( |  | ) |
| pure virtual

A callback function used to release current callback object itself.

Returns
  None.

## ◆ Seek()

virtual bool foxit::MediaPlayerCallback::Seek | ( | int | current_pos | ) |
| pure 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()

virtual bool foxit::MediaPlayerCallback::Stop | ( |  | ) |
| pure 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.