mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
report live stream in playback stop
This commit is contained in:
parent
b6fc58c494
commit
8b505bb84d
@ -53,13 +53,17 @@
|
||||
|
||||
}).on('playbackstop.mediacontroller', function (e, state) {
|
||||
|
||||
ApiClient.reportPlaybackStopped({
|
||||
|
||||
var stopInfo = {
|
||||
itemId: state.NowPlayingItem.Id,
|
||||
mediaSourceId: state.PlayState.MediaSourceId,
|
||||
positionTicks: state.PlayState.PositionTicks
|
||||
};
|
||||
|
||||
});
|
||||
if (state.PlayState.LiveStreamId) {
|
||||
stopInfo.LiveStreamId = state.PlayState.LiveStreamId;
|
||||
}
|
||||
|
||||
ApiClient.reportPlaybackStopped(stopInfo);
|
||||
|
||||
}).on('positionchange.mediacontroller', function (e, state) {
|
||||
|
||||
|
@ -1390,6 +1390,8 @@
|
||||
state.PlayState.PlayMethod = getParameterByName('static', currentSrc) == 'true' ?
|
||||
'DirectStream' :
|
||||
'Transcode';
|
||||
|
||||
state.PlayState.LiveStreamId = getParameterByName('LiveStreamId', currentSrc);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1567,14 +1569,6 @@
|
||||
|
||||
info = $.extend(info, state.PlayState);
|
||||
|
||||
if (element) {
|
||||
var currentSrc = element.currentSrc;
|
||||
var liveStreamId = getParameterByName('LiveStreamId', currentSrc);
|
||||
if (liveStreamId) {
|
||||
info.LiveStreamId = liveStreamId;
|
||||
}
|
||||
}
|
||||
|
||||
ApiClient.reportPlaybackProgress(info);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user