Reputation: 349
I am trying to add a whiteboard in my video chat app for which i am using Enablex's canvas streaming api. https://developer.enablex.io/video-api/client-api/web-toolkit/advance-features/#start-canvas-streaming
But it is'nt working. Does canvasSelector should be something or just "CanvasElementId"
var CanvasOpt = {
"canvasSelector": "CanvasElementID",
"fps": 23
};
room.startCanvas(CanvasOpt, function(arg) {
if(arg.result == 0) { // Success
}
else { // Error arg.result == 1154 (Frame rate not supported)
}
});
// Participant receives notification, finds stream ID 102 and plays
room.addEventListener("canvas-started", function (event) {
var canvasStream = room.remoteStreams.get(102);
if(canvasStream.stream !== undefined) {
canvasStream.play("PlayerDiv");
}
});
Upvotes: 2
Views: 57