{
	"$id": "https://www.atsc-schemas.org/atsc3.0/a344/20240213/org.atsc.notify-rmpMediaTimeChange.json",
	"$schema": "https://json-schema.org/draft/2019-09/schema#",
	"title": "RMP Media Time Change Notification API",
	"description": "RMP Media Time Change Notification API",
	"type": "object",
 	 "properties": {
		"jsonrpc": {
			"type": "string", 
			"enum": [ "2.0" ]
		},
		"method": { "type": "string",
			"enum": ["org.atsc.notify"]
	 	},
		"params": {
			"type": "object",
			"properties": {
				"msgType": {
					"type": "string",
					"enum": [
						"rmpMediaTimeChange"
					]
				},
				"currentTime": {
					"type": "number",
					"minimum": 0
				},
				"startDate": {
					"type": "string",
					"format": "xs:dateTime"
				},
				"playbackState": {
					"type": "number"
				},
				"refClock": {
					"type": "string",
					"format": "xs:dateTime"
				},
				"adaptationId_video": {
					"type": "string"
				},
				"adaptationId_audio": {
					"type": "string"
				},
				"adaptationId_text": {
					"type": "string"
				},
				"periodId": {
					"type": "string"
				},
				"periodStart": {
					"type": "string",
					"format": "xs:dateTime"
				},
				"duration": {
					"type": "number",
					"minimum": 0
				},
				"source": {
					"type": "array",
					"items": {
						"type": "object",
						"properties": {
							"id": {
								"type": "string"
							},
							"uriType": {
								"type": "string",
								"enum": [
									"GSID",
									"XLinkURN",
									"RMPURL"
								]
							},
							"sourceType": {
								"type": "string",
								"enum": [
									"broadcast",
									"broadband",
									"setrmpurl",
									"xlink",
									"other"
								]
							},
							"sourceTypeValue": {
								"type": "string"
							},
							"if": {
								"properties": {
									"sourceType": {"const": "other"}
								}
							},
							"then": {
								"required": ["sourceTypeValue"]
							}
						},
						"required": [
							"id",
							"uriType",
							"sourcType"
						]
					}
				}
			},
			"required": [
				"msgType",
				"currentTime"
			],
			"dependentRequired": {
				"playbackState": [
					"refClock", "adaptationId_video", "adaptationId_audio", "adaptationId_text",
					"periodId", "periodStart", "duration", "source"
				]
			}
		}
	 },
	"required": [ "jsonrpc", "method", "params" ] 
}
