fix flac support and try to fix control bug

This commit is contained in:
Aiden Vigue 2021-05-25 20:12:19 -04:00
parent 5cf959336d
commit 7ee7f0d27f
No known key found for this signature in database
GPG Key ID: E7570472648F4544
2 changed files with 8 additions and 2 deletions

View File

@ -100,6 +100,7 @@ class DeviceProfileBuilder {
}
public func buildProfile() -> DeviceProfileRoot {
print(CPUinfo())
let MaxStreamingBitrate = bitrate;
let MaxStaticBitrate = bitrate;
let MusicStreamingTranscodingBitrate = 384000;
@ -129,14 +130,14 @@ class DeviceProfileBuilder {
//Build transcoding profiles
var TranscodingProfiles: [_AVTranscodingProfile] = [];
TranscodingProfiles = [_AVTranscodingProfile(Container: "ts", Type: "Video", AudioCodec: "aac,mp3,wav", VideoCodec: "h264", Context: "Streaming", Protocol: "hls", MaxAudioChannels: "6", MinSegments: "2", BreakOnNonKeyFrames: true)]
TranscodingProfiles = [_AVTranscodingProfile(Container: "ts", Type: "Video", AudioCodec: "aac,mp3,wav", VideoCodec: "h264", Context: "Streaming", Protocol: "hls", MaxAudioChannels: "2", MinSegments: "2", BreakOnNonKeyFrames: true)]
//Device supports Dolby Digital (AC3, EAC3)
if(supportsFeature(minimumSupported: .A8X)) {
if(supportsFeature(minimumSupported: .A10)) {
TranscodingProfiles = [_AVTranscodingProfile(Container: "ts", Type: "Video", AudioCodec: "aac,mp3,wav,eac3,ac3,flac,opus", VideoCodec: "h264,hevc,hev1", Context: "Streaming", Protocol: "hls", MaxAudioChannels: "6", MinSegments: "2", BreakOnNonKeyFrames: true)]
} else {
TranscodingProfiles = [_AVTranscodingProfile(Container: "ts", Type: "Video", AudioCodec: "ac3,eac3,wav,eac3,ac3,flac,opus", VideoCodec: "h264", Context: "Streaming", Protocol: "hls", MaxAudioChannels: "6", MinSegments: "2", BreakOnNonKeyFrames: true)]
TranscodingProfiles = [_AVTranscodingProfile(Container: "ts", Type: "Video", AudioCodec: "aac,mp3,wav,eac3,ac3,opus", VideoCodec: "h264", Context: "Streaming", Protocol: "hls", MaxAudioChannels: "2", MinSegments: "2", BreakOnNonKeyFrames: true)]
}
}

View File

@ -94,6 +94,7 @@ struct VideoPlayerView: View {
}
sendProgressReport(eventName: "unpause")
while(vlcplayer.state != VLCMediaPlayerState.stopped) {
_streamLoading.wrappedValue = false;
while(vlcplayer.isPlaying) {
@ -375,6 +376,7 @@ struct VideoPlayerView: View {
}
func resetTimer() {
print("resetTimer ran")
if(_inactivity.wrappedValue == false) {
_inactivity.wrappedValue = true;
return;
@ -390,6 +392,9 @@ struct VideoPlayerView: View {
vlcplayer.stop()
}).padding(EdgeInsets(top: 0, leading: UIDevice.current.hasNotch ? 30 : 0, bottom: 0, trailing: UIDevice.current.hasNotch ? 30 : 0))
}
.introspectTabBarController { (UITabBarController) in
UITabBarController.tabBar.isHidden = true
}
.overlay(
VStack() {
HStack() {