Skip to content

Commit

Permalink
set defaults for fairplay
Browse files Browse the repository at this point in the history
  • Loading branch information
squarebracket committed May 8, 2019
1 parent 3a6218f commit 15b1a7e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/eme.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ export const getSupportedKeySystem = (keySystems) => {
let promise;

Object.keys(keySystems).forEach((keySystem) => {
console.log(keySystem);
// TODO use initDataTypes when appropriate
const systemOptions = {};
const initDataTypes = keySystems[keySystem].initDataTypes;
const initDataTypes = keySystems[keySystem].initDataTypes ||
// fairplay requires an explicit initDataTypes
(keySystem.startsWith('com.apple.fps') ? ['sinf'] : null);
const audioContentType = keySystems[keySystem].audioContentType;
const videoContentType = keySystems[keySystem].videoContentType;
const videoContentType = keySystems[keySystem].videoContentType ||
// fairplay requires an explicit videoCapabilities
(keySystem.startsWith('com.apple.fps') ? 'video/mp4' : null);

if (audioContentType) {
systemOptions.audioCapabilities = [{
Expand Down

0 comments on commit 15b1a7e

Please sign in to comment.