Fix direct play logic when direct stream is disabled

This commit is contained in:
Bill Thornton 2021-09-08 11:33:20 -04:00
parent e33a589a27
commit ac45163e4c

View File

@ -2481,7 +2481,7 @@ class PlaybackManager {
// Only used for audio // Only used for audio
playMethod = 'Transcode'; playMethod = 'Transcode';
mediaUrl = mediaSource.StreamUrl; mediaUrl = mediaSource.StreamUrl;
} else if (mediaSource.SupportsDirectStream) { } else if (mediaSource.SupportsDirectPlay || mediaSource.SupportsDirectStream) {
directOptions = { directOptions = {
Static: true, Static: true,
mediaSourceId: mediaSource.Id, mediaSourceId: mediaSource.Id,
@ -2500,7 +2500,7 @@ class PlaybackManager {
const prefix = type === 'Video' ? 'Videos' : 'Audio'; const prefix = type === 'Video' ? 'Videos' : 'Audio';
mediaUrl = apiClient.getUrl(prefix + '/' + item.Id + '/stream.' + mediaSourceContainer, directOptions); mediaUrl = apiClient.getUrl(prefix + '/' + item.Id + '/stream.' + mediaSourceContainer, directOptions);
playMethod = 'DirectStream'; playMethod = mediaSource.SupportsDirectPlay ? 'DirectPlay' : 'DirectStream';
} else if (mediaSource.SupportsTranscoding) { } else if (mediaSource.SupportsTranscoding) {
mediaUrl = apiClient.getUrl(mediaSource.TranscodingUrl); mediaUrl = apiClient.getUrl(mediaSource.TranscodingUrl);