CB-13384: (browser) Added deprecation of video.src compatibility (#288)

* CB-13384: (browser) Added deprecation of video.src compatibility

* CB-13384: Updated to reflect property detection rather than deprecation exception.
This commit is contained in:
Matthew Vander Vliet 2018-05-24 22:44:23 -06:00 committed by Shazron Abdullah
parent 36343a8e07
commit 5163d38465

View File

@ -102,9 +102,12 @@ function capture (success, errorCallback, opts) {
var successCallback = function (stream) {
localMediaStream = stream;
video.src = window.URL.createObjectURL(localMediaStream);
if ('srcObject' in video) {
video.srcObject = localMediaStream;
} else {
video.src = window.URL.createObjectURL(localMediaStream);
}
video.play();
document.body.appendChild(parent);
};