File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1083,7 +1083,17 @@ shaka.drm.DrmEngine = class {
10831083
10841084 // If we have configured preferredKeySystems, choose a preferred keySystem
10851085 // if available.
1086- for ( const preferredKeySystem of this . config_ . preferredKeySystems ) {
1086+ let preferredKeySystems = this . config_ . preferredKeySystems ;
1087+ if ( ! preferredKeySystems . length ) {
1088+ // If there is no preference set and we only have one license server, we
1089+ // use this as preference. This is used to override manifests on those
1090+ // that have the embedded license and the browser supports multiple DRMs.
1091+ const servers = shaka . util . MapUtils . asMap ( this . config_ . servers ) ;
1092+ if ( servers . size == 1 ) {
1093+ preferredKeySystems = servers . keys ( ) ;
1094+ }
1095+ }
1096+ for ( const preferredKeySystem of preferredKeySystems ) {
10871097 for ( const variant of variants ) {
10881098 const decodingInfo = variant . decodingInfos . find ( ( decodingInfo ) => {
10891099 return decodingInfo . supported &&
You can’t perform that action at this time.
0 commit comments