videojs-contrib-eme icon indicating copy to clipboard operation
videojs-contrib-eme copied to clipboard

FairPlay: Occurred an error when loading a decrypted HLS content

Open Sujin1135 opened this issue 4 years ago • 0 comments

I've tried to load and play a decrypted HLS content, but It' doesn't work. because occurred an error as bellow.

스크린샷 2020-11-12 오후 12 03 04

I guessed It's because of Videojs attempt to request http with sdk:// information in segment file's AES, URI

스크린샷 2020-11-12 오후 3 46 15

It plays normally on the test page of Pallycon.

execution environments:

  • OS: macOS High Sierra 10.13.6
  • Safari: 13.1.2

using libraries

  • videojs: ^7.8.4
  • videojs-contrib-eme: ^3.7.0

DRM Vendor

  • Pallycon

Source

` const playerConfig = { src: "https://mz-cm-transcoding-output.s3.ap-northeast-2.amazonaws.com/mz-cm-v1/assets/1604917161khae8nfj/Beach+-+19987.m3u8", type: 'application/x-mpegurl', keySystems: { 'com.apple.fps.1_0': { getCertificate: function (emeOptions, callback) { videojs.xhr({ url: "https://license.pallycon.com/ri/fpsKeyManager.do?siteId=<SITE_ID>", method: 'GET', }, (err, response, responseBody) => { if (err) { callback(err) return } callback(null, base64DecodeUint8Array(responseBody)); }) }, getContentId: function (emeOptions, initData) { const contentId = arrayToString(initData); return contentId.substring(contentId.indexOf('skd://') + 6); }, // return content ID getLicense: function (emeOptions, contentId, keyMessage, callback) { videojs.xhr({ url: <license_url>, method: 'POST', responseType: 'text', body: 'spc=' + base64EncodeUint8Array(keyMessage), headers: { 'Content-type': 'application/x-www-form-urlencoded', 'pallycon-customdata-v2': } }, (err, response, responseBody) => { if (err) { callback(err) return } callback(null, base64DecodeUint8Array(responseBody)) }) } } } };

            player.src(playerConfig);

`

Sujin1135 avatar Nov 12 '20 07:11 Sujin1135