mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
firefox hls fixes
This commit is contained in:
parent
6fcfabe112
commit
bb670dc037
9 changed files with 45 additions and 25 deletions
|
@ -967,9 +967,12 @@
|
|||
|
||||
self.createStreamInfo('Video', item, mediaSource, startPosition).then(function (streamInfo) {
|
||||
|
||||
var isHls = streamInfo.url.toLowerCase().indexOf('.m3u8') != -1;
|
||||
|
||||
// Huge hack alert. Safari doesn't seem to like if the segments aren't available right away when playback starts
|
||||
// This will start the transcoding process before actually feeding the video url into the player
|
||||
if (browserInfo.safari && !mediaSource.RunTimeTicks) {
|
||||
// Edit: Also seeing stalls from hls.js
|
||||
if ((browserInfo.safari || browserInfo.msie || browserInfo.firefox) && !mediaSource.RunTimeTicks && isHls) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
var hlsPlaylistUrl = streamInfo.url.replace('master.m3u8', 'live.m3u8');
|
||||
|
|
|
@ -77,15 +77,20 @@
|
|||
profile.DirectPlayProfiles = [];
|
||||
|
||||
var videoAudioCodecs = [];
|
||||
// Putting mp3 first is really just a hack to ensure we transcode to 2 channels
|
||||
if (canPlayMp3) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
// Only put mp3 first if mkv support is there
|
||||
// Otherwise with HLS and mp3 audio we're seeing firefox and chrome not play it with HLS
|
||||
if (canPlayMkv) {
|
||||
if (canPlayMp3) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
if (canPlayAac) {
|
||||
videoAudioCodecs.push('aac');
|
||||
}
|
||||
if (canPlayAc3) {
|
||||
videoAudioCodecs.push('ac3');
|
||||
if (!canPlayMkv) {
|
||||
if (canPlayMp3) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
|
||||
if (supportedFormats.indexOf('h264') != -1) {
|
||||
|
@ -1826,7 +1831,8 @@
|
|||
list.push('h264');
|
||||
}
|
||||
|
||||
if (document.createElement('audio').canPlayType('audio/aac').replace(/no/, '')) {
|
||||
// Firefox always reports that it doesn't support aac, so assume that it does
|
||||
if (document.createElement('audio').canPlayType('audio/aac').replace(/no/, '') || browserInfo.firefox) {
|
||||
list.push('aac');
|
||||
}
|
||||
if (document.createElement('audio').canPlayType('audio/mp3').replace(/no/, '')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue