Skip to content

Commit 68e8cf2

Browse files
author
Diogo Simao Marques
committed
VideoPlayerViewController: Reduce the number of updateInterface calls
The updateAudioInterface calls were being made too many times, including during the phase of preparation of the playback leading to applying constraints of the videoOutputView on views that were not properly instanciated yet. It was causing some glitches on the interface.
1 parent 13fa9e5 commit 68e8cf2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Sources/Playback/Player/VideoPlayer-iOS/VideoPlayerViewController.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,9 +1740,6 @@ extension VideoPlayerViewController: VLCPlaybackServiceDelegate {
17401740
mediaNavigationBar.setMediaTitleLabelText("")
17411741
videoPlayerControls.updatePlayPauseButton(toState: playbackService.isPlaying)
17421742

1743-
DispatchQueue.main.async {
1744-
self.updateAudioInterface(with: playbackService.metadata)
1745-
}
17461743
// FIXME: -
17471744
resetIdleTimer()
17481745
}
@@ -1786,6 +1783,7 @@ extension VideoPlayerViewController: VLCPlaybackServiceDelegate {
17861783
moreOptionsActionSheet.currentMediaHasChapters = currentMediaHasChapters
17871784

17881785
if currentState == .opening {
1786+
updateAudioInterface(with: playbackService.metadata)
17891787
applyCustomEqualizerProfileIfNeeded()
17901788
}
17911789

@@ -1823,8 +1821,6 @@ extension VideoPlayerViewController: VLCPlaybackServiceDelegate {
18231821
self.externalVideoOutputView.isHidden = true
18241822
}
18251823

1826-
updateAudioInterface(with: metadata)
1827-
18281824
videoPlayerButtons()
18291825
}
18301826

0 commit comments

Comments
 (0)