voxeet / voxeet-uxkit-cordova

Dolby.io UXKit for Cordova
Other
1 stars 14 forks source link

navigator.attachMediaStream() is not available in ionic #71

Closed asadumair closed 1 year ago

asadumair commented 1 year ago

navigator.attachMediaStream() is not available ionic

this will use for the append different videos under desired div.

if (!videoNode) { videoNode = document.createElement("video");

videoNode.setAttribute("id", "video-" + participant.id);
videoNode.setAttribute("height", 240);
videoNode.setAttribute("width", 320);
videoNode.setAttribute("playsinline", true);
videoNode.muted = true;
videoNode.setAttribute("autoplay", "autoplay");

const videoContainer = document.getElementById("video-container");
videoContainer.appendChild(videoNode);

}

navigator.attachMediaStream(videoNode, stream);

error: attachMediaStream is not found

codlab commented 1 year ago

The navigator's attachMediaStream is only available in regular browsers, Cordova and ionic are shipping a minimalist implementation (that's why currently only the UXKit's are supported by Cordova). Implementing custom video in the div is then not supported and only possible via native views