diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 24239d55e7..54f30bb69b 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -397,12 +397,12 @@ var currentSrc = element.currentSrc; - var currentStreamId = getParameterByName('StreamId', currentSrc); + var playSessionId = getParameterByName('PlaySessionId', currentSrc); if (params.AudioStreamIndex == null && params.SubtitleStreamIndex == null && params.Bitrate == null) { currentSrc = replaceQueryString(currentSrc, 'starttimeticks', ticks || 0); - changeStreamToUrl(element, currentStreamId, currentSrc, ticks); + changeStreamToUrl(element, playSessionId, currentSrc, ticks); return; } @@ -426,12 +426,12 @@ self.currentSubtitleStreamIndex = subtitleStreamIndex; currentSrc = ApiClient.getUrl(self.currentMediaSource.TranscodingUrl); - changeStreamToUrl(element, currentStreamId, currentSrc, ticks); + changeStreamToUrl(element, playSessionId, currentSrc, ticks); } }); }; - function changeStreamToUrl(element, currentStreamId, url, newPositionTicks) { + function changeStreamToUrl(element, playSessionId, url, newPositionTicks) { clearProgressInterval(); @@ -447,7 +447,7 @@ }); if (self.currentItem.MediaType == "Video") { - ApiClient.stopActiveEncodings(currentStreamId).done(function () { + ApiClient.stopActiveEncodings(playSessionId).done(function () { self.startTimeTicksOffset = newPositionTicks; element.src = url; @@ -1513,7 +1513,7 @@ var playerElement = this; - var currentStreamId = getParameterByName('StreamId', playerElement.currentSrc); + var playSessionId = getParameterByName('PlaySessionId', playerElement.currentSrc); $(playerElement).off('.mediaplayerevent').off('ended.playbackstopped'); @@ -1526,7 +1526,7 @@ if (item.MediaType == "Video") { - ApiClient.stopActiveEncodings(currentStreamId); + ApiClient.stopActiveEncodings(playSessionId); if (self.isFullScreen()) { self.exitFullScreen(); } diff --git a/dashboard-ui/thirdparty/apiclient/apiclient.js b/dashboard-ui/thirdparty/apiclient/apiclient.js index b2c72ed0a4..61df8e7f1a 100644 --- a/dashboard-ui/thirdparty/apiclient/apiclient.js +++ b/dashboard-ui/thirdparty/apiclient/apiclient.js @@ -1887,14 +1887,14 @@ }); }; - self.stopActiveEncodings = function (streamId) { + self.stopActiveEncodings = function (playSessionId) { var options = { deviceId: deviceId }; - if (streamId) { - options.streamId = streamId; + if (playSessionId) { + options.PlaySessionId = playSessionId; } var url = self.getUrl("Videos/ActiveEncodings", options);