mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added SupportsExternalStream to MediaStream
This commit is contained in:
parent
fc8386bd9c
commit
002139addb
3 changed files with 44 additions and 25 deletions
|
@ -383,14 +383,19 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
}
|
}
|
||||||
|
|
||||||
.noBackdrop {
|
.noBackdrop {
|
||||||
height: 220px;
|
height: auto;
|
||||||
padding: 3em 0 0;
|
margin: 2.5em 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noBackdrop .itemBackdropContent {
|
.noBackdrop .itemBackdropContent {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noBackdrop .itemBackdropContent {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.lnkSibling {
|
.lnkSibling {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 105px;
|
top: 105px;
|
||||||
|
@ -433,6 +438,16 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
top: -26px;
|
top: -26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noBackdrop .squareDetailImageContainer {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noBackdrop .detailImageContainer {
|
||||||
|
position: static;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
.itemDetailImage {
|
.itemDetailImage {
|
||||||
-moz-box-shadow: 0px 0 20px #000;
|
-moz-box-shadow: 0px 0 20px #000;
|
||||||
-webkit-box-shadow: 0px 0 20px #000;
|
-webkit-box-shadow: 0px 0 20px #000;
|
||||||
|
@ -473,9 +488,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
margin-left: 220px;
|
margin-left: 220px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailContentEffectedByImage a {
|
|
||||||
}
|
|
||||||
|
|
||||||
.lastDetailContentEffectedByImage.detailContentEffectedByThumbImage {
|
.lastDetailContentEffectedByImage.detailContentEffectedByThumbImage {
|
||||||
padding: 0 .5em;
|
padding: 0 .5em;
|
||||||
}
|
}
|
||||||
|
@ -488,6 +500,17 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
min-height: 115px;
|
min-height: 115px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.noBackdrop .detailContentEffectedByImage {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noBackdrop + .ui-content .lastDetailContentEffectedByImage {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-left: 0;
|
||||||
|
min-height: initial;
|
||||||
|
}
|
||||||
|
|
||||||
.parentName {
|
.parentName {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -610,7 +633,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
|
|
||||||
.detailSection {
|
.detailSection {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-bottom: 2.5em;
|
margin-bottom: 2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.detailCollapsibleSection:not(.hide) + .detailCollapsibleSection {
|
.detailCollapsibleSection:not(.hide) + .detailCollapsibleSection {
|
||||||
|
@ -770,18 +793,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noBackdrop {
|
.noBackdrop .detailImageContainer {
|
||||||
height: auto;
|
display: block;
|
||||||
}
|
|
||||||
|
|
||||||
.noBackdrop .detailImageContainer {
|
|
||||||
display: block;
|
|
||||||
position: static;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.noBackdrop .itemBackdropContent {
|
|
||||||
position: static;
|
position: static;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,10 @@
|
||||||
self.changeStream(self.getCurrentTicks(), { AudioStreamIndex: index });
|
self.changeStream(self.getCurrentTicks(), { AudioStreamIndex: index });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.supportsSubtitleStreamExternally = function (stream) {
|
||||||
|
return stream.Type == 'Subtitle' && stream.IsTextSubtitleStream && stream.SupportsExternalStream;
|
||||||
|
}
|
||||||
|
|
||||||
self.setSubtitleStreamIndex = function (index) {
|
self.setSubtitleStreamIndex = function (index) {
|
||||||
|
|
||||||
if (!self.supportsTextTracks()) {
|
if (!self.supportsTextTracks()) {
|
||||||
|
@ -162,7 +166,7 @@
|
||||||
|
|
||||||
if (currentStream && !newStream) {
|
if (currentStream && !newStream) {
|
||||||
|
|
||||||
if (!currentStream.IsTextSubtitleStream) {
|
if (!self.supportsSubtitleStreamExternally(currentStream)) {
|
||||||
|
|
||||||
// Need to change the transcoded stream to remove subs
|
// Need to change the transcoded stream to remove subs
|
||||||
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
|
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
|
||||||
|
@ -170,7 +174,7 @@
|
||||||
}
|
}
|
||||||
else if (!currentStream && newStream) {
|
else if (!currentStream && newStream) {
|
||||||
|
|
||||||
if (newStream.IsTextSubtitleStream) {
|
if (self.supportsSubtitleStreamExternally(newStream)) {
|
||||||
selectedTrackElementIndex = index;
|
selectedTrackElementIndex = index;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -180,10 +184,10 @@
|
||||||
}
|
}
|
||||||
else if (currentStream && newStream) {
|
else if (currentStream && newStream) {
|
||||||
|
|
||||||
if (newStream.IsTextSubtitleStream) {
|
if (self.supportsSubtitleStreamExternally(newStream)) {
|
||||||
selectedTrackElementIndex = index;
|
selectedTrackElementIndex = index;
|
||||||
|
|
||||||
if (!currentStream.IsTextSubtitleStream) {
|
if (!self.supportsSubtitleStreamExternally(currentStream)) {
|
||||||
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
|
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -203,7 +207,7 @@
|
||||||
var modes = ['disabled', 'showing', 'hidden'];
|
var modes = ['disabled', 'showing', 'hidden'];
|
||||||
|
|
||||||
var textStreams = self.currentMediaSource.MediaStreams.filter(function (s) {
|
var textStreams = self.currentMediaSource.MediaStreams.filter(function (s) {
|
||||||
return s.Type == 'Subtitle' && s.IsTextSubtitleStream;
|
return self.supportsSubtitleStreamExternally(s);
|
||||||
});
|
});
|
||||||
|
|
||||||
var newStream = textStreams.filter(function (s) {
|
var newStream = textStreams.filter(function (s) {
|
||||||
|
@ -1025,7 +1029,7 @@
|
||||||
mediaSourceId: mediaSource.Id
|
mediaSourceId: mediaSource.Id
|
||||||
};
|
};
|
||||||
|
|
||||||
if (selectedSubtitleStream && (!selectedSubtitleStream.IsTextSubtitleStream || !self.supportsTextTracks())) {
|
if (selectedSubtitleStream && (!self.supportsSubtitleStreamExternally(selectedSubtitleStream) || !self.supportsTextTracks())) {
|
||||||
baseParams.SubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
|
baseParams.SubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1136,7 +1140,7 @@
|
||||||
|
|
||||||
if (self.supportsTextTracks()) {
|
if (self.supportsTextTracks()) {
|
||||||
var textStreams = subtitleStreams.filter(function (s) {
|
var textStreams = subtitleStreams.filter(function (s) {
|
||||||
return s.IsTextSubtitleStream;
|
return self.supportsSubtitleStreamExternally(s);
|
||||||
});
|
});
|
||||||
|
|
||||||
for (var i = 0, length = textStreams.length; i < length; i++) {
|
for (var i = 0, length = textStreams.length; i < length; i++) {
|
||||||
|
|
|
@ -302,7 +302,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subtitleStream && (!subtitleStream.IsTextSubtitleStream || !self.supportsTextTracks())) {
|
if (subtitleStream && (!subtitleStream.SupportsExternalStream || !subtitleStream.IsTextSubtitleStream || !self.supportsTextTracks())) {
|
||||||
console.log('Transcoding because subtitles are required');
|
console.log('Transcoding because subtitles are required');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue