FoxitPDFSDKforWeb  v10.0.0
Foxit PDF SDK for Web
MultimediaPlayer Interface Reference

An interface represents the necessary methods of multimedia player. The MultimediaPlayer object need to override its methods to implement the operations. More...

Public Member Functions

 constructor (eContainer, annot, pdfViewer)
 Create a Player. More...
 
void destroy ()
 A method used to destroy the player instance. More...
 
void download ()
 A method used to download the multimedia file. More...
 
Promise< void > init (data)
 A method used to initialize the player instance. More...
 
Promise< boolean > isSupport (data)
 A method used to verify whether the player supports the given data. More...
 
void on (type, listener)
 A method to listen to the player event. More...
 
void pause ()
 A method used to pause the multimedia file. More...
 
void play ()
 A method used to play the multimedia file. More...
 

Detailed Description

An interface represents the necessary methods of multimedia player. The MultimediaPlayer object need to override its methods to implement the operations.

Since
10.0.0

Member Function Documentation

◆ constructor()

MultimediaPlayer::constructor ( eContainer  ,
annot  ,
pdfViewer   
)

Create a Player.

Parameters
eContainerHTMLElement - The container element of the player.
annotAnnot - The screen annotation object.
pdfViewerPDFViewer - The PDFViewer object instance.
Since
10.0.0

◆ destroy()

void MultimediaPlayer::destroy ( )

A method used to destroy the player instance.

Returns
void
Since
10.0.0

◆ download()

void MultimediaPlayer::download ( )

A method used to download the multimedia file.

Returns
void
Since
10.0.0

◆ init()

Promise<void> MultimediaPlayer::init ( data  )

A method used to initialize the player instance.

Parameters
dataObject - The data to be initialized.
data.bufferArrayBuffer - The buffer of the multimedia file.
data.fileNamestring - The name of the multimedia file.
data.contentTypestring - The content type of the multimedia file.
Returns
Promise<void>
Since
10.0.0

◆ isSupport()

Promise<boolean> MultimediaPlayer::isSupport ( data  )

A method used to verify whether the player supports the given data.

Parameters
dataObject - The data to be verified.
fileNamestring - The name of the multimedia file.
bufferArrayBuffer - The buffer of the multimedia file.
Returns
Promise<boolean> - True if the player supports the given data, otherwise false.
Since
10.0.0

◆ on()

void MultimediaPlayer::on ( type  ,
listener   
)

A method to listen to the player event.

Parameters
typestring - The event type. it should be the one of 'play', 'pause', 'ended' and 'error'.
listener(annot) => void - The listener function.
Returns
()=>void - The callback function used to turn off the events.
Since
10.0.0

◆ pause()

void MultimediaPlayer::pause ( )

A method used to pause the multimedia file.

Returns
void
Since
10.0.0

◆ play()

void MultimediaPlayer::play ( )

A method used to play the multimedia file.

Returns
void
Since
10.0.0

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.