Skip to content

Commit 7660edc

Browse files
barttjoeyparrish
authored andcommitted
Dolby Vision fixes for Chromecast (#1844)
- Fix the link to Dolby's Dolby Vision Profiles and levels PDF - Was pointing to a document version that no longer exists - Update Dolby Vision regex to match all DV codecs - Dolby Vision is available in 4 different (base) codecs: dvhe, dvh1, dvav, dva1 - dvh* represents HEVC-based Dolby Vision - dva* represents AVC-based Dolby Vision. - Do not remove Dolby Vision codecs on Chromecast No need to remove Dolby Vision codecs on Chromecast. Chromecast's canDisplayType will reject them when the cast receiver or the attached display can't play Dolby Vision. On Dolby Vision capable cast receivers attached to a TV in Dolby Vision mode, canDisplayType does not reject Dolby Vision streams. One such device is the Chromecast Ultra. With this change, Shaka Player plays Dolby Vision on qualifying setups.
1 parent c2422ce commit 7660edc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/polyfill/mediasource.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ shaka.polyfill.MediaSource.rejectCodec_ = function(codec) {
313313
shaka.polyfill.MediaSource.patchCastIsTypeSupported_ = function() {
314314
const originalIsTypeSupported = MediaSource.isTypeSupported;
315315

316-
// Docs from Dolby detailing profile names: https://bit.ly/2MfV72y
317-
let dolbyVisionRegex = /^dv(?:he|av)\./;
316+
// Docs from Dolby detailing profile names: https://bit.ly/2T2wKbu
317+
let dolbyVisionRegex = /^dv(?:h[e1]|a[v1])\./;
318318

319319
MediaSource.isTypeSupported = function(mimeType) {
320320
// Parse the basic MIME type from its parameters.
@@ -340,12 +340,8 @@ shaka.polyfill.MediaSource.patchCastIsTypeSupported_ = function() {
340340
let isDolbyVision = false;
341341

342342
let codecList = codecs.split(',').filter(function(codec) {
343-
// Remove Dolby Vision codec strings. These are not understood on
344-
// Chromecast, even though the content can still be played.
345343
if (dolbyVisionRegex.test(codec)) {
346344
isDolbyVision = true;
347-
// Return false to remove this string from the list.
348-
return false;
349345
}
350346

351347
// We take this string as a signal for HDR, but don't remove it.

0 commit comments

Comments
 (0)