mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
report live stream in playback stop
This commit is contained in:
parent
b6fc58c494
commit
8b505bb84d
2 changed files with 9 additions and 11 deletions
|
@ -53,13 +53,17 @@
|
||||||
|
|
||||||
}).on('playbackstop.mediacontroller', function (e, state) {
|
}).on('playbackstop.mediacontroller', function (e, state) {
|
||||||
|
|
||||||
ApiClient.reportPlaybackStopped({
|
var stopInfo = {
|
||||||
|
|
||||||
itemId: state.NowPlayingItem.Id,
|
itemId: state.NowPlayingItem.Id,
|
||||||
mediaSourceId: state.PlayState.MediaSourceId,
|
mediaSourceId: state.PlayState.MediaSourceId,
|
||||||
positionTicks: state.PlayState.PositionTicks
|
positionTicks: state.PlayState.PositionTicks
|
||||||
|
};
|
||||||
|
|
||||||
});
|
if (state.PlayState.LiveStreamId) {
|
||||||
|
stopInfo.LiveStreamId = state.PlayState.LiveStreamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
ApiClient.reportPlaybackStopped(stopInfo);
|
||||||
|
|
||||||
}).on('positionchange.mediacontroller', function (e, state) {
|
}).on('positionchange.mediacontroller', function (e, state) {
|
||||||
|
|
||||||
|
|
|
@ -1390,6 +1390,8 @@
|
||||||
state.PlayState.PlayMethod = getParameterByName('static', currentSrc) == 'true' ?
|
state.PlayState.PlayMethod = getParameterByName('static', currentSrc) == 'true' ?
|
||||||
'DirectStream' :
|
'DirectStream' :
|
||||||
'Transcode';
|
'Transcode';
|
||||||
|
|
||||||
|
state.PlayState.LiveStreamId = getParameterByName('LiveStreamId', currentSrc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1567,14 +1569,6 @@
|
||||||
|
|
||||||
info = $.extend(info, state.PlayState);
|
info = $.extend(info, state.PlayState);
|
||||||
|
|
||||||
if (element) {
|
|
||||||
var currentSrc = element.currentSrc;
|
|
||||||
var liveStreamId = getParameterByName('LiveStreamId', currentSrc);
|
|
||||||
if (liveStreamId) {
|
|
||||||
info.LiveStreamId = liveStreamId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ApiClient.reportPlaybackProgress(info);
|
ApiClient.reportPlaybackProgress(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue