fix playback if no audio track
This commit is contained in:
parent
88956f33b4
commit
4801b01b16
|
@ -462,7 +462,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 14;
|
CURRENT_PROJECT_VERSION = 15;
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
|
@ -491,7 +491,7 @@
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 14;
|
CURRENT_PROJECT_VERSION = 15;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer/Preview Content\"";
|
DEVELOPMENT_ASSET_PATHS = "\"JellyfinPlayer/Preview Content\"";
|
||||||
DEVELOPMENT_TEAM = 9R8RREG67J;
|
DEVELOPMENT_TEAM = 9R8RREG67J;
|
||||||
|
|
|
@ -107,6 +107,7 @@ struct ContinueWatchingView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ScrollView(.horizontal, showsIndicators: false) {
|
ScrollView(.horizontal, showsIndicators: false) {
|
||||||
|
if(_resumeItems.wrappedValue.count > 0) {
|
||||||
LazyHStack() {
|
LazyHStack() {
|
||||||
Spacer().frame(width:16)
|
Spacer().frame(width:16)
|
||||||
ForEach(resumeItems, id: \.Id) { item in
|
ForEach(resumeItems, id: \.Id) { item in
|
||||||
|
@ -175,6 +176,9 @@ struct ContinueWatchingView: View {
|
||||||
}
|
}
|
||||||
Spacer().frame(width:14)
|
Spacer().frame(width:14)
|
||||||
}.frame(height: 215)
|
}.frame(height: 215)
|
||||||
|
} else {
|
||||||
|
EmptyView()
|
||||||
|
}
|
||||||
}.onAppear(perform: onAppear)
|
}.onAppear(perform: onAppear)
|
||||||
.frame(height: 215)
|
.frame(height: 215)
|
||||||
.padding(.bottom, 10)
|
.padding(.bottom, 10)
|
||||||
|
|
|
@ -18,7 +18,13 @@ struct EpisodeItemView: View {
|
||||||
var item: ResumeItem;
|
var item: ResumeItem;
|
||||||
@EnvironmentObject var orientationInfo: OrientationInfo
|
@EnvironmentObject var orientationInfo: OrientationInfo
|
||||||
var fullItem: DetailItem;
|
var fullItem: DetailItem;
|
||||||
@State private var playing: Bool = false;
|
@State private var playing: Bool = false {
|
||||||
|
didSet {
|
||||||
|
if(_playing.wrappedValue == false) {
|
||||||
|
unlockOrientations()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@State private var vc: PreferenceUIHostingController? = nil;
|
@State private var vc: PreferenceUIHostingController? = nil;
|
||||||
@State private var progressString: String = "";
|
@State private var progressString: String = "";
|
||||||
@State private var viewDidLoad: Bool = false;
|
@State private var viewDidLoad: Bool = false;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>$(MARKETING_VERSION)</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>14</string>
|
<string>15</string>
|
||||||
<key>DTXApplicationID</key>
|
<key>DTXApplicationID</key>
|
||||||
<string>8c1f6941-ec78-480c-b589-b41aca29a52e</string>
|
<string>8c1f6941-ec78-480c-b589-b41aca29a52e</string>
|
||||||
<key>DTXBeaconURL</key>
|
<key>DTXBeaconURL</key>
|
||||||
|
|
|
@ -66,7 +66,13 @@ struct MovieItemView: View {
|
||||||
@State private var isLoading: Bool = true;
|
@State private var isLoading: Bool = true;
|
||||||
var item: ResumeItem;
|
var item: ResumeItem;
|
||||||
var fullItem: DetailItem;
|
var fullItem: DetailItem;
|
||||||
@State private var playing: Bool = false;
|
@State private var playing: Bool = false {
|
||||||
|
didSet {
|
||||||
|
if(_playing.wrappedValue == false) {
|
||||||
|
unlockOrientations()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@State private var vc: PreferenceUIHostingController? = nil;
|
@State private var vc: PreferenceUIHostingController? = nil;
|
||||||
@State private var progressString: String = "";
|
@State private var progressString: String = "";
|
||||||
@State private var viewDidLoad: Bool = false;
|
@State private var viewDidLoad: Bool = false;
|
||||||
|
@ -255,7 +261,7 @@ struct MovieItemView: View {
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
if(playing) {
|
if(playing) {
|
||||||
VideoPlayerView(item: fullItem, playing: $playing).onAppear(perform: lockOrientations)
|
VideoPlayerView(item: fullItem, playing: $playing).onAppear(perform: lockOrientations).onDisappear(perform: unlockOrientations)
|
||||||
} else {
|
} else {
|
||||||
LoadingView(isShowing: $isLoading) {
|
LoadingView(isShowing: $isLoading) {
|
||||||
VStack(alignment:.leading) {
|
VStack(alignment:.leading) {
|
||||||
|
|
|
@ -274,8 +274,10 @@ struct VideoPlayerView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_selectedAudioTrack.wrappedValue == -1) {
|
if(_selectedAudioTrack.wrappedValue == -1) {
|
||||||
|
if(_audioTracks.wrappedValue.count > 0) {
|
||||||
_selectedAudioTrack.wrappedValue = _audioTracks.wrappedValue[0].id;
|
_selectedAudioTrack.wrappedValue = _audioTracks.wrappedValue[0].id;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let streamUrl = streamURL.absoluteString;
|
let streamUrl = streamURL.absoluteString;
|
||||||
let segmentUrl = URL(string: streamUrl.replacingOccurrences(of: "master.m3u8", with: "hls1/main/0.ts"))!
|
let segmentUrl = URL(string: streamUrl.replacingOccurrences(of: "master.m3u8", with: "hls1/main/0.ts"))!
|
||||||
|
@ -319,6 +321,7 @@ struct VideoPlayerView: View {
|
||||||
_selectedAudioTrack.wrappedValue = _audioTracks.wrappedValue[0].id;
|
_selectedAudioTrack.wrappedValue = _audioTracks.wrappedValue[0].id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendPlayReport()
|
||||||
pbitem = item;
|
pbitem = item;
|
||||||
pbitem.subtitles = subtitles;
|
pbitem.subtitles = subtitles;
|
||||||
_isPlaying.wrappedValue = true;
|
_isPlaying.wrappedValue = true;
|
||||||
|
|
Loading…
Reference in New Issue