DRM protocol documentation

EncryptionConfig

Details required to encrypt a stream.

FieldTypeLabelDescription
encryption_keysEncryptionKeyrepeatedList of encryption keys and associated information.

EncryptionKey

A single encryption key and associated information.

FieldTypeLabelDescription
key_idstringUnique identifier for the key, as identified by your DRM provider, represented as 32 hexadecimal digits in UUID 8-4-4-4-12 format (for example, d569cb35-bd05-48c7-a99d-92feb381df13) or plain 32 hexadecimal digits (for example, d569cb35bd0548c7a99d92feb381df13).
key_uristringURI of the key. This URI is inserted into the M3U8 header.
keystring128-bit encryption key represented as 32 hexadecimal digits (for example, f828863735a2d93fd538f4b8e9b8bd80).
ivstring128-bit encryption IV represented as 32 hexadecimal digits (for example, 217719cae3ffc905b62a248956c9321f).
matchersEncryptionKeyMatcherrepeatedA list of rules indicating which muxStream(s) in your channel should use this key. A muxStream will use the first matching key it finds. If this field is omitted, all muxStreams will treat the key as a match.

EncryptionKeyMatcher

A single rule indicating which muxStream(s) in your channel should use the key.

FieldTypeLabelDescription
mux_streamsstringrepeatedA list of muxStream IDs which should use the key.

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)