Source: externs/shaka/drm_info.js

  1. /*! @license
  2. * Shaka Player
  3. * Copyright 2016 Google LLC
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @externs
  8. */
  9. /**
  10. * @typedef {{
  11. * initData: !Uint8Array,
  12. * initDataType: string,
  13. * keyId: ?string
  14. * }}
  15. *
  16. * @description
  17. * Explicit initialization data, which override any initialization data in the
  18. * content. The initDataType values and the formats that they correspond to
  19. * are specified {@link https://bit.ly/EmeInitTypes here}.
  20. *
  21. * @property {!Uint8Array} initData
  22. * Initialization data in the format indicated by initDataType.
  23. * @property {string} initDataType
  24. * A string to indicate what format initData is in.
  25. * @property {?string} keyId
  26. * The key Id that corresponds to this initData.
  27. *
  28. * @exportDoc
  29. */
  30. shaka.extern.InitDataOverride;
  31. /**
  32. * @typedef {{
  33. * keySystem: string,
  34. * encryptionScheme: string,
  35. * keySystemUris: (Set.<string>|undefined),
  36. * licenseServerUri: string,
  37. * distinctiveIdentifierRequired: boolean,
  38. * persistentStateRequired: boolean,
  39. * audioRobustness: string,
  40. * videoRobustness: string,
  41. * serverCertificate: Uint8Array,
  42. * serverCertificateUri: string,
  43. * sessionType: string,
  44. * initData: Array.<!shaka.extern.InitDataOverride>,
  45. * keyIds: Set.<string>
  46. * }}
  47. *
  48. * @description
  49. * DRM configuration for a single key system.
  50. *
  51. * @property {string} keySystem
  52. * <i>Required.</i> <br>
  53. * The key system, e.g., "com.widevine.alpha".
  54. * @property {string} encryptionScheme
  55. * <i>Required.</i> <br>
  56. * The encryption scheme, e.g., "cenc", "cbcs", "cbcs-1-9".
  57. * @property {(Set.<string>|undefined)} keySystemUris
  58. * <i>Optional.</i> <br>
  59. * The key system uri, e.g., "skd://" for fairplay.
  60. * @property {string} licenseServerUri
  61. * <i>Filled in by DRM config if missing.</i> <br>
  62. * The license server URI.
  63. * @property {boolean} distinctiveIdentifierRequired
  64. * <i>Defaults to false. Can be filled in by advanced DRM config.</i> <br>
  65. * True if the application requires the key system to support distinctive
  66. * identifiers.
  67. * @property {boolean} persistentStateRequired
  68. * <i>Defaults to false. Can be filled in by advanced DRM config.</i> <br>
  69. * True if the application requires the key system to support persistent
  70. * state, e.g., for persistent license storage.
  71. * @property {string} sessionType
  72. * <i>Defaults to 'temporary' if Shaka wasn't initiated for storage.
  73. * Can be filled in by advanced DRM config sessionType parameter.</i> <br>
  74. * @property {string} audioRobustness
  75. * <i>Defaults to '', e.g., no specific robustness required. Can be filled in
  76. * by advanced DRM config.</i> <br>
  77. * A key-system-specific string that specifies a required security level.
  78. * @property {string} videoRobustness
  79. * <i>Defaults to '', e.g., no specific robustness required. Can be filled in
  80. * by advanced DRM config.</i> <br>
  81. * A key-system-specific string that specifies a required security level.
  82. * @property {Uint8Array} serverCertificate
  83. * <i>Defaults to null, e.g., certificate will be requested from the license
  84. * server if required. Can be filled in by advanced DRM config.</i> <br>
  85. * A key-system-specific server certificate used to encrypt license requests.
  86. * Its use is optional and is meant as an optimization to avoid a round-trip
  87. * to request a certificate.
  88. * @property {string} serverCertificateUri
  89. * <i>Defaults to '', e.g., server certificate will be requested from the
  90. * given URI if serverCertificate is not provided. Can be filled in by
  91. * advanced DRM config.</i>
  92. * @property {Array.<!shaka.extern.InitDataOverride>} initData
  93. * <i>Defaults to [], e.g., no override.</i> <br>
  94. * A list of initialization data which override any initialization data found
  95. * in the content. See also shaka.extern.InitDataOverride.
  96. * @property {Set.<string>} keyIds
  97. * <i>Defaults to the empty Set</i> <br>
  98. * If not empty, contains the default key IDs for this key system, as
  99. * lowercase hex strings.
  100. * @exportDoc
  101. */
  102. shaka.extern.DrmInfo;