VideoMediaEntity.schema.json 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema",
  3. "$id": "https://joystream.org/VideoMediaEntity.schema.json",
  4. "title": "VideoMediaEntity",
  5. "description": "JSON schema for entities based on VideoMedia runtime schema",
  6. "type": "object",
  7. "additionalProperties": false,
  8. "required": [
  9. "encoding",
  10. "pixelWidth",
  11. "pixelHeight",
  12. "location"
  13. ],
  14. "properties": {
  15. "encoding": {
  16. "oneOf": [
  17. {
  18. "type": "object",
  19. "additionalProperties": false,
  20. "required": [
  21. "new"
  22. ],
  23. "properties": {
  24. "new": {
  25. "$ref": "./VideoMediaEncodingEntity.schema.json"
  26. }
  27. }
  28. },
  29. {
  30. "type": "object",
  31. "additionalProperties": false,
  32. "required": [
  33. "existing"
  34. ],
  35. "properties": {
  36. "existing": {
  37. "$ref": "../entityReferences/VideoMediaEncodingRef.schema.json"
  38. }
  39. }
  40. }
  41. ],
  42. "description": "Encoding of the video media object"
  43. },
  44. "pixelWidth": {
  45. "type": "integer",
  46. "minimum": 0,
  47. "maximum": 65535,
  48. "description": "Video media width in pixels"
  49. },
  50. "pixelHeight": {
  51. "type": "integer",
  52. "minimum": 0,
  53. "maximum": 65535,
  54. "description": "Video media height in pixels"
  55. },
  56. "size": {
  57. "type": "integer",
  58. "minimum": 0,
  59. "description": "Video media size in bytes"
  60. },
  61. "location": {
  62. "oneOf": [
  63. {
  64. "type": "object",
  65. "additionalProperties": false,
  66. "required": [
  67. "new"
  68. ],
  69. "properties": {
  70. "new": {
  71. "$ref": "./MediaLocationEntity.schema.json"
  72. }
  73. }
  74. },
  75. {
  76. "type": "object",
  77. "additionalProperties": false,
  78. "required": [
  79. "existing"
  80. ],
  81. "properties": {
  82. "existing": {
  83. "$ref": "../entityReferences/MediaLocationRef.schema.json"
  84. }
  85. }
  86. }
  87. ],
  88. "description": "Location of the video media object"
  89. }
  90. }
  91. }