mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2025-12-30 18:30:47 -06:00
Fix Android Device Profiles to allow for lossless ALAC streaming
Unify Apple and Default Playback Profiles
This commit is contained in:
@@ -38,10 +38,6 @@ export function getDeviceProfile(
|
||||
streamingQuality: StreamingQuality,
|
||||
type: SourceType,
|
||||
): DeviceProfile {
|
||||
const isApple = Platform.OS === 'ios' || Platform.OS === 'macos'
|
||||
|
||||
const platformProfile = isApple ? APPLE_PLATFORM_PROFILE : DEFAULT_PLATFORM_PROFILE
|
||||
|
||||
return {
|
||||
Name: `${capitalize(streamingQuality)} Quality Audio ${capitalize(type)}`,
|
||||
MaxStaticBitrate:
|
||||
@@ -54,16 +50,21 @@ export function getDeviceProfile(
|
||||
: getQualityParams(streamingQuality)?.AudioBitRate,
|
||||
MusicStreamingTranscodingBitrate: getQualityParams(streamingQuality)?.AudioBitRate,
|
||||
ContainerProfiles: [],
|
||||
...platformProfile,
|
||||
...PLAYER_PROFILES,
|
||||
} as DeviceProfile
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains the {@link DeviceProfile.DirectPlayProfiles} and
|
||||
* {@link DeviceProfile.TranscodingProfiles} for Jellify
|
||||
*
|
||||
* @param streamingQuality
|
||||
* @returns
|
||||
* These are applies to all devices, regardless of platform
|
||||
*
|
||||
* @returns A {@link DeviceProfile} instance with
|
||||
* {@link DeviceProfile.DirectPlayProfiles} and
|
||||
* {@link DeviceProfile.TranscodingProfiles} populated
|
||||
*/
|
||||
const APPLE_PLATFORM_PROFILE: DeviceProfile = {
|
||||
const PLAYER_PROFILES: DeviceProfile = {
|
||||
DirectPlayProfiles: [
|
||||
{
|
||||
Container: 'mp3',
|
||||
@@ -167,94 +168,3 @@ const APPLE_PLATFORM_PROFILE: DeviceProfile = {
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
const DEFAULT_PLATFORM_PROFILE: DeviceProfile = {
|
||||
DirectPlayProfiles: [
|
||||
{
|
||||
Container: 'mp3',
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
Container: 'aac',
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: 'aac',
|
||||
Container: 'm4a',
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
// {
|
||||
// AudioCodec: 'aac',
|
||||
// Container: 'm4b',
|
||||
// Type: DlnaProfileType.Audio,
|
||||
// },
|
||||
{
|
||||
Container: 'flac',
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
Container: 'wav',
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
],
|
||||
TranscodingProfiles: [
|
||||
{
|
||||
AudioCodec: 'aac',
|
||||
BreakOnNonKeyFrames: true,
|
||||
Container: 'aac',
|
||||
Context: EncodingContext.Streaming,
|
||||
MaxAudioChannels: '6',
|
||||
MinSegments: 2,
|
||||
Protocol: MediaStreamProtocol.Hls,
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: 'aac',
|
||||
Container: 'aac',
|
||||
Context: EncodingContext.Streaming,
|
||||
MaxAudioChannels: '6',
|
||||
Protocol: MediaStreamProtocol.Http,
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: 'mp3',
|
||||
Container: 'mp3',
|
||||
Context: EncodingContext.Streaming,
|
||||
MaxAudioChannels: '6',
|
||||
Protocol: MediaStreamProtocol.Http,
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: 'wav',
|
||||
Container: 'wav',
|
||||
Context: EncodingContext.Streaming,
|
||||
MaxAudioChannels: '6',
|
||||
Protocol: MediaStreamProtocol.Http,
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: 'mp3',
|
||||
Container: 'mp3',
|
||||
Context: EncodingContext.Static,
|
||||
MaxAudioChannels: '6',
|
||||
Protocol: MediaStreamProtocol.Http,
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: 'aac',
|
||||
Container: 'aac',
|
||||
Context: EncodingContext.Static,
|
||||
MaxAudioChannels: '6',
|
||||
Protocol: MediaStreamProtocol.Http,
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: 'wav',
|
||||
Container: 'wav',
|
||||
Context: EncodingContext.Static,
|
||||
MaxAudioChannels: '6',
|
||||
Protocol: MediaStreamProtocol.Http,
|
||||
Type: DlnaProfileType.Audio,
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user