2

我正在尝试在我使用 Enablex 的画布流 api 的视频聊天应用程序中添加一个白板。 https://developer.enablex.io/video-api/client-api/web-toolkit/advance-features/#start-canvas-streaming

但它不工作。canvasSelector 应该是某种东西还是只是“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");
        }
 });


4

0 回答 0