   fileprivate static let version = "3.7.1"
   fileprivate static let eventName = "dmevent"
   fileprivate static let pathPrefix = "/embed/"
-  private static let messageHandlerEvent = "triggerEvent"
-  
+  fileprivate static let messageHandlerEvent = "triggerEvent"
+  fileprivate static let consoleHandlerEvent = "consoleEvent"
+  fileprivate static let loggerParameterKey = "logger"
+  
+  private var webView: WKWebView!
   private var baseUrl: URL!
+  private var deviceIdentifier: String?
+  private var loggerEnabled: Bool = false
   fileprivate var isInitialized = false
   fileprivate var videoIdToLoad: String?
   fileprivate var payloadToLoad: [String: Any]?
   
   open weak var delegate: DMPlayerViewControllerDelegate?
-
-  private var webView: WKWebView!
-  
-  private var deviceIdentifier: String?
 
   override open var shouldAutorotate: Bool {
     return true

    pause()
    webView.stopLoading()
    webView.configuration.userContentController.removeScriptMessageHandler(forName: DMPlayerViewController.messageHandlerEvent)
  }
  
  /// Load a video with ID and optional OAuth token

    if allowIDFA {
      deviceIdentifier = advertisingIdentifier()
    }
    if parameters.contains(where: { $0.key == DMPlayerViewController.loggerParameterKey }) {
      loggerEnabled = true
    }
    self.loadWebView(parameters: parameters, baseUrl: baseUrl, accessToken: accessToken, cookies: cookies)
  }
  
