Adds "use fmp4" experimental option (#623)
This commit is contained in:
parent
81afe33b7e
commit
06044e8fb5
|
@ -21,6 +21,7 @@ extension BaseItemDto {
|
|||
let tempOverkillBitrate = 360_000_000
|
||||
builder.setMaxBitrate(bitrate: tempOverkillBitrate)
|
||||
let profile = builder.buildProfile()
|
||||
let segmentContainer = Defaults[.Experimental.usefmp4Hls] ? "mp4" : "ts"
|
||||
|
||||
let getPostedPlaybackInfoRequest = GetPostedPlaybackInfoRequest(
|
||||
userId: SessionManager.main.currentLogin.user.id,
|
||||
|
@ -95,7 +96,7 @@ extension BaseItemDto {
|
|||
tag: currentMediaSource.eTag,
|
||||
deviceProfileId: nil,
|
||||
playSessionId: response.playSessionId,
|
||||
segmentContainer: "ts",
|
||||
segmentContainer: segmentContainer,
|
||||
segmentLength: nil,
|
||||
minSegments: 2,
|
||||
deviceId: UIDevice.vendorUUIDString,
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
// lol can someone buy me a coffee this took forever :|
|
||||
|
||||
import Defaults
|
||||
import Foundation
|
||||
import JellyfinAPI
|
||||
|
||||
|
@ -43,6 +44,7 @@ class DeviceProfileBuilder {
|
|||
}
|
||||
|
||||
public func buildProfile() -> ClientCapabilitiesDeviceProfile {
|
||||
let segmentContainer = Defaults[.Experimental.usefmp4Hls] ? "mp4" : "ts"
|
||||
let maxStreamingBitrate = bitrate
|
||||
let maxStaticBitrate = bitrate
|
||||
let musicStreamingTranscodingBitrate = bitrate
|
||||
|
@ -99,7 +101,7 @@ class DeviceProfileBuilder {
|
|||
if supportsFeature(minimumSupported: .A8X) {
|
||||
if supportsFeature(minimumSupported: .A9) {
|
||||
transcodingProfiles = [TranscodingProfile(
|
||||
container: "ts",
|
||||
container: segmentContainer,
|
||||
type: .video,
|
||||
videoCodec: "h264,hevc,mpeg4",
|
||||
audioCodec: "aac,mp3,wav,eac3,ac3,flac,opus",
|
||||
|
@ -111,7 +113,7 @@ class DeviceProfileBuilder {
|
|||
)]
|
||||
} else {
|
||||
transcodingProfiles = [TranscodingProfile(
|
||||
container: "ts",
|
||||
container: segmentContainer,
|
||||
type: .video,
|
||||
videoCodec: "h264,mpeg4",
|
||||
audioCodec: "aac,mp3,wav,eac3,ac3,opus",
|
||||
|
@ -127,7 +129,7 @@ class DeviceProfileBuilder {
|
|||
// Device supports FLAC?
|
||||
if supportsFeature(minimumSupported: .A10X) {
|
||||
transcodingProfiles = [TranscodingProfile(
|
||||
container: "ts",
|
||||
container: segmentContainer,
|
||||
type: .video,
|
||||
videoCodec: "hevc,h264,mpeg4",
|
||||
audioCodec: "aac,mp3,wav,ac3,eac3,flac,opus",
|
||||
|
|
|
@ -116,6 +116,7 @@ extension Defaults.Keys {
|
|||
)
|
||||
static let forceDirectPlay = Key<Bool>("forceDirectPlay", default: false, suite: .generalSuite)
|
||||
static let nativePlayer = Key<Bool>("nativePlayer", default: false, suite: .generalSuite)
|
||||
static let usefmp4Hls = Key<Bool>("usefmp4Hls", default: false, suite: .generalSuite)
|
||||
static let liveTVAlphaEnabled = Key<Bool>("liveTVAlphaEnabled", default: false, suite: .generalSuite)
|
||||
static let liveTVForceDirectPlay = Key<Bool>("liveTVForceDirectPlay", default: false, suite: .generalSuite)
|
||||
static let liveTVNativePlayer = Key<Bool>("liveTVNativePlayer", default: false, suite: .generalSuite)
|
||||
|
|
|
@ -17,6 +17,8 @@ struct ExperimentalSettingsView: View {
|
|||
var syncSubtitleStateWithAdjacent
|
||||
@Default(.Experimental.nativePlayer)
|
||||
var nativePlayer
|
||||
@Default(.Experimental.usefmp4Hls)
|
||||
var usefmp4Hls
|
||||
|
||||
@Default(.Experimental.liveTVAlphaEnabled)
|
||||
var liveTVAlphaEnabled
|
||||
|
@ -35,6 +37,8 @@ struct ExperimentalSettingsView: View {
|
|||
|
||||
Toggle("Native Player", isOn: $nativePlayer)
|
||||
|
||||
Toggle("Use fmp4 with HLS", isOn: $usefmp4Hls)
|
||||
|
||||
} header: {
|
||||
L10n.experimental.text
|
||||
}
|
||||
|
|
|
@ -17,6 +17,9 @@ struct ExperimentalSettingsView: View {
|
|||
var syncSubtitleStateWithAdjacent
|
||||
@Default(.Experimental.nativePlayer)
|
||||
var nativePlayer
|
||||
@Default(.Experimental.usefmp4Hls)
|
||||
var usefmp4Hls
|
||||
|
||||
@Default(.Experimental.liveTVAlphaEnabled)
|
||||
var liveTVAlphaEnabled
|
||||
@Default(.Experimental.liveTVForceDirectPlay)
|
||||
|
@ -34,6 +37,8 @@ struct ExperimentalSettingsView: View {
|
|||
|
||||
Toggle("Native Player", isOn: $nativePlayer)
|
||||
|
||||
Toggle("Use fmp4 with HLS", isOn: $usefmp4Hls)
|
||||
|
||||
} header: {
|
||||
L10n.experimental.text
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue