mirror of
https://github.com/streamyfin/streamyfin.git
synced 2025-08-20 18:37:18 +02:00
fix: always use native device profile
This commit is contained in:
@@ -16,7 +16,7 @@ export const getStreamUrl = async ({
|
||||
startTimeTicks = 0,
|
||||
maxStreamingBitrate,
|
||||
sessionData,
|
||||
deviceProfile = iosFmp4,
|
||||
deviceProfile = native,
|
||||
audioStreamIndex = 0,
|
||||
subtitleStreamIndex = undefined,
|
||||
forceDirectPlay = false,
|
||||
@@ -89,7 +89,7 @@ export const getStreamUrl = async ({
|
||||
{
|
||||
method: "POST",
|
||||
data: {
|
||||
deviceProfile: forceDirectPlay ? native : deviceProfile,
|
||||
deviceProfile: native,
|
||||
userId,
|
||||
maxStreamingBitrate,
|
||||
startTimeTicks,
|
||||
|
||||
@@ -31,15 +31,6 @@ export const postCapabilities = async ({
|
||||
throw new Error("Missing parameters for marking item as not played");
|
||||
}
|
||||
|
||||
let profile: any = iosFmp4;
|
||||
|
||||
if (deviceProfile === "Native") {
|
||||
profile = native;
|
||||
}
|
||||
if (deviceProfile === "Old") {
|
||||
profile = old;
|
||||
}
|
||||
|
||||
try {
|
||||
const d = api.axiosInstance.post(
|
||||
api.basePath + "/Sessions/Capabilities/Full",
|
||||
@@ -57,7 +48,7 @@ export const postCapabilities = async ({
|
||||
],
|
||||
supportsMediaControl: true,
|
||||
id: sessionId,
|
||||
DeviceProfile: profile,
|
||||
DeviceProfile: native,
|
||||
},
|
||||
{
|
||||
headers: getAuthHeaders(api),
|
||||
|
||||
@@ -15,280 +15,129 @@ export default {
|
||||
MusicStreamingTranscodingBitrate: 384000,
|
||||
CodecProfiles: [
|
||||
{
|
||||
Codec: "h264",
|
||||
Conditions: [
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsAnamorphic",
|
||||
Value: "true",
|
||||
},
|
||||
{
|
||||
Condition: "EqualsAny",
|
||||
IsRequired: false,
|
||||
Property: "VideoProfile",
|
||||
Value: "high|main|baseline|constrained baseline",
|
||||
},
|
||||
{
|
||||
Condition: "LessThanEqual",
|
||||
IsRequired: false,
|
||||
Property: "VideoLevel",
|
||||
Value: "80",
|
||||
},
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsInterlaced",
|
||||
Value: "true",
|
||||
},
|
||||
],
|
||||
Type: MediaTypes.Video,
|
||||
Codec: "h264,h265,hevc,mpeg4,divx,xvid,wmv,vc1,vp8,vp9,av1",
|
||||
},
|
||||
{
|
||||
Codec: "hevc",
|
||||
Conditions: [
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsAnamorphic",
|
||||
Value: "true",
|
||||
},
|
||||
{
|
||||
Condition: "EqualsAny",
|
||||
IsRequired: false,
|
||||
Property: "VideoProfile",
|
||||
Value: "high|main|main 10",
|
||||
},
|
||||
{
|
||||
Condition: "LessThanEqual",
|
||||
IsRequired: false,
|
||||
Property: "VideoLevel",
|
||||
Value: "175",
|
||||
},
|
||||
{
|
||||
Condition: "NotEquals",
|
||||
IsRequired: false,
|
||||
Property: "IsInterlaced",
|
||||
Value: "true",
|
||||
},
|
||||
],
|
||||
Type: MediaTypes.Video,
|
||||
Type: MediaTypes.Audio,
|
||||
Codec: "aac,ac3,eac3,mp3,flac,alac,opus,vorbis,pcm,wma",
|
||||
},
|
||||
],
|
||||
DirectPlayProfiles: [
|
||||
{
|
||||
AudioCodec: "flac,alac,aac,eac3,ac3,opus",
|
||||
Container: "mp4",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "hevc,h264,mpeg4",
|
||||
Container: "mp4,mkv,avi,mov,flv,ts,m2ts,webm,ogv,3gp",
|
||||
VideoCodec: "h264,h265,hevc,mpeg4,divx,xvid,wmv,vc1,vp8,vp9,av1",
|
||||
AudioCodec: "aac,ac3,eac3,mp3,flac,alac,opus,vorbis,wma",
|
||||
},
|
||||
{
|
||||
AudioCodec: "flac,alac,aac,eac3,ac3,opus",
|
||||
Container: "mkv",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "hevc,h264,mpeg4",
|
||||
},
|
||||
{
|
||||
AudioCodec: "alac,aac,ac3",
|
||||
Container: "m4v",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "h264,mpeg4",
|
||||
},
|
||||
{
|
||||
AudioCodec:
|
||||
"alac,aac,eac3,ac3,mp3,pcm_s24be,pcm_s24le,pcm_s16be,pcm_s16le",
|
||||
Container: "mov",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "hevc,h264,mpeg4,mjpeg",
|
||||
},
|
||||
{
|
||||
AttrudioCodec: "aac,eac3,ac3,mp3",
|
||||
Container: "mpegts",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "h264",
|
||||
},
|
||||
{
|
||||
AttrudioCodec: "aac,amr_nb",
|
||||
Container: "3gp,3g2",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "h264,mpeg4",
|
||||
},
|
||||
{
|
||||
AttrudioCodec: "pcm_s16le,pcm_mulaw",
|
||||
Container: "avi",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "mjpeg",
|
||||
},
|
||||
{
|
||||
Container: "mp3",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "aac",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "m4a",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "m4b",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "flac",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "alac",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "alac",
|
||||
Container: "m4a",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "alac",
|
||||
Container: "m4b",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
Container: "wav",
|
||||
Type: MediaTypes.Audio,
|
||||
Container: "mp3,aac,flac,alac,wav,ogg,wma",
|
||||
AudioCodec: "mp3,aac,flac,alac,opus,vorbis,wma,pcm",
|
||||
},
|
||||
],
|
||||
TranscodingProfiles: [
|
||||
{
|
||||
AudioCodec: "flac,alac,aac,eac3,ac3,opus",
|
||||
BreakOnNonKeyFrames: true,
|
||||
Container: "mp4",
|
||||
Context: "streaming",
|
||||
MaxAudioChannels: "8",
|
||||
MinSegments: 2,
|
||||
Type: MediaTypes.Video,
|
||||
Context: "Streaming",
|
||||
Protocol: "hls",
|
||||
Type: "video",
|
||||
VideoCodec: "hevc,h264,mpeg4",
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
BreakOnNonKeyFrames: true,
|
||||
Container: "aac",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
MinSegments: "2",
|
||||
Protocol: "hls",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "aac",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "mp3",
|
||||
Container: "mp3",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "wav",
|
||||
Container: "wav",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "mp3",
|
||||
Container: "mp3",
|
||||
Context: "Static",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac",
|
||||
Container: "aac",
|
||||
Context: "Static",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "wav",
|
||||
Container: "wav",
|
||||
Context: "Static",
|
||||
MaxAudioChannels: "6",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Audio,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac,mp3",
|
||||
BreakOnNonKeyFrames: true,
|
||||
Container: "ts",
|
||||
Context: "Streaming",
|
||||
MaxAudioChannels: "6",
|
||||
MinSegments: "2",
|
||||
Protocol: "hls",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "h264",
|
||||
AudioCodec: "aac,mp3,ac3",
|
||||
MaxAudioChannels: "8",
|
||||
MinSegments: "2",
|
||||
BreakOnNonKeyFrames: true,
|
||||
},
|
||||
{
|
||||
AudioCodec: "aac,mp3,ac3,eac3,flac,alac",
|
||||
Container: "mp4",
|
||||
Context: "Static",
|
||||
Type: MediaTypes.Audio,
|
||||
Context: "Streaming",
|
||||
Protocol: "http",
|
||||
Type: MediaTypes.Video,
|
||||
VideoCodec: "h264",
|
||||
Container: "mp3",
|
||||
AudioCodec: "mp3",
|
||||
MaxAudioChannels: "2",
|
||||
},
|
||||
],
|
||||
ResponseProfiles: [
|
||||
{
|
||||
Container: "m4v",
|
||||
Container: "mkv",
|
||||
MimeType: "video/x-matroska",
|
||||
Type: MediaTypes.Video,
|
||||
},
|
||||
{
|
||||
Container: "mp4",
|
||||
MimeType: "video/mp4",
|
||||
Type: MediaTypes.Video,
|
||||
},
|
||||
],
|
||||
SubtitleProfiles: [
|
||||
{
|
||||
Format: "srt",
|
||||
Method: "external",
|
||||
},
|
||||
{
|
||||
Format: "pgssub",
|
||||
Method: "embed",
|
||||
},
|
||||
{
|
||||
Format: "dvdsub",
|
||||
Method: "embed",
|
||||
},
|
||||
{
|
||||
Format: "dvbsub",
|
||||
Method: "embed",
|
||||
},
|
||||
{
|
||||
Format: "xsub",
|
||||
Method: "embed",
|
||||
},
|
||||
{
|
||||
Format: "vtt",
|
||||
Method: "embed",
|
||||
},
|
||||
{
|
||||
Format: "ttml",
|
||||
Method: "embed",
|
||||
},
|
||||
{
|
||||
Format: "cc_dec",
|
||||
Method: "embed",
|
||||
},
|
||||
{ Format: "srt", Method: "Embed" },
|
||||
{ Format: "srt", Method: "External" },
|
||||
{ Format: "srt", Method: "Encode" },
|
||||
{ Format: "ass", Method: "Embed" },
|
||||
{ Format: "ass", Method: "External" },
|
||||
{ Format: "ass", Method: "Encode" },
|
||||
{ Format: "ssa", Method: "Embed" },
|
||||
{ Format: "ssa", Method: "External" },
|
||||
{ Format: "ssa", Method: "Encode" },
|
||||
{ Format: "sub", Method: "Embed" },
|
||||
{ Format: "sub", Method: "External" },
|
||||
{ Format: "sub", Method: "Encode" },
|
||||
{ Format: "vtt", Method: "Embed" },
|
||||
{ Format: "vtt", Method: "External" },
|
||||
{ Format: "vtt", Method: "Encode" },
|
||||
{ Format: "ttml", Method: "Embed" },
|
||||
{ Format: "ttml", Method: "External" },
|
||||
{ Format: "ttml", Method: "Encode" },
|
||||
{ Format: "pgs", Method: "Embed" },
|
||||
{ Format: "pgs", Method: "External" },
|
||||
{ Format: "pgs", Method: "Encode" },
|
||||
{ Format: "dvdsub", Method: "Embed" },
|
||||
{ Format: "dvdsub", Method: "External" },
|
||||
{ Format: "dvdsub", Method: "Encode" },
|
||||
{ Format: "dvbsub", Method: "Embed" },
|
||||
{ Format: "dvbsub", Method: "External" },
|
||||
{ Format: "dvbsub", Method: "Encode" },
|
||||
{ Format: "xsub", Method: "Embed" },
|
||||
{ Format: "xsub", Method: "External" },
|
||||
{ Format: "xsub", Method: "Encode" },
|
||||
{ Format: "mov_text", Method: "Embed" },
|
||||
{ Format: "mov_text", Method: "External" },
|
||||
{ Format: "mov_text", Method: "Encode" },
|
||||
{ Format: "scc", Method: "Embed" },
|
||||
{ Format: "scc", Method: "External" },
|
||||
{ Format: "scc", Method: "Encode" },
|
||||
{ Format: "smi", Method: "Embed" },
|
||||
{ Format: "smi", Method: "External" },
|
||||
{ Format: "smi", Method: "Encode" },
|
||||
{ Format: "teletext", Method: "Embed" },
|
||||
{ Format: "teletext", Method: "External" },
|
||||
{ Format: "teletext", Method: "Encode" },
|
||||
{ Format: "microdvd", Method: "Embed" },
|
||||
{ Format: "microdvd", Method: "External" },
|
||||
{ Format: "microdvd", Method: "Encode" },
|
||||
{ Format: "mpl2", Method: "Embed" },
|
||||
{ Format: "mpl2", Method: "External" },
|
||||
{ Format: "mpl2", Method: "Encode" },
|
||||
{ Format: "pjs", Method: "Embed" },
|
||||
{ Format: "pjs", Method: "External" },
|
||||
{ Format: "pjs", Method: "Encode" },
|
||||
{ Format: "realtext", Method: "Embed" },
|
||||
{ Format: "realtext", Method: "External" },
|
||||
{ Format: "realtext", Method: "Encode" },
|
||||
{ Format: "stl", Method: "Embed" },
|
||||
{ Format: "stl", Method: "External" },
|
||||
{ Format: "stl", Method: "Encode" },
|
||||
{ Format: "subrip", Method: "Embed" },
|
||||
{ Format: "subrip", Method: "External" },
|
||||
{ Format: "subrip", Method: "Encode" },
|
||||
{ Format: "subviewer", Method: "Embed" },
|
||||
{ Format: "subviewer", Method: "External" },
|
||||
{ Format: "subviewer", Method: "Encode" },
|
||||
{ Format: "text", Method: "Embed" },
|
||||
{ Format: "text", Method: "External" },
|
||||
{ Format: "text", Method: "Encode" },
|
||||
{ Format: "vplayer", Method: "Embed" },
|
||||
{ Format: "vplayer", Method: "External" },
|
||||
{ Format: "vplayer", Method: "Encode" },
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user