mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-13 15:46:46 +03:00
feat(HLS): Add support for getting license server url for PlayReady (#7790)
This commit is contained in:
committed by
GitHub
parent
1f3af8b2ff
commit
effa244941
+11
-1
@@ -11,6 +11,7 @@ goog.require('goog.Uri');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('shaka.abr.Ewma');
|
||||
goog.require('shaka.drm.DrmUtils');
|
||||
goog.require('shaka.drm.PlayReady');
|
||||
goog.require('shaka.hls.Attribute');
|
||||
goog.require('shaka.hls.ManifestTextParser');
|
||||
goog.require('shaka.hls.Playlist');
|
||||
@@ -24,6 +25,7 @@ goog.require('shaka.media.PresentationTimeline');
|
||||
goog.require('shaka.media.QualityObserver');
|
||||
goog.require('shaka.media.SegmentIndex');
|
||||
goog.require('shaka.media.SegmentReference');
|
||||
goog.require('shaka.media.SegmentUtils');
|
||||
goog.require('shaka.net.DataUriPlugin');
|
||||
goog.require('shaka.net.NetworkingEngine');
|
||||
goog.require('shaka.net.NetworkingEngine.PendingRequest');
|
||||
@@ -39,7 +41,6 @@ goog.require('shaka.util.MimeUtils');
|
||||
goog.require('shaka.util.Networking');
|
||||
goog.require('shaka.util.OperationManager');
|
||||
goog.require('shaka.util.Pssh');
|
||||
goog.require('shaka.media.SegmentUtils');
|
||||
goog.require('shaka.util.Timer');
|
||||
goog.require('shaka.util.TsParser');
|
||||
goog.require('shaka.util.TXml');
|
||||
@@ -4863,6 +4864,15 @@ shaka.hls.HlsParser = class {
|
||||
{initDataType: 'cenc', initData: pssh},
|
||||
]);
|
||||
|
||||
const input = shaka.util.TXml.parseXmlString([
|
||||
'<PLAYREADY>',
|
||||
shaka.util.Uint8ArrayUtils.toBase64(data),
|
||||
'</PLAYREADY>',
|
||||
].join('\n'));
|
||||
if (input) {
|
||||
drmInfo.licenseServerUri = shaka.drm.PlayReady.getLicenseUrl(input);
|
||||
}
|
||||
|
||||
return drmInfo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user