1
0
Fork 0
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:
Luke Pulverenti 2015-02-07 16:03:09 -05:00
parent fc8386bd9c
commit 002139addb
3 changed files with 44 additions and 25 deletions

View file

@ -383,14 +383,19 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
}
.noBackdrop {
height: 220px;
padding: 3em 0 0;
height: auto;
margin: 2.5em 0 0;
}
.noBackdrop .itemBackdropContent {
background-color: transparent;
}
.noBackdrop .itemBackdropContent {
position: static;
}
.lnkSibling {
position: fixed;
top: 105px;
@ -433,6 +438,16 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
top: -26px;
}
.noBackdrop .squareDetailImageContainer {
top: 0;
}
.noBackdrop .detailImageContainer {
position: static;
display: inline-block;
vertical-align: top;
}
.itemDetailImage {
-moz-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;
}
.detailContentEffectedByImage a {
}
.lastDetailContentEffectedByImage.detailContentEffectedByThumbImage {
padding: 0 .5em;
}
@ -488,6 +500,17 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
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 {
font-size: 14px;
display: block;
@ -610,7 +633,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
.detailSection {
vertical-align: top;
margin-bottom: 2.5em;
margin-bottom: 2em;
}
.detailCollapsibleSection:not(.hide) + .detailCollapsibleSection {
@ -770,18 +793,10 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
display: none;
}
.noBackdrop {
height: auto;
}
.noBackdrop .detailImageContainer {
display: block;
position: static;
text-align: center;
}
.noBackdrop .itemBackdropContent {
.noBackdrop .detailImageContainer {
display: block;
position: static;
text-align: center;
}
}

View file

@ -143,6 +143,10 @@
self.changeStream(self.getCurrentTicks(), { AudioStreamIndex: index });
};
self.supportsSubtitleStreamExternally = function (stream) {
return stream.Type == 'Subtitle' && stream.IsTextSubtitleStream && stream.SupportsExternalStream;
}
self.setSubtitleStreamIndex = function (index) {
if (!self.supportsTextTracks()) {
@ -162,7 +166,7 @@
if (currentStream && !newStream) {
if (!currentStream.IsTextSubtitleStream) {
if (!self.supportsSubtitleStreamExternally(currentStream)) {
// Need to change the transcoded stream to remove subs
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
@ -170,7 +174,7 @@
}
else if (!currentStream && newStream) {
if (newStream.IsTextSubtitleStream) {
if (self.supportsSubtitleStreamExternally(newStream)) {
selectedTrackElementIndex = index;
} else {
@ -180,10 +184,10 @@
}
else if (currentStream && newStream) {
if (newStream.IsTextSubtitleStream) {
if (self.supportsSubtitleStreamExternally(newStream)) {
selectedTrackElementIndex = index;
if (!currentStream.IsTextSubtitleStream) {
if (!self.supportsSubtitleStreamExternally(currentStream)) {
self.changeStream(self.getCurrentTicks(), { SubtitleStreamIndex: -1 });
}
} else {
@ -203,7 +207,7 @@
var modes = ['disabled', 'showing', 'hidden'];
var textStreams = self.currentMediaSource.MediaStreams.filter(function (s) {
return s.Type == 'Subtitle' && s.IsTextSubtitleStream;
return self.supportsSubtitleStreamExternally(s);
});
var newStream = textStreams.filter(function (s) {
@ -1025,7 +1029,7 @@
mediaSourceId: mediaSource.Id
};
if (selectedSubtitleStream && (!selectedSubtitleStream.IsTextSubtitleStream || !self.supportsTextTracks())) {
if (selectedSubtitleStream && (!self.supportsSubtitleStreamExternally(selectedSubtitleStream) || !self.supportsTextTracks())) {
baseParams.SubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
}
@ -1136,7 +1140,7 @@
if (self.supportsTextTracks()) {
var textStreams = subtitleStreams.filter(function (s) {
return s.IsTextSubtitleStream;
return self.supportsSubtitleStreamExternally(s);
});
for (var i = 0, length = textStreams.length; i < length; i++) {

View file

@ -302,7 +302,7 @@
return false;
}
if (subtitleStream && (!subtitleStream.IsTextSubtitleStream || !self.supportsTextTracks())) {
if (subtitleStream && (!subtitleStream.SupportsExternalStream || !subtitleStream.IsTextSubtitleStream || !self.supportsTextTracks())) {
console.log('Transcoding because subtitles are required');
return false;
}