new videoPlayer(onEvents, domElements, options)
VideoPlayer usecase
Parameters:
Name | Type | Description |
---|---|---|
onEvents |
object | Event handlers: onEvents |
domElements |
object | DOM elements: domElements |
options |
object | Available options: options |
Returns:
VideoPlayer actions
- Type
- Promise
Example
var onEvents = { onStopped: function(cause) { // Stopped } }; var domElements = { videoplayer: document.getElementById('videoplayer') }; var options = { account: "******" // Multiple mode }; usecases.videoPlayer(onEvents, domElements, options) .then(action => { // Use Case has been atacched succesfully ... }) .catch(cause => { // Error attaching the Use Case console.log("Error Attach " + cause ); })
Methods
-
closeUsecase()
-
Close the current UseCase. It's recommended combine with disconnect method
Returns:
- Type
- nothing
Example
action.closeUsecase(); myVideoApp.disconnect(); // Recommended
-
getRecords(filter, sessionStreams)
-
Gets the list of available Records in the VideoGateway
Parameters:
Name Type Description filter
RegExp RegExp to filter the list of records. e.g: /^default/i
sessionStreams
boolean Show/Hide sessions streams (Optional)
Returns:
List of records ({id, name, date})
- Type
- Promise.<Records>
Example
action.getRecords(/^__default__/i, true) .then(records => { // Success console.log(records); })
-
playRecord(idRecord, playSessionStreams)
-
Play out a Video message recorded previously by the Videomail or Split
Parameters:
Name Type Description idRecord
integer Id Record
playSessionStreams
boolean Play Session Streams? (Optional)
Returns:
- Type
- nothing
Example
action.playRecord(5434232, true);