From 460c90de03d57b45804b201dc8287d5c93cd3534 Mon Sep 17 00:00:00 2001 From: guest271314 Date: Fri, 16 Oct 2020 12:13:52 -0700 Subject: [PATCH] Substitute srcObject for URL.createObjectURL() `createObjectURL(MediaStream)` is deprecated - https://www.w3.org/Bugs/Public/show_bug.cgi?id=23091 - https://bugs.chromium.org/p/chromium/issues/detail?id=591719 - https://github.com/w3c/mediacapture-main/issues/404 - https://bugzilla.mozilla.org/show_bug.cgi?id=1334564 --- test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.js b/test.js index 40f39f3..5f492d1 100644 --- a/test.js +++ b/test.js @@ -103,7 +103,7 @@ var Camera = (function () { _this._sec_per_frame = 1 / _this._fps; _this._first_timestamp = _this._prev_frame_index = -1; _this._video = document.createElement('video'); - _this._video.src = URL.createObjectURL(strm); + _this._video.srcObject = strm; _this._video.play(); _this._video.addEventListener('loadedmetadata', function (e) { var w = _this._width = _this._video.videoWidth;