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