File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -327,11 +327,18 @@ shaka.polyfill.MediaCapabilities = class {
327
327
328
328
let displayType = videoConfig . contentType ;
329
329
if ( videoConfig . width && videoConfig . height ) {
330
- displayType +=
331
- `; width=${ videoConfig . width } ; height=${ videoConfig . height } ` ;
330
+ // All Chromecast can support 720p videos
331
+ if ( videoConfig . width > 1280 || videoConfig . height > 720 ) {
332
+ displayType +=
333
+ `; width=${ videoConfig . width } ; height=${ videoConfig . height } ` ;
334
+ }
332
335
}
333
336
if ( videoConfig . framerate ) {
334
- displayType += `; framerate=${ videoConfig . framerate } ` ;
337
+ // All Chromecast can support a framerate of 24, 25 or 30.
338
+ const framerate = Math . round ( videoConfig . framerate ) ;
339
+ if ( framerate < 24 || framerate > 30 ) {
340
+ displayType += `; framerate=${ videoConfig . framerate } ` ;
341
+ }
335
342
}
336
343
if ( videoConfig . transferFunction === 'pq' ) {
337
344
// A "PQ" transfer function indicates this is an HDR-capable stream;
You can’t perform that action at this time.
0 commit comments