Skip to content

Commit

Permalink
CB-13384: (browser) Added deprecation of video.src compatibility (#288)
Browse files Browse the repository at this point in the history
* 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 5163d38
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/browser/CameraProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 5163d38

Please sign in to comment.