mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-19 03:42:52 +08:00
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:
parent
36343a8e07
commit
5163d38465
@ -102,9 +102,12 @@ function capture (success, errorCallback, opts) {
|
|||||||
|
|
||||||
var successCallback = function (stream) {
|
var successCallback = function (stream) {
|
||||||
localMediaStream = stream;
|
localMediaStream = stream;
|
||||||
|
if ('srcObject' in video) {
|
||||||
|
video.srcObject = localMediaStream;
|
||||||
|
} else {
|
||||||
video.src = window.URL.createObjectURL(localMediaStream);
|
video.src = window.URL.createObjectURL(localMediaStream);
|
||||||
|
}
|
||||||
video.play();
|
video.play();
|
||||||
|
|
||||||
document.body.appendChild(parent);
|
document.body.appendChild(parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user