Add 'dependent camera' support.

This commit is contained in:
Dermot Duffy
2022-04-23 11:22:04 -07:00
parent 58813c156e
commit fb9d5684ec
11 changed files with 363 additions and 164 deletions
+13 -1
View File
@@ -61,7 +61,7 @@ export class View {
target: params.target !== undefined ? params.target : this.target,
childIndex: params.childIndex !== undefined ? params.childIndex : this.childIndex,
context: params.context !== undefined ? params.context : this.context,
// Special case: Set the previous to this of the evolved view (rather than
// the previous of this).
previous: params.previous !== undefined ? params.previous : this,
@@ -110,6 +110,18 @@ export class View {
return ['snapshot', 'snapshots'].includes(this.view);
}
/**
* Get the media type for this view if available.
* @returns Whether the media is `clips` or `snapshots` or unknown (`null`)
*/
public getMediaType(): 'clips' | 'snapshots' | null {
return this.isClipRelatedView()
? 'clips'
: this.isSnapshotRelatedView()
? 'snapshots'
: null;
}
/**
* Get the media item that should be played.
**/