This commit is contained in:
Aiden Vigue 2021-05-22 18:48:16 -04:00
parent 1389b54b98
commit c7aef09983
2 changed files with 7 additions and 7 deletions

View File

@ -406,10 +406,10 @@ struct ContentView: View {
} else { } else {
Text("Signing in...") Text("Signing in...")
.onAppear(perform: { .onAppear(perform: {
DispatchQueue.main.async { [weak self] in DispatchQueue.main.async { [self] in
_viewDidLoad.wrappedValue = false _viewDidLoad.wrappedValue = false
usleep(500000); usleep(500000);
self?.jsi.did = false; self.jsi.did = false;
} }
}) })
} }

View File

@ -55,7 +55,7 @@ struct PlayerDemo: View {
@State private var captionConfiguration: Bool = false { @State private var captionConfiguration: Bool = false {
didSet { didSet {
if(captionConfiguration == false) { if(captionConfiguration == false) {
DispatchQueue.global(qos: .userInitiated).async { _ in DispatchQueue.global(qos: .userInitiated).async { [self] in
vlcplayer.pause() vlcplayer.pause()
usleep(10000); usleep(10000);
vlcplayer.play() vlcplayer.play()
@ -251,8 +251,8 @@ struct PlayerDemo: View {
_isPlaying.wrappedValue = true; _isPlaying.wrappedValue = true;
} }
DispatchQueue.global(qos: .userInteractive).async { [weak self] in DispatchQueue.global(qos: .userInteractive).async { [self] in
self?.keepUpWithPlayerState() self.keepUpWithPlayerState()
} }
} catch { } catch {
@ -361,8 +361,8 @@ struct PlayerDemo: View {
let videoDuration = Double(vlcplayer.time.intValue + abs(vlcplayer.remainingTime.intValue)) let videoDuration = Double(vlcplayer.time.intValue + abs(vlcplayer.remainingTime.intValue))
if(bool == true) { if(bool == true) {
vlcplayer.pause() vlcplayer.pause()
DispatchQueue.global(qos: .userInitiated).async { [weak self] in DispatchQueue.global(qos: .userInitiated).async { [self] in
self?.processScrubbingState() self.processScrubbingState()
} }
} else { } else {
//Scrub is value from 0..1 - find position in video and add / or remove. //Scrub is value from 0..1 - find position in video and add / or remove.