mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
resolve mono build failure
This commit is contained in:
parent
41c7f70286
commit
9f00ca2c0c
2 changed files with 6 additions and 5 deletions
|
@ -983,7 +983,7 @@
|
|||
});
|
||||
};
|
||||
|
||||
self.supportsDirectPlay = function (mediaSource) {
|
||||
self.supportsDirectPlay = function (mediaSource, itemType) {
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
if (mediaSource.SupportsDirectPlay) {
|
||||
|
@ -996,6 +996,7 @@
|
|||
}
|
||||
else {
|
||||
var val = mediaSource.Path.toLowerCase().replace('https:', 'http').indexOf(ApiClient.serverAddress().toLowerCase().replace('https:', 'http').substring(0, 14)) == 0;
|
||||
//resolve(val || itemType !== 'TvChannel');
|
||||
resolve(val);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -491,10 +491,10 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime', 'browser'], fun
|
|||
return Promise.resolve();
|
||||
};
|
||||
|
||||
function getOptimalMediaSource(mediaType, versions) {
|
||||
function getOptimalMediaSource(mediaType, itemType, versions) {
|
||||
|
||||
var promises = versions.map(function (v) {
|
||||
return MediaController.supportsDirectPlay(v);
|
||||
return MediaController.supportsDirectPlay(v, itemType);
|
||||
});
|
||||
|
||||
return Promise.all(promises).then(function (responses) {
|
||||
|
@ -730,14 +730,14 @@ define(['appSettings', 'userSettings', 'appStorage', 'datetime', 'browser'], fun
|
|||
|
||||
if (validatePlaybackInfoResult(playbackInfoResult)) {
|
||||
|
||||
getOptimalMediaSource(item.MediaType, playbackInfoResult.MediaSources).then(function (mediaSource) {
|
||||
getOptimalMediaSource(item.MediaType, item.Type, playbackInfoResult.MediaSources).then(function (mediaSource) {
|
||||
if (mediaSource) {
|
||||
|
||||
if (mediaSource.RequiresOpening) {
|
||||
|
||||
MediaController.getLiveStream(item.Id, playbackInfoResult.PlaySessionId, deviceProfile, startPosition, mediaSource, null, null).then(function (openLiveStreamResult) {
|
||||
|
||||
MediaController.supportsDirectPlay(openLiveStreamResult.MediaSource).then(function (result) {
|
||||
MediaController.supportsDirectPlay(openLiveStreamResult.MediaSource, item.Type).then(function (result) {
|
||||
|
||||
openLiveStreamResult.MediaSource.enableDirectPlay = result;
|
||||
callback(openLiveStreamResult.MediaSource);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue