mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5871 from gnattu/better-safari-profile
Better codec profile for Safari with 10.10 features
This commit is contained in:
commit
c9105dcad4
3 changed files with 37 additions and 7 deletions
|
@ -28,6 +28,16 @@ function canPlayNativeHls() {
|
|||
|| media.canPlayType('application/vnd.apple.mpegURL').replace(/no/, ''));
|
||||
}
|
||||
|
||||
export function enableHlsJsPlayerForCodecs(mediaSource, mediaType) {
|
||||
// Workaround for VP9 HLS support on desktop Safari
|
||||
// Force using HLS.js because desktop Safari's native HLS player does not play VP9 over HLS
|
||||
// browser.osx will return true on iPad, cannot use
|
||||
if (!browser.iOS && browser.safari && mediaSource.MediaStreams.some(x => x.Codec === 'vp9')) {
|
||||
return true;
|
||||
}
|
||||
return enableHlsJsPlayer(mediaSource.RunTimeTicks, mediaType);
|
||||
}
|
||||
|
||||
export function enableHlsJsPlayer(runTimeTicks, mediaType) {
|
||||
if (window.MediaSource == null) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue