diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js index 01bdc75061..86e0cef183 100644 --- a/lib/hls/hls_parser.js +++ b/lib/hls/hls_parser.js @@ -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([ + '', + shaka.util.Uint8ArrayUtils.toBase64(data), + '', + ].join('\n')); + if (input) { + drmInfo.licenseServerUri = shaka.drm.PlayReady.getLicenseUrl(input); + } + return drmInfo; }