How can I record a Video Session?

A moderator can start and stop recording of a session on the fly. Use the following methods to start / stop recording:

// To start recording
room.startRecord( function( result, error ) { 
     if (result == 0) { 
     // Recording started 
} }); 

// To stop recording 
room.stopRecord( function( result, error ) { 
     if (result == 0){ 
     // Recording stopped 
} }); 

// Notify all that session is being recorded
room.addEventListener( "room-record-on", function(event) { 
     // Recording started, Update UI 
     // event.message.moderatorId = Moderator who stated recording. 
}); 

// Notify all that recording has stopped
room.addEventListener( "room-record-off", function(event) { 
     // Recording stopped, Update UI 
     // event.message.moderatorId = Moderator who stopped recording. 
});

Learn more about Recording a Session here.