CameraSource
Defined in: core/source/camera.ts:40
The CameraSource class represents the sources of the camera device items that has been added to the stage. A single source could have multiple items linked into it and any changes to the source would affect all items linked to it.
Each item is represented by the CameraItem class. See: #core/CameraItem Core/CameraItem
Inherits from: #core/Source Core/Source
Basic Usage
Section titled “Basic Usage”var xjs = require('xjs');
xjs.Scene.getActiveScene().then(function(scene) { scene.getSources().then(function(sources) { for (var i in sources) { if (sources[i] instanceof XJS.CameraSource) { // Manipulate your camera device source here sources[i].setSilenceDetectionEnabled(true); } } })})All methods marked as Chainable resolve with the original CameraSource
instance.
Extends
Section titled “Extends”Implements
Section titled “Implements”IAudioISourceCamera
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CameraSource(
props?):CameraSource
Defined in: core/source/source.ts:75
Parameters
Section titled “Parameters”props?
Section titled “props?”Returns
Section titled “Returns”CameraSource
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”getAudioInput
Section titled “getAudioInput”getAudioInput: () =>
Promise<MicrophoneDevice>
Defined in: core/source/camera.ts:55
See: #core/ISourceCamera#getAudioInput getAudioInput
Returns
Section titled “Returns”Promise<MicrophoneDevice>
Implementation of
Section titled “Implementation of”ISourceCamera.getAudioInput
getAudioOffset
Section titled “getAudioOffset”getAudioOffset: () =>
Promise<number>
Defined in: core/source/camera.ts:49
See: #core/ISourceCamera#getAudioOffset getAudioOffset
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”ISourceCamera.getAudioOffset
getCustomName
Section titled “getCustomName”getCustomName: () =>
Promise<string>
Defined in: core/source/source.ts:291
See: #core/ISource#getCustomName getCustomName
Returns
Section titled “Returns”Promise<string>
Inherited from
Section titled “Inherited from”getDelay
Section titled “getDelay”getDelay: () =>
Promise<number>
Defined in: core/source/camera.ts:73
See: #core/ISourceCamera#getDelay getDelay
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”ISourceCamera.getDelay
getDeviceId
Section titled “getDeviceId”getDeviceId: () =>
Promise<string>
Defined in: core/source/camera.ts:43
See: #core/ISourceCamera#getDeviceId getDeviceId
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”ISourceCamera.getDeviceId
getId: () =>
Promise<string>
Defined in: core/source/source.ts:316
See: #core/ISource#getId getId
Returns
Section titled “Returns”Promise<string>
Inherited from
Section titled “Inherited from”getItemList
Section titled “getItemList”getItemList: () =>
Promise<Item[]>
Defined in: core/source/source.ts:321
See: #core/ISource#getItemList getItemList
Returns
Section titled “Returns”Promise<Item[]>
Inherited from
Section titled “Inherited from”getKeepLoaded
Section titled “getKeepLoaded”getKeepLoaded: () =>
Promise<boolean>
Defined in: core/source/source.ts:306
See: #core/ISource#getKeepLoaded getKeepLoaded
Returns
Section titled “Returns”Promise<boolean>
Inherited from
Section titled “Inherited from”getName
Section titled “getName”getName: () =>
Promise<string>
Defined in: core/source/source.ts:281
See: #core/ISource#getName getName
Returns
Section titled “Returns”Promise<string>
Inherited from
Section titled “Inherited from”getResolution
Section titled “getResolution”getResolution: () =>
Promise<Rectangle>
Defined in: core/source/camera.ts:46
See: #core/ISourceCamera#getResolution getResolution
Returns
Section titled “Returns”Promise<Rectangle>
Implementation of
Section titled “Implementation of”ISourceCamera.getResolution
getType
Section titled “getType”getType: () =>
Promise<ItemTypes>
Defined in: core/source/source.ts:331
See: #core/ISource#getType getType
Returns
Section titled “Returns”Promise<ItemTypes>
Inherited from
Section titled “Inherited from”getValue
Section titled “getValue”getValue: () =>
Promise<string|XML>
Defined in: core/source/source.ts:296
See: #core/ISource#getValue getValue
Returns
Section titled “Returns”Promise<string | XML>
Implementation of
Section titled “Implementation of”ISourceCamera.getValue
Inherited from
Section titled “Inherited from”getVolume
Section titled “getVolume”getVolume: () =>
Promise<number>
Defined in: core/source/camera.ts:87
See: #core/IAudio#getVolume getVolume
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”IAudio.getVolume
isActive
Section titled “isActive”isActive: () =>
Promise<boolean>
Defined in: core/source/camera.ts:70
See: #core/ISourceCamera#isActive isActive
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”ISourceCamera.isActive
isAudioAvailable
Section titled “isAudioAvailable”isAudioAvailable: () =>
Promise<boolean>
Defined in: core/source/camera.ts:111
See: #core/IAudio#isAudioAvailable isAudioAvailable
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”IAudio.isAudioAvailable
isAutoMute
Section titled “isAutoMute”isAutoMute: () =>
Promise<boolean>
Defined in: core/source/camera.ts:93
See: #core/IAudio#isAutoMute isAutoMute
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”IAudio.isAutoMute
isForceDeinterlace
Section titled “isForceDeinterlace”isForceDeinterlace: () =>
Promise<boolean>
Defined in: core/source/camera.ts:79
See: #core/ISourceCamera#isForceDeinterlace isForceDeinterlace
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”ISourceCamera.isForceDeinterlace
isHardwareEncoder
Section titled “isHardwareEncoder”isHardwareEncoder: () =>
Promise<boolean>
Defined in: core/source/camera.ts:67
See: #core/ISourceCamera#isHardwareEncoder isHardwareEncoder
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”ISourceCamera.isHardwareEncoder
isMute
Section titled “isMute”isMute: () =>
Promise<boolean>
Defined in: core/source/camera.ts:90
See: #core/IAudio#isMute isMute
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”IAudio.isMute
isStreamOnlyAudio
Section titled “isStreamOnlyAudio”isStreamOnlyAudio: () =>
Promise<boolean>
Defined in: core/source/camera.ts:105
See: #core/IAudio#isStreamOnlyAudio isStreamOnlyAudio
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”IAudio.isStreamOnlyAudio
isStreamPaused
Section titled “isStreamPaused”isStreamPaused: () =>
Promise<boolean>
Defined in: core/source/camera.ts:61
See: #core/ISourceCamera#isStreamPaused isStreamPaused
Returns
Section titled “Returns”Promise<boolean>
Implementation of
Section titled “Implementation of”ISourceCamera.isStreamPaused
refresh
Section titled “refresh”refresh: () =>
Promise<Source>
Defined in: core/source/source.ts:326
See: #core/ISource#refresh refresh
Returns
Section titled “Returns”Promise<Source>
Inherited from
Section titled “Inherited from”setAudioInput
Section titled “setAudioInput”setAudioInput: (
value) =>Promise<ISourceCamera>
Defined in: core/source/camera.ts:58
See: #core/ISourceCamera#setAudioInput setAudioInput
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ISourceCamera>
Implementation of
Section titled “Implementation of”ISourceCamera.setAudioInput
setAudioOffset
Section titled “setAudioOffset”setAudioOffset: (
value) =>Promise<ISourceCamera>
Defined in: core/source/camera.ts:52
See: #core/ISourceCamera#setAudioOffset setAudioOffset
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<ISourceCamera>
Implementation of
Section titled “Implementation of”ISourceCamera.setAudioOffset
setAutoMute
Section titled “setAutoMute”setAutoMute: (
value) =>Promise<CameraSource>
Defined in: core/source/camera.ts:102
See: #core/IAudio#setAutoMute setAutoMute
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<CameraSource>
Implementation of
Section titled “Implementation of”IAudio.setAutoMute
setCustomName
Section titled “setCustomName”setCustomName: () =>
Promise<Source>
Defined in: core/source/source.ts:286
See: #core/ISource#setCustomName setCustomName
Returns
Section titled “Returns”Promise<Source>
Inherited from
Section titled “Inherited from”setDelay
Section titled “setDelay”setDelay: (
value) =>Promise<ISourceCamera>
Defined in: core/source/camera.ts:76
See: #core/ISourceCamera#setDelay setDelay
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<ISourceCamera>
Implementation of
Section titled “Implementation of”ISourceCamera.setDelay
setForceDeinterlace
Section titled “setForceDeinterlace”setForceDeinterlace: (
value) =>Promise<ISourceCamera>
Defined in: core/source/camera.ts:82
See: #core/ISourceCamera#setForceDeinterlace setForceDeinterlace
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceCamera>
Implementation of
Section titled “Implementation of”ISourceCamera.setForceDeinterlace
setKeepLoaded
Section titled “setKeepLoaded”setKeepLoaded: (
value) =>Promise<Source>
Defined in: core/source/source.ts:311
See: #core/ISource#setKeepLoaded setKeepLoaded
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<Source>
Inherited from
Section titled “Inherited from”setMute
Section titled “setMute”setMute: (
value) =>Promise<CameraSource>
Defined in: core/source/camera.ts:99
See: #core/IAudio#setMute setMute
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<CameraSource>
Implementation of
Section titled “Implementation of”IAudio.setMute
setName
Section titled “setName”setName: (
value) =>Promise<Source>
Defined in: core/source/source.ts:276
See: #core/ISource#setName setName
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<Source>
Inherited from
Section titled “Inherited from”setStreamOnlyAudio
Section titled “setStreamOnlyAudio”setStreamOnlyAudio: (
value) =>Promise<CameraSource>
Defined in: core/source/camera.ts:108
See: #core/IAudio#setStreamOnlyAudio setStreamOnlyAudio
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<CameraSource>
Implementation of
Section titled “Implementation of”IAudio.setStreamOnlyAudio
setStreamPaused
Section titled “setStreamPaused”setStreamPaused: (
value) =>Promise<ISourceCamera>
Defined in: core/source/camera.ts:64
See: #core/ISourceCamera#setStreamPaused setStreamPaused
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”Promise<ISourceCamera>
Implementation of
Section titled “Implementation of”ISourceCamera.setStreamPaused
setValue
Section titled “setValue”setValue: (
value) =>Promise<Source>
Defined in: core/source/source.ts:301
See: #core/ISource#setValue setValue
Parameters
Section titled “Parameters”string | XML
Returns
Section titled “Returns”Promise<Source>
Implementation of
Section titled “Implementation of”ISourceCamera.setValue
Inherited from
Section titled “Inherited from”setVolume
Section titled “setVolume”setVolume: (
value) =>Promise<CameraSource>
Defined in: core/source/camera.ts:96
See: #core/IAudio#setVolume setVolume
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”Promise<CameraSource>
Implementation of
Section titled “Implementation of”IAudio.setVolume
Methods
Section titled “Methods”getAllSources()
Section titled “getAllSources()”
staticgetAllSources():Promise<Source[]>
Defined in: core/source/source.ts:220
return: Promise<Source[]>
Get all unique Source from every scene.
Total number of Sources returned may be less than total number of items on
all the scenes due to Linked items only having a single Source.
xjs.Source.getAllSources().then(function(sources) { for(var i = 0 ; i < sources.length ; i++) { if(sources[i] instanceof xjs.HtmlSource) { // Manipulate HTML Source here } }})Returns
Section titled “Returns”Promise<Source[]>
Inherited from
Section titled “Inherited from”getCurrentSource()
Section titled “getCurrentSource()”
staticgetCurrentSource():Promise<Source>
Defined in: core/source/source.ts:108
return: Promise
Get the current source (when function is called by sources), or the source that was right-clicked to open the source properties window (when function is called from the source properties window)
xjs.Source.getCurrentSource().then(function(source) { // This will fetch the current source (the plugin)}).catch(function(err) { // Handle the error here. Errors would only occur // if we try to execute this method on Extension plugins});Returns
Section titled “Returns”Promise<Source>
Inherited from
Section titled “Inherited from”getItemList()
Section titled “getItemList()”
staticgetItemList():Promise<Item[]>
Defined in: core/source/source.ts:167
return: Promise<Item[]>
Get the item List of the current Source. The item list is a list of items linked to a single Source.
xjs.Source.getItemList().then(function(items) { // This will fetch the item list of the current Source for (var i = 0 ; i < items.length ; i++) { // Manipulate each item here }});This is just the shorter way of getting items that are linked to a single source. See the long version below:
xjs.Source.getCurrentSource().then(source.getItemList).then(function(items) {// Manipulate the items here})Returns
Section titled “Returns”Promise<Item[]>