Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"description": "This is a meta-schema that defines the schemas for *device*/$schemas/mappings.json",
"type": "object",
"properties": {
"$schema": {
"description": "The JSON schema that this mapping schema should adhere to. This is used for validation and tooling purposes.",
"type": "string"
},
"default": {
"description": "The default mapping to use when creating a new mapping for this device",
"type": "string"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ exports[`index imports 1`] = `
"MappingSisyfosType",
"MappingSofieChefType",
"MappingTricasterType",
"MappingViscaOverIPType",
"MappingVmixType",
"MediaSourceType",
"MultiOSCDeviceType",
Expand Down Expand Up @@ -73,6 +74,7 @@ exports[`index imports 1`] = `
"TimelineContentTypeSofieChef",
"TimelineContentTypeTriCaster",
"TimelineContentTypeVMix",
"TimelineContentTypeViscaOverIp",
"TimelineContentTypeVizMSE",
"TimelineContentTypeWebSocketClient",
"Transition",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ export interface ViscaOverIPOptions {
port?: number
}

export type SomeMappingViscaOverIP = Record<string, never>
export interface MappingViscaOverIPCamera {
mappingType: MappingViscaOverIPType.Camera
}

export enum MappingViscaOverIPType {
Camera = 'camera',
}

export type SomeMappingViscaOverIP = MappingViscaOverIPCamera

export enum ViscaOverIPActions {
SetPanTiltSpeed = 'setPanTiltSpeed',
Expand Down
2 changes: 2 additions & 0 deletions packages/timeline-state-resolver-types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { TimelineContentWebSocketClientAny } from './integrations/websocketClien
import { TimelineContentKairosAny } from './integrations/kairos.js'
import { DeviceType } from './generated/index.js'
import { TimelineContentUDPSendAny } from './integrations/udpSend.js'
import { TimelineContentViscaOverIpAny } from './integrations/viscaOverIP.js'

export * from './integrations/abstract.js'
export * from './integrations/atem.js'
Expand Down Expand Up @@ -131,6 +132,7 @@ export interface TimelineContentMap {
[DeviceType.TRICASTER]: TimelineContentTriCasterAny
[DeviceType.WEBSOCKET_CLIENT]: TimelineContentWebSocketClientAny
[DeviceType.UDP_SEND]: TimelineContentUDPSendAny
[DeviceType.VISCA_OVER_IP]: TimelineContentViscaOverIpAny
}

export type TSRTimelineContent = TimelineContentMap[keyof TimelineContentMap]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,45 @@
import { DeviceType } from '../generated/index.js'

export type TimelineContentViscaOverIpAny = TimelineContentViscaOverIp
export enum TimelineContentTypeViscaOverIp {
RECALL_PRESET = 'recallPreset',
PAN_TILT_SPEED = 'panTiltSpeed',
ZOOM_SPEED = 'zoomSpeed',
FOCUS_SPEED = 'focusSpeed',
}

export type TimelineContentViscaOverIpAny =
| TimelineContentViscaOverIpRecallPreset
| TimelineContentViscaOverIpPanTiltSpeed
| TimelineContentViscaOverIpZoomSpeed
| TimelineContentViscaOverIpFocusSpeed

export interface TimelineContentViscaOverIpBase {
deviceType: DeviceType.VISCA_OVER_IP
type: TimelineContentTypeViscaOverIp
}

export interface TimelineContentViscaOverIpRecallPreset extends TimelineContentViscaOverIpBase {
type: TimelineContentTypeViscaOverIp.RECALL_PRESET
/** Preset number to recall (0-based) */
preset: number
}

export type TimelineContentViscaOverIp = TimelineContentViscaOverIpBase
export interface TimelineContentViscaOverIpPanTiltSpeed extends TimelineContentViscaOverIpBase {
type: TimelineContentTypeViscaOverIp.PAN_TILT_SPEED
/** Pan speed: negative = left, positive = right. Range typically -1 to +1 */
panSpeed: number
/** Tilt speed: negative = down, positive = up. Range typically -1 to +1 */
tiltSpeed: number
}

export interface TimelineContentViscaOverIpZoomSpeed extends TimelineContentViscaOverIpBase {
type: TimelineContentTypeViscaOverIp.ZOOM_SPEED
/** Zoom speed: negative = wide, positive = tele. Range typically -1 to +1 */
zoomSpeed: number
}

export interface TimelineContentViscaOverIpFocusSpeed extends TimelineContentViscaOverIpBase {
type: TimelineContentTypeViscaOverIp.FOCUS_SPEED
/** Focus speed: negative = near, positive = far. Range typically -1 to +1 */
focusSpeed: number
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ exports[`index imports 1`] = `
"MappingSisyfosType",
"MappingSofieChefType",
"MappingTricasterType",
"MappingViscaOverIPType",
"MappingVmixType",
"MediaSourceType",
"MultiOSCDeviceType",
Expand Down Expand Up @@ -87,6 +88,7 @@ exports[`index imports 1`] = `
"TimelineContentTypeSofieChef",
"TimelineContentTypeTriCaster",
"TimelineContentTypeVMix",
"TimelineContentTypeViscaOverIp",
"TimelineContentTypeVizMSE",
"TimelineContentTypeWebSocketClient",
"Transition",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"$schema": "../../../../../timeline-state-resolver-api/$schemas/mapping-schema.json",
"default": "",
"mappings": {}
"default": "camera",
"mappings": {
"camera": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
}
}
}
Loading
Loading