Foxit PDF RDK

Public Member Functions | Static Public Attributes | List of all members
MediaPlayerCallback Class Reference
Inheritance diagram for MediaPlayerCallback:

## Public Member Functions
| Close ()
| A callback function to close the media player. More...
| GetPlayerSettings ()
| A callback function to get the media player settings. More...
| GetState ()
| A callback function to get the media player state. More...
| Play ()
| A callback function to play the media player. More...
| Release ()
| A callback function used to release current callback object itself. More...
| Seek (current_pos)
| A callback function to seek the media player. More...
| Stop ()
| A callback function to stop the media player. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Static Public Attributes
static | e_JSMediaPlayerStateClose
| media player state: Close.
static | e_JSMediaPlayerStateOpen
| Enumeration for media player state. More...
static | e_JSMediaPlayerStatePlaying
| media player state: Playing.
static | e_JSMediaPlayerStateStop
| media player state: Stop.
static | e_JSMediaPlayerStateSuspend
| 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.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ Close()

MediaPlayerCallback.Close | ( |  | ) |

A callback function to close the media player.

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

Returns
  None.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## ◆ GetPlayerSettings()

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.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## ◆ GetState()

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.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## ◆ Play()

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.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## ◆ Release()

MediaPlayerCallback.Release | ( |  | ) |

A callback function used to release current callback object itself.

Returns
  None.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## ◆ Seek()

MediaPlayerCallback.Seek | ( | 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.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## ◆ Stop()

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.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Data Documentation

## ◆ e_JSMediaPlayerStateOpen

MediaPlayerCallback.e_JSMediaPlayerStateOpen
| static

Enumeration for media player state.

Values of this enumeration should be used alone.

media player state: Open.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.