         }
     }
 
-    fileprivate class func checkRequiredPlistValues() {
+    class func checkRequiredPlistValues() {
         let requiredPlistKey = "NSCameraUsageDescription"
 
         guard let infoDictionary = Bundle.main.infoDictionary else {

            break
        }

        if authorized {
            completion?(createCaptureDevice(mediaType))
            return
        }

        checkRequiredPlistValues()

        AVCaptureDevice.requestAccess(for: mediaType.stringConstant()) { authorizationGranted in
            if !authorizationGranted {
                let authorizationError: NSError? = NSError(domain: CaptureDeviceAuthorizationErrorDomain, code: CaptureDeviceAuthorizationErrorCode.denied.rawValue, userInfo: [NSLocalizedDescriptionKey: "Capture device for media type \(mediaType.stringConstant()) not available.", NSLocalizedFailureReasonErrorKey: "The user denied the request to access \(mediaType.stringConstant())."])

import AVFoundation
import Foundation

public enum MediaType {
    case video
    case audio
    case text
