mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Addressing PR comments.
This commit is contained in:
parent
271a19c05d
commit
857f77c511
1 changed files with 3 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue