Skip to content
Permalink
Browse files
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.
  • Loading branch information
mvandervliet authored and shazron committed May 25, 2018
1 parent 36343a8 commit 5163d3846558c70753af0d232bec762f337f2c66
Showing 1 changed file with 5 additions and 2 deletions.
@@ -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);
};

0 comments on commit 5163d38

Please sign in to comment.