Skip to content

Commit 7f08b50

Browse files
committed
Add type annotation & example for README about fps
1 parent 9721bcc commit 7f08b50

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,19 @@ You can control the license and certificate request processes by providing the f
142142
getCertificate: function(emeOptions, callback) {
143143
// request certificate
144144
// if err, callback(err)
145-
// if success, callback(null, certificate)
145+
// if success, callback(null, certificate) as Uint8Array
146+
147+
// example:
148+
videojs.xhr({
149+
uri: "<CERTIFICATE_URL>",
150+
responseType: 'arraybuffer',
151+
}, function (err, response, responseBody) {
152+
if (err) {
153+
callback(err);
154+
return;
155+
}
156+
callback(null, new Uint8Array(responseBody));
157+
});
146158
},
147159
getContentId: function(emeOptions, initData) {
148160
// return content ID

0 commit comments

Comments
 (0)