mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update call to stop transcoding
This commit is contained in:
parent
a0b521f2eb
commit
f555ca2e79
2 changed files with 16 additions and 6 deletions
|
@ -138,6 +138,7 @@
|
|||
|
||||
var transcodingExtension;
|
||||
var isStatic;
|
||||
var currentStreamId = getParameterByName('StreamId', currentSrc);
|
||||
|
||||
if (self.currentItem.MediaType == "Video") {
|
||||
|
||||
|
@ -172,6 +173,7 @@
|
|||
|
||||
if (finalParams.isStatic) {
|
||||
currentSrc = currentSrc.replace('.webm', '.mp4').replace('.m3u8', '.mp4');
|
||||
currentSrc = replaceQueryString(currentSrc, 'StreamId', '');
|
||||
} else {
|
||||
currentSrc = currentSrc.replace('.mp4', transcodingExtension).replace('.m4v', transcodingExtension).replace('.mkv', transcodingExtension).replace('.webm', transcodingExtension);
|
||||
currentSrc = replaceQueryString(currentSrc, 'StreamId', new Date().getTime());
|
||||
|
@ -209,7 +211,7 @@
|
|||
});
|
||||
|
||||
if (self.currentItem.MediaType == "Video") {
|
||||
ApiClient.stopActiveEncodings().done(function () {
|
||||
ApiClient.stopActiveEncodings(currentStreamId).done(function () {
|
||||
|
||||
self.startTimeTicksOffset = ticks;
|
||||
element.src = currentSrc;
|
||||
|
@ -1269,6 +1271,8 @@
|
|||
|
||||
var playerElement = this;
|
||||
|
||||
var currentStreamId = getParameterByName('StreamId', playerElement.currentSrc);
|
||||
|
||||
$(playerElement).off('.mediaplayerevent').off('ended.playbackstopped');
|
||||
|
||||
self.cleanup(playerElement);
|
||||
|
@ -1279,7 +1283,8 @@
|
|||
var mediaSource = self.currentMediaSource;
|
||||
|
||||
if (item.MediaType == "Video") {
|
||||
ApiClient.stopActiveEncodings();
|
||||
|
||||
ApiClient.stopActiveEncodings(currentStreamId);
|
||||
if (self.isFullScreen()) {
|
||||
self.exitFullScreen();
|
||||
}
|
||||
|
|
|
@ -1881,12 +1881,17 @@
|
|||
});
|
||||
};
|
||||
|
||||
self.stopActiveEncodings = function () {
|
||||
|
||||
var url = self.getUrl("Videos/ActiveEncodings", {
|
||||
self.stopActiveEncodings = function (streamId) {
|
||||
|
||||
var options = {
|
||||
deviceId: deviceId
|
||||
});
|
||||
};
|
||||
|
||||
if (streamId) {
|
||||
options.streamId = streamId;
|
||||
}
|
||||
|
||||
var url = self.getUrl("Videos/ActiveEncodings", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "DELETE",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue