Ignore hardware mute switch during video playback in attachment approval view.
// FREEBIE
This commit is contained in:
parent
d9ef27d802
commit
bf9ae552a3
|
@ -26,6 +26,7 @@
|
|||
#import "UIFont+OWS.h"
|
||||
#import "UIUtil.h"
|
||||
#import "UIView+OWS.h"
|
||||
#import "ViewControllerUtils.h"
|
||||
#import <JSQSystemSoundPlayer.h>
|
||||
#import <PureLayout/PureLayout.h>
|
||||
#import <SignalServiceKit/Contact.h>
|
||||
|
|
|
@ -43,14 +43,26 @@ class AttachmentApprovalViewController: UIViewController {
|
|||
view.backgroundColor = UIColor.black
|
||||
|
||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem:.stop,
|
||||
target:self,
|
||||
action:#selector(donePressed))
|
||||
target:self,
|
||||
action:#selector(donePressed))
|
||||
self.navigationItem.title = NSLocalizedString("ATTACHMENT_APPROVAL_DIALOG_TITLE",
|
||||
comment: "Title for the 'attachment approval' dialog.")
|
||||
|
||||
createViews()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
ViewControllerUtils.setAudioIgnoresHardwareMuteSwitch(true)
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
ViewControllerUtils.setAudioIgnoresHardwareMuteSwitch(false)
|
||||
}
|
||||
|
||||
// MARK: - Create Views
|
||||
|
||||
private func createViews() {
|
||||
|
|
Loading…
Reference in New Issue