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

  fileprivate static let messageHandlerEvent = "triggerEvent"
  fileprivate static let consoleHandlerEvent = "consoleEvent"
  fileprivate static let loggerParameterKey = "logger"
  
  private var webView: WKWebView!
  private var baseUrl: URL!

      completion?()
      return
    }

    setConsentCookie()

    let js = buildLoadString(videoId: videoId, params: params)
    
    webView.evaluateJavaScript(js) { _,_ in
