matrix-spec/event-schemas/schema/v1/m.room.message#m.video
Mark Haines 7f81501762 Allow relative references to schema to work in python and node.
Rename "schema/v1/core" to "schema/v1/core-event-schema".
Add self-referential symlinks to schema/v1/core-event-schema

The python json schema libraries expect that relative references are
relative to the file they are in. The node json schema libraries
expect that relateive references are relative to the first file loaded.

To support both kinds we reference the core event schema using
"core-event-schema/event.json". We then symlink the core-event-schema
directory to both the location of the file refering to "event.json" so
that it will work in python and to the location of the top level file
so that it will work in node.
2015-09-18 11:39:44 +01:00

72 lines
2.7 KiB
Plaintext

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "VideoMessage",
"description": "This message represents a single video clip.",
"allOf": [{
"$ref": "core-event-schema/room_event.json"
}],
"properties": {
"content": {
"type": "object",
"properties": {
"msgtype": {
"type": "string",
"enum": ["m.video"]
},
"body": {
"type": "string",
"description": "A description of the video e.g. 'Gangnam style', or some kind of content description for accessibility e.g. 'video attachment'."
},
"url": {
"type": "string",
"description": "The URL to the video clip."
},
"info": {
"type": "object",
"title": "VideoInfo",
"description": "Metadata about the video clip referred to in ``url``.",
"properties": {
"mimetype": {
"type": "string",
"description": "The mimetype of the video e.g. ``video/mp4``."
},
"size": {
"type": "integer",
"description": "The size of the video in bytes."
},
"duration": {
"type": "integer",
"description": "The duration of the video in milliseconds."
},
"w": {
"type": "integer",
"description": "The width of the video in pixels."
},
"h": {
"type": "integer",
"description": "The height of the video in pixels."
},
"thumbnail_url": {
"type": "string",
"description": "The URL to a thumbnail of the video clip."
},
"thumbnail_info": {
"type": "object",
"title": "ImageInfo",
"allOf": [{
"$ref": "core-event-schema/msgtype_infos/image_info.json"
}]
}
}
}
},
"required": ["msgtype", "body", "url"]
},
"type": {
"type": "string",
"enum": ["m.room.message"]
}
}
}