diff --git a/demo/asset_card.js b/demo/asset_card.js index 2d5f7d8392..0a1dd642d7 100644 --- a/demo/asset_card.js +++ b/demo/asset_card.js @@ -187,6 +187,9 @@ shakaDemo.AssetCard = class { case KeySystem.PLAYREADY: this.addFeatureIcon_('playready', drm); break; + case KeySystem.FAIRPLAY: + this.addFeatureIcon_('fairplay', drm); + break; } } } diff --git a/demo/common/assets.js b/demo/common/assets.js index 5ba1509657..2c43904809 100644 --- a/demo/common/assets.js +++ b/demo/common/assets.js @@ -42,6 +42,7 @@ shakaAssets.Source = { THEO_PLAYER: 'THEOplayer', JWPLAYER: 'JW Player', BBC: 'BBC', + DOLBY: 'Dolby', }; @@ -132,6 +133,8 @@ shakaAssets.Feature = { // Set if the asset has at least one containerless stream (AAC, etc). CONTAINERLESS: 'Containerless', + // Set if the asset requires Dolby Vision Profile 5 support. + DOLBY_VISION_P5: 'Dolby Vision P5', // Set if the asset requires Dolby Vision with MV-HEVC (for 3D) support. DOLBY_VISION_3D: 'Dolby Vision 3D', @@ -1871,5 +1874,29 @@ shakaAssets.testAssets = [ .addFeature(shakaAssets.Feature.AUDIO_ONLY) .addFeature(shakaAssets.Feature.OFFLINE), // }}} + + // Dolby assets {{{ + /* Dolby Contents */ + new ShakaDemoAssetInfo( + /* name= */ 'Dolby Vision P5 DASH (FairPlay, PlayReady, Widevine)', + /* iconUri= */ '', + /* manifestUri= */ 'https://content.media24.link/drm/manifest.mpd', + /* source= */ shakaAssets.Source.DOLBY) + .addKeySystem(shakaAssets.KeySystem.FAIRPLAY) + .addKeySystem(shakaAssets.KeySystem.PLAYREADY) + .addKeySystem(shakaAssets.KeySystem.WIDEVINE) + .addFeature(shakaAssets.Feature.DASH) + .addFeature(shakaAssets.Feature.ULTRA_HIGH_DEFINITION) + .addFeature(shakaAssets.Feature.DOLBY_VISION_P5) + .setExtraConfig({ + drm: { + advanced: { + 'com.apple.fps': { + serverCertificateUri: 'https://ott.dolby.com/OnDelKits/fairplay.cer', + }, + }, + }, + }), + // }}} ]; /* eslint-enable max-len */ diff --git a/demo/demo.less b/demo/demo.less index d65b8683b1..601054c524 100644 --- a/demo/demo.less +++ b/demo/demo.less @@ -265,6 +265,10 @@ html, body { &[icon="playready"] { background-image: data-uri("icons/custom_playready.svg"); } + + &[icon="fairplay"] { + background-image: data-uri("icons/custom_fairplay.svg"); + } } @media screen and (max-width: 400px) { diff --git a/demo/icons/custom_fairplay.svg b/demo/icons/custom_fairplay.svg new file mode 100644 index 0000000000..786f1ba20b --- /dev/null +++ b/demo/icons/custom_fairplay.svg @@ -0,0 +1,44 @@ + + + + + + + diff --git a/demo/main.js b/demo/main.js index dd42cec472..9c5e5391fa 100644 --- a/demo/main.js +++ b/demo/main.js @@ -742,6 +742,9 @@ shakaDemo.Main = class { if (asset.features.includes(shakaAssets.Feature.CONTAINERLESS)) { mimeTypes.push('audio/aac'); } + if (asset.features.includes(shakaAssets.Feature.DOLBY_VISION_P5)) { + mimeTypes.push('video/mp4; codecs="dvh1.05.01"'); + } if (asset.features.includes(shakaAssets.Feature.DOLBY_VISION_3D)) { mimeTypes.push('video/mp4; codecs="dvh1.20.01"'); } diff --git a/lib/media/media_source_engine.js b/lib/media/media_source_engine.js index cf3d909abc..fc032b71a8 100644 --- a/lib/media/media_source_engine.js +++ b/lib/media/media_source_engine.js @@ -323,6 +323,7 @@ shaka.media.MediaSourceEngine = class { 'video/mp4; codecs="vp9"', 'video/mp4; codecs="vp09.00.10.08"', 'video/mp4; codecs="av01.0.01M.08"', + 'video/mp4; codecs="dvh1.05.01"', 'video/mp4; codecs="dvh1.20.01"', 'audio/mp4; codecs="mp4a.40.2"', 'audio/mp4; codecs="ac-3"', diff --git a/test/player_external.js b/test/player_external.js index 1dbe63d9a6..05933b601f 100644 --- a/test/player_external.js +++ b/test/player_external.js @@ -120,6 +120,9 @@ describe('Player', () => { if (asset.features.includes(Feature.CONTAINERLESS)) { mimeTypes.push('audio/aac'); } + if (asset.features.includes(Feature.DOLBY_VISION_P5)) { + mimeTypes.push('video/mp4; codecs="dvh1.05.01"'); + } if (asset.features.includes(Feature.DOLBY_VISION_3D)) { mimeTypes.push('video/mp4; codecs="dvh1.20.01"'); }