mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix audio-only hls
This commit is contained in:
parent
e396019903
commit
2e982826bb
13 changed files with 99 additions and 57 deletions
|
@ -1535,7 +1535,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
}
|
||||
|
||||
.detailsMenuContentInner {
|
||||
height: 200px;
|
||||
height: 220px;
|
||||
}
|
||||
|
||||
.detailsMenuOverview {
|
||||
|
@ -1573,6 +1573,13 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
line-height: .5;
|
||||
}
|
||||
|
||||
@media all and (max-height:500px) {
|
||||
|
||||
.detailsMenuUserData {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-height:500px) {
|
||||
|
||||
.detailsMenuContentInner {
|
||||
|
|
|
@ -39,7 +39,19 @@
|
|||
vertical-align: middle;
|
||||
text-align: left;
|
||||
font-size: 15px;
|
||||
max-width: 150px;
|
||||
max-width: 130px;
|
||||
}
|
||||
|
||||
@media (min-width: 500px) {
|
||||
.nowPlayingText {
|
||||
max-width: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.nowPlayingText {
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 800px) {
|
||||
|
|
|
@ -128,13 +128,11 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!$.browser.mobile) {
|
||||
return true;
|
||||
if ($.browser.mobile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var screenWidth = $(window).width();
|
||||
|
||||
return screenWidth >= 600;
|
||||
return true;
|
||||
}
|
||||
|
||||
function enabled() {
|
||||
|
|
|
@ -28,8 +28,11 @@
|
|||
|
||||
var PlayerName = 'Chromecast';
|
||||
|
||||
var applicationID = "2D4B1DA3";
|
||||
var messageNamespace = 'urn:x-cast:com.connectsdk';
|
||||
//var applicationID = "2D4B1DA3";
|
||||
//var messageNamespace = 'urn:x-cast:com.connectsdk';
|
||||
|
||||
var applicationID = "F4EB2E8E";
|
||||
var messageNamespace = 'urn:x-cast:com.google.cast.mediabrowser.v3';
|
||||
|
||||
var CastPlayer = function () {
|
||||
|
||||
|
@ -184,6 +187,8 @@
|
|||
this.session = null;
|
||||
this.deviceState = DEVICE_STATE.IDLE;
|
||||
this.castPlayerState = PLAYER_STATE.IDLE;
|
||||
|
||||
console.log('sessionUpdateListener: setting currentMediaSession to null');
|
||||
this.currentMediaSession = null;
|
||||
|
||||
MediaController.removeActivePlayer(PlayerName);
|
||||
|
@ -271,6 +276,8 @@
|
|||
console.log(message);
|
||||
this.deviceState = DEVICE_STATE.IDLE;
|
||||
this.castPlayerState = PLAYER_STATE.IDLE;
|
||||
|
||||
console.log('onStopAppSuccess: setting currentMediaSession to null');
|
||||
this.currentMediaSession = null;
|
||||
};
|
||||
|
||||
|
@ -405,6 +412,7 @@
|
|||
CastPlayer.prototype.setReceiverVolume = function (mute, vol) {
|
||||
|
||||
if (!this.currentMediaSession) {
|
||||
console.log('this.currentMediaSession is null');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -425,7 +433,6 @@
|
|||
* Mute CC
|
||||
*/
|
||||
CastPlayer.prototype.mute = function () {
|
||||
this.audio = false;
|
||||
this.setReceiverVolume(true);
|
||||
};
|
||||
|
||||
|
@ -613,6 +620,7 @@
|
|||
options: {},
|
||||
command: 'Mute'
|
||||
});
|
||||
//castPlayer.mute();
|
||||
};
|
||||
|
||||
self.unMute = function () {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
}
|
||||
|
||||
function enableScrollX() {
|
||||
return AppInfo.isTouchPreferred;
|
||||
return AppInfo.isTouchPreferred && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
function getThumbShape() {
|
||||
|
|
|
@ -663,7 +663,7 @@
|
|||
var userData = LibraryBrowser.getUserDataIconsHtml(item);
|
||||
if (userData) {
|
||||
|
||||
contentHtml += '<p>' + userData + '</p>';
|
||||
contentHtml += '<p class="detailsMenuUserData">' + userData + '</p>';
|
||||
}
|
||||
|
||||
var ratingHtml = LibraryBrowser.getRatingHtml(item);
|
||||
|
@ -756,7 +756,11 @@
|
|||
setItemIntoOverlay(elem, 0);
|
||||
}
|
||||
|
||||
function onCardClick() {
|
||||
function onCardClick(e) {
|
||||
|
||||
if ($(e.target).is('.itemSelectionPanel') || $('.itemSelectionPanel', this).length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var info = LibraryBrowser.getListItemInfo(this);
|
||||
var itemId = info.id;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
return targets;
|
||||
};
|
||||
|
||||
var supportsAac = document.createElement('audio').canPlayType('audio/aac').replace(/no/, '');
|
||||
var canPlayAac = document.createElement('audio').canPlayType('audio/aac').replace(/no/, '');
|
||||
|
||||
self.getVideoQualityOptions = function (videoWidth) {
|
||||
|
||||
|
@ -153,7 +153,7 @@
|
|||
Type: 'Audio'
|
||||
});
|
||||
|
||||
if (supportsAac) {
|
||||
if (canPlayAac) {
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: 'aac',
|
||||
Type: 'Audio'
|
||||
|
@ -173,24 +173,6 @@
|
|||
|
||||
profile.TranscodingProfiles = [];
|
||||
|
||||
if ($.browser.safari) {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: 'aac',
|
||||
Type: 'Audio',
|
||||
AudioCodec: 'aac',
|
||||
Context: 'Streaming',
|
||||
Protocol: 'http'
|
||||
});
|
||||
} else {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: 'mp3',
|
||||
Type: 'Audio',
|
||||
AudioCodec: 'mp3',
|
||||
Context: 'Streaming',
|
||||
Protocol: 'http'
|
||||
});
|
||||
}
|
||||
|
||||
if (self.canPlayHls()) {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: 'ts',
|
||||
|
@ -200,6 +182,16 @@
|
|||
Context: 'Streaming',
|
||||
Protocol: 'hls'
|
||||
});
|
||||
|
||||
if (canPlayAac) {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: 'aac',
|
||||
Type: 'Audio',
|
||||
AudioCodec: 'aac',
|
||||
Context: 'Streaming',
|
||||
Protocol: 'hls'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (canPlayWebm) {
|
||||
|
@ -223,6 +215,24 @@
|
|||
Protocol: 'http'
|
||||
});
|
||||
|
||||
if (canPlayAac && $.browser.safari) {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: 'aac',
|
||||
Type: 'Audio',
|
||||
AudioCodec: 'aac',
|
||||
Context: 'Streaming',
|
||||
Protocol: 'http'
|
||||
});
|
||||
} else {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: 'mp3',
|
||||
Type: 'Audio',
|
||||
AudioCodec: 'mp3',
|
||||
Context: 'Streaming',
|
||||
Protocol: 'http'
|
||||
});
|
||||
}
|
||||
|
||||
profile.ContainerProfiles = [];
|
||||
|
||||
var audioConditions = [];
|
||||
|
@ -1685,21 +1695,6 @@
|
|||
|
||||
var currentTicks = self.getCurrentTicks(this);
|
||||
self.setCurrentTime(currentTicks);
|
||||
|
||||
if ($.browser.safari) {
|
||||
|
||||
if (self.currentDurationTicks) {
|
||||
|
||||
// Seeing transcoded audio looping in safari, going past the runtime but restarting the audio
|
||||
if (currentTicks > self.currentDurationTicks) {
|
||||
if (currentPlaylistIndex < self.playlist.length - 1) {
|
||||
self.nextTrack();
|
||||
} else {
|
||||
self.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function playAudio(item, mediaSource, startPositionTicks) {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
}
|
||||
|
||||
function enableScrollX() {
|
||||
return AppInfo.isTouchPreferred;
|
||||
return AppInfo.isTouchPreferred && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
function getPortraitShape() {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
|
||||
function enableScrollX() {
|
||||
return AppInfo.isTouchPreferred;
|
||||
return AppInfo.isTouchPreferred && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
function getSquareShape() {
|
||||
|
|
|
@ -1554,7 +1554,10 @@ var AppInfo = {};
|
|||
AppInfo.enableMovieTrailersTab = true;
|
||||
}
|
||||
|
||||
if (!isCordova) {
|
||||
if (isCordova) {
|
||||
AppInfo.enableAppLayouts = true;
|
||||
}
|
||||
else {
|
||||
AppInfo.enableFooterNotifications = true;
|
||||
AppInfo.enableSupporterMembership = true;
|
||||
}
|
||||
|
@ -1573,7 +1576,7 @@ var AppInfo = {};
|
|||
.on("websocketmessage.dashboard", Dashboard.onWebSocketMessageReceived)
|
||||
.on('requestfail.dashboard', Dashboard.onRequestFail);
|
||||
}
|
||||
|
||||
//localStorage.clear();
|
||||
function createConnectionManager(appInfo) {
|
||||
|
||||
var credentialProvider = new MediaBrowser.CredentialProvider();
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
}
|
||||
|
||||
function enableScrollX() {
|
||||
return AppInfo.isTouchPreferred;
|
||||
return AppInfo.isTouchPreferred && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
function getThumbShape() {
|
||||
|
|
|
@ -228,6 +228,7 @@
|
|||
var credentials = credentialProvider.credentials();
|
||||
|
||||
server.DateLastAccessed = new Date().getTime();
|
||||
server.Id = result.ServerId;
|
||||
|
||||
if (saveCredentials) {
|
||||
server.UserId = result.User.Id;
|
||||
|
@ -666,12 +667,16 @@
|
|||
|
||||
var servers = foundServers.map(function (foundServer) {
|
||||
|
||||
return {
|
||||
var info = {
|
||||
Id: foundServer.Id,
|
||||
LocalAddress: foundServer.Address,
|
||||
Name: foundServer.Name,
|
||||
ManualAddress: convertEndpointAddressToManualAddress(foundServer)
|
||||
};
|
||||
|
||||
info.LastConnectionMode = info.ManualAddress ? MediaBrowser.ConnectionMode.Manual : MediaBrowser.ConnectionMode.Local;
|
||||
|
||||
return info;
|
||||
});
|
||||
deferred.resolveWith(null, [servers]);
|
||||
});
|
||||
|
|
10
dashboard-ui/thirdparty/apiclient/credentials.js
vendored
10
dashboard-ui/thirdparty/apiclient/credentials.js
vendored
|
@ -48,6 +48,10 @@
|
|||
|
||||
self.addOrUpdateServer = function (list, server) {
|
||||
|
||||
if (!server.Id) {
|
||||
throw new Error('Server.Id cannot be null or empty');
|
||||
}
|
||||
|
||||
var existing = list.filter(function (s) {
|
||||
return s.Id == server.Id;
|
||||
})[0];
|
||||
|
@ -76,9 +80,15 @@
|
|||
if (server.WakeOnLanInfos && server.WakeOnLanInfos.length) {
|
||||
existing.WakeOnLanInfos = server.WakeOnLanInfos;
|
||||
}
|
||||
if (server.LastConnectionMode != null) {
|
||||
existing.LastConnectionMode = server.LastConnectionMode;
|
||||
}
|
||||
|
||||
return existing;
|
||||
}
|
||||
else {
|
||||
list.push(server);
|
||||
return server;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue