diff --git a/Tusker/Screens/Attachment Gallery/GalleryPlayerViewController.swift b/Tusker/Screens/Attachment Gallery/GalleryPlayerViewController.swift index 407276ab..2d3f265d 100644 --- a/Tusker/Screens/Attachment Gallery/GalleryPlayerViewController.swift +++ b/Tusker/Screens/Attachment Gallery/GalleryPlayerViewController.swift @@ -16,6 +16,8 @@ class GalleryPlayerViewController: UIViewController { var attachment: Attachment! + private var isFirstAppearance = true + override func viewDidLoad() { super.viewDidLoad() @@ -44,6 +46,13 @@ class GalleryPlayerViewController: UIViewController { DispatchQueue.global(qos: .userInitiated).async { AudioSessionHelper.enable() AudioSessionHelper.setVideoPlayback() + + DispatchQueue.main.async { + if self.isFirstAppearance { + self.isFirstAppearance = false + self.playerVC.player?.play() + } + } } }