Default stage.videoState to ON

Set to ON, adding a video extension when a user selects a video extension in
the gui, the video extension will use stage.videoState to turn on the video
device. Adding a video extension as part of loading a project, the stage's
videoState will be set to the stored value in the project's saved data, and the
extension will set the video device's state with that saved value.
This commit is contained in:
Michael "Z" Goddard 2018-04-10 13:36:39 -04:00
parent 044370790c
commit b9911332c7
No known key found for this signature in database
GPG key ID: 762CD40DD5349872

View file

@ -140,9 +140,17 @@ class RenderedTarget extends Target {
/**
* The state of the video input (used by extensions with camera input).
* This property is global to the project and stored in the stage.
*
* Defaults to ON. This setting does not turn the video by itself. A
* video extension once loaded will set the video device to this
* setting. Set to ON when a video extension is added in the editor the
* video will start ON. If the extension is loaded as part of loading a
* saved project the extension will see the value set when the stage
* was loaded from the saved values including the video state.
*
* @type {string}
*/
this.videoState = RenderedTarget.VIDEO_STATE.OFF;
this.videoState = RenderedTarget.VIDEO_STATE.ON;
}
/**
@ -211,13 +219,13 @@ class RenderedTarget extends Target {
/**
* Available states for video input.
* @type {object}
* @enum {string}
*/
static get VIDEO_STATE () {
return {
'OFF': 'off',
'ON': 'on',
'ON-FLIPPED': 'on-flipped'
OFF: 'off',
ON: 'on',
ON_FLIPPED: 'on-flipped'
};
}