Ignore hardware mute switch during video playback in attachment approval view.

// FREEBIE
This commit is contained in:
Matthew Chen 2017-04-13 14:35:31 -04:00
parent d9ef27d802
commit bf9ae552a3
2 changed files with 15 additions and 2 deletions

View File

@ -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>

View File

@ -51,6 +51,18 @@ class AttachmentApprovalViewController: UIViewController {
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() {