An interface represents the necessary methods of multimedia player. The MultimediaPlayer object need to override its methods to implement the operations.
More...
|
| 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...
|
|
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
◆ constructor()
MultimediaPlayer::constructor |
( |
eContainer |
, |
|
|
annot |
, |
|
|
pdfViewer |
|
|
) |
| |
Create a Player.
- Parameters
-
eContainer | HTMLElement - The container element of the player. |
annot | Annot - The screen annotation object. |
pdfViewer | PDFViewer - 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
-
data | Object - The data to be initialized. |
data.buffer | ArrayBuffer - The buffer of the multimedia file. |
data.fileName | string - The name of the multimedia file. |
data.contentType | string - 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
-
data | Object - The data to be verified. |
fileName | string - The name of the multimedia file. |
buffer | ArrayBuffer - 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
-
type | string - 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