From 857f77c5117e8513c29e50062735c5934953a2f2 Mon Sep 17 00:00:00 2001 From: Karishma Chadha Date: Sun, 29 Apr 2018 19:52:21 -0400 Subject: [PATCH] Addressing PR comments. --- src/io/video.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/io/video.js b/src/io/video.js index e65edbe65..c01141c1e 100644 --- a/src/io/video.js +++ b/src/io/video.js @@ -65,7 +65,8 @@ class Video { } /** - * Set a video provider for this device. + * Set a video provider for this device. A default implementation of + * a video provider can be found in scratch-gui/src/lib/video/video-provider * @param {VideoProvider} provider - Video provider to use */ setProvider (provider) { @@ -89,8 +90,8 @@ class Video { * @return {void} */ disableVideo () { - if (!this.provider) return null; this._disablePreview(); + if (!this.provider) return null; this.provider.disableVideo(); } @@ -114,9 +115,6 @@ class Video { cacheTimeout = this._frameCacheTimeout }) { if (this.provider) return this.provider.getFrame({dimensions, mirror, format, cacheTimeout}); - if (!this.videoReady) { - return null; - } return null; }