mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live stream termination
This commit is contained in:
parent
24ea83ad5f
commit
95fe14c3ba
1 changed files with 8 additions and 6 deletions
|
@ -696,7 +696,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
function getLiveStream(itemId, deviceProfile, startPosition, mediaSource, audioStreamIndex, subtitleStreamIndex) {
|
||||
function getLiveStream(itemId, playSessionId, deviceProfile, startPosition, mediaSource, audioStreamIndex, subtitleStreamIndex) {
|
||||
|
||||
var postData = {
|
||||
DeviceProfile: deviceProfile,
|
||||
|
@ -706,7 +706,8 @@
|
|||
var query = {
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
StartTimeTicks: startPosition || 0,
|
||||
ItemId: itemId
|
||||
ItemId: itemId,
|
||||
PlaySessionId: playSessionId
|
||||
};
|
||||
|
||||
if (audioStreamIndex != null) {
|
||||
|
@ -830,19 +831,20 @@
|
|||
|
||||
var deviceProfile = self.getDeviceProfile();
|
||||
|
||||
getPlaybackInfo(item.Id, deviceProfile, startPosition).done(function (result) {
|
||||
getPlaybackInfo(item.Id, deviceProfile, startPosition).done(function (playbackInfoResult) {
|
||||
|
||||
if (validatePlaybackInfoResult(result)) {
|
||||
if (validatePlaybackInfoResult(playbackInfoResult)) {
|
||||
|
||||
var mediaSource = getOptimalMediaSource(item.MediaType, result.MediaSources);
|
||||
var mediaSource = getOptimalMediaSource(item.MediaType, playbackInfoResult.MediaSources);
|
||||
|
||||
if (mediaSource) {
|
||||
|
||||
if (mediaSource.RequiresOpening) {
|
||||
|
||||
getLiveStream(item.Id, deviceProfile, startPosition, mediaSource, null, null).done(function (openLiveStreamResult) {
|
||||
getLiveStream(item.Id, playbackInfoResult.PlaySessionId, deviceProfile, startPosition, mediaSource, null, null).done(function (openLiveStreamResult) {
|
||||
|
||||
openLiveStreamResult.MediaSource.enableDirectPlay = supportsDirectPlay(openLiveStreamResult.MediaSource);
|
||||
|
||||
playInternalPostMediaSourceSelection(item, openLiveStreamResult.MediaSource, startPosition, callback);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue