Failed to execute "postMessage" in message "DOMWindow" on Android

We use video.js with the youtube plugin .

When uploading a video, I get an error message on the console.

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube.com') does not match the recipient window origin ('http://www.youtube.com').

I followed the proposed solution here and added forceSSL: true, which fixed the problem for the desktop, but I still get it on Android devices.

instantiate videoJS:

scope.player = videojs('vid3', { techOrder: ["youtube"], controls: true, preload: "auto", autoplay: false, 'forceSSL':true, 'forceHTML5':true, src: attributes.src})
+4
source share
1 answer

, WebView. ? loadDataWithBaseURL(), http://www.youtube.com baseUrl.

:

loadDataWithBaseURL WebView, baseUrl URL- . URL- URL- JavaScript.

0

Source: https://habr.com/ru/post/1538642/


All Articles