Merge pull request #616 from painhapp/videoLayoutConstraints

Fix Video Player Constraints issue
This commit is contained in:
CMK 2022-11-17 23:42:55 +08:00 committed by GitHub
commit 095881c5d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -100,7 +100,9 @@ GEM
PLATFORMS PLATFORMS
arm64-darwin-21 arm64-darwin-21
arm64-darwin-22
x86_64-darwin-21 x86_64-darwin-21
x86_64-darwin-22
DEPENDENCIES DEPENDENCIES
arkana arkana

View File

@ -45,7 +45,6 @@ extension MediaPreviewVideoViewController {
playerViewController.view.widthAnchor.constraint(equalTo: view.widthAnchor), playerViewController.view.widthAnchor.constraint(equalTo: view.widthAnchor),
playerViewController.view.heightAnchor.constraint(equalTo: view.heightAnchor), playerViewController.view.heightAnchor.constraint(equalTo: view.heightAnchor),
]) ])
playerViewController.didMove(toParent: self)
if let contentOverlayView = playerViewController.contentOverlayView { if let contentOverlayView = playerViewController.contentOverlayView {
previewImageView.translatesAutoresizingMaskIntoConstraints = false previewImageView.translatesAutoresizingMaskIntoConstraints = false
@ -90,6 +89,12 @@ extension MediaPreviewVideoViewController {
} }
} }
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
playerViewController.didMove(toParent: self)
}
} }
// MARK: - ShareActivityProvider // MARK: - ShareActivityProvider

View File

@ -43,7 +43,7 @@ extension APIService.APIError: LocalizedError {
public var errorDescription: String? { public var errorDescription: String? {
switch errorReason { switch errorReason {
case .authenticationMissing: return "Fail to Authenticatie" case .authenticationMissing: return "Fail to Authenticate"
case .badRequest: return "Bad Request" case .badRequest: return "Bad Request"
case .badResponse: return "Bad Response" case .badResponse: return "Bad Response"
case .requestThrottle: return "Request Throttled" case .requestThrottle: return "Request Throttled"