 import AVFoundation
 import Foundation
 
-enum MediaType {
+public enum MediaType {
     case video
     case audio
     case text

            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())."])

        }
    }

    class func checkRequiredPlistValues() {
        let requiredPlistKey = "NSCameraUsageDescription"

        guard let infoDictionary = Bundle.main.infoDictionary else {
