Reputation: 319
I want to support up to full HD. Is this possible with tokbox? If not tokbox can I do it with say jitsi? Tokbox is just super easy to get started with.
Upvotes: 0
Views: 767
Reputation: 56
This is now supported. Please see https://tokbox.com/developer/guides/1080p/ for more!
Upvotes: 0
Reputation: 1537
That's not officially supported with TokBox. It's hard to find webcams that actually support full HD. You should be able to call getUserMedia yourself though and pass your own MediaStream to an OpenTok Publisher.
navigator.mediaDevices.getUserMedia({
video: {
width: {ideal: 1920},
height: {ideal: 1080}
},
audio: true
}).then(stream => {
let publisher = OT.initPublisher(null, {
audioSource: stream.getAudioTracks()[0],
videoSource: stream.getVideoTracks()[0],
fitMode: 'contain'
}, function(err) {
if (err) {
alert(err.message);
} else {
videoWidth.innerHTML = publisher.videoWidth();
videoHeight.innerHTML = publisher.videoHeight();
}
});
});
Here is a demo of it working https://output.jsbin.com/yiwupoc
Note this code will try to get 1080p but if your camera does not support it then it will just try to get the closest resolution. Also it won't work with Internet Explorer.
Upvotes: 2