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 "UIFont+OWS.h"
|
||||||
#import "UIUtil.h"
|
#import "UIUtil.h"
|
||||||
#import "UIView+OWS.h"
|
#import "UIView+OWS.h"
|
||||||
|
#import "ViewControllerUtils.h"
|
||||||
#import <JSQSystemSoundPlayer.h>
|
#import <JSQSystemSoundPlayer.h>
|
||||||
#import <PureLayout/PureLayout.h>
|
#import <PureLayout/PureLayout.h>
|
||||||
#import <SignalServiceKit/Contact.h>
|
#import <SignalServiceKit/Contact.h>
|
||||||
|
|
|
@ -43,14 +43,26 @@ class AttachmentApprovalViewController: UIViewController {
|
||||||
view.backgroundColor = UIColor.black
|
view.backgroundColor = UIColor.black
|
||||||
|
|
||||||
self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem:.stop,
|
self.navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem:.stop,
|
||||||
target:self,
|
target:self,
|
||||||
action:#selector(donePressed))
|
action:#selector(donePressed))
|
||||||
self.navigationItem.title = NSLocalizedString("ATTACHMENT_APPROVAL_DIALOG_TITLE",
|
self.navigationItem.title = NSLocalizedString("ATTACHMENT_APPROVAL_DIALOG_TITLE",
|
||||||
comment: "Title for the 'attachment approval' dialog.")
|
comment: "Title for the 'attachment approval' dialog.")
|
||||||
|
|
||||||
createViews()
|
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
|
// MARK: - Create Views
|
||||||
|
|
||||||
private func createViews() {
|
private func createViews() {
|
||||||
|
|
Loading…
Reference in New Issue