diff --git a/examples/camera/index.html b/examples/camera/index.html
index f07fa64..a1daf96 100644
--- a/examples/camera/index.html
+++ b/examples/camera/index.html
@@ -46,7 +46,11 @@
if (video.mozCaptureStream) {
video.mozSrcObject = stream;
} else {
- video.src = (URL && URL.createObjectURL(stream)) || stream;
+ if (typeof video.srcObject === "object") {
+ video.srcObject = stream;
+ } else {
+ video.src = (URL && URL.createObjectURL(stream)) || stream;
+ }
}
video.play();
},
diff --git a/index.html b/index.html
index e6762ab..cb377ca 100644
--- a/index.html
+++ b/index.html
@@ -296,7 +296,9 @@
target.width = video.videoWidth;
}
- if (window.webkitURL) {
+ if (typeof video.srcObject === "object") {
+ video.srcObject = stream;
+ } else if (window.webkitURL) {
video.src = window.webkitURL.createObjectURL(stream);
} else {
video.src = stream;
diff --git a/sources/seriously.camera.js b/sources/seriously.camera.js
index 81494d3..b49dc7b 100644
--- a/sources/seriously.camera.js
+++ b/sources/seriously.camera.js
@@ -94,7 +94,9 @@
}
// check for firefox
- if (video.mozCaptureStream) {
+ if (typeof video.srcObject === "object") {
+ video.srcObject = stream;
+ } else if (video.mozCaptureStream) {
video.mozSrcObject = stream;
} else {
video.src = (URL && URL.createObjectURL(stream)) || stream;