diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js index 0143a1b6c9..197652f38b 100644 --- a/dashboard-ui/scripts/mediacontroller.js +++ b/dashboard-ui/scripts/mediacontroller.js @@ -69,9 +69,6 @@ ApiClient.reportPlaybackStopped(stopInfo); - }).on('positionchange.mediacontroller', function (e, state) { - - }); } diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index 8e0eb29565..f7482eb259 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -931,6 +931,31 @@ var streamInfo = self.createStreamInfo('Video', item, mediaSource, startPosition); + // 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 ($.browser.safari && !mediaSource.RunTimeTicks) { + + Dashboard.showLoadingMsg(); + + ApiClient.ajax({ + type: 'GET', + url: streamInfo.url.replace('master.m3u8', 'live.m3u8') + }).always(function () { + + Dashboard.hideLoadingMsg(); + + }).done(function () { + self.playVideoInternal(item, mediaSource, startPosition, streamInfo); + }); + + } else { + self.playVideoInternal(item, mediaSource, startPosition, streamInfo); + } + + }; + + self.playVideoInternal = function (item, mediaSource, startPosition, streamInfo) { + var videoUrl = streamInfo.url; var contentType = streamInfo.contentType; var startPositionInSeekParam = streamInfo.startPositionInSeekParam; @@ -975,8 +1000,9 @@ // Can't autoplay in these browsers so we need to use the full controls if (requiresNativeControls) { - html += '