Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › YouTubeWebPlayer CORS error

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #25404

    Victor Manuel

    I try use YoutubeWebPlayer but i get the next error

    js: Unrecognized feature: 'clipboard-write'.
    js: Unrecognized feature: 'web-share'.
    [244888:244909:0728/020840.403927:ERROR:ssl_client_socket_impl.cc(959)] handshake failed; returned -1, SSL error code 1, net_error -107
    [244888:244909:0728/020840.597595:ERROR:ssl_client_socket_impl.cc(959)] handshake failed; returned -1, SSL error code 1, net_error -107
    qml: undefined
    [244888:244909:0728/020840.627134:ERROR:ssl_client_socket_impl.cc(959)] handshake failed; returned -1, SSL error code 1, net_error -107
    js: Access to XMLHttpRequest at 'https://jnn-pa.googleapis.com/$rpc/google.internal.waa.v1.Waa/Create' from origin 'https://www.youtube.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    [244888:244909:0728/020840.784226:ERROR:ssl_client_socket_impl.cc(959)] handshake failed; returned -1, SSL error code 1, net_error -107
    js: Access to XMLHttpRequest at 'https://jnn-pa.googleapis.com/$rpc/google.internal.waa.v1.Waa/Create' from origin 'https://www.youtube.com' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

     

    #25408

    Günther
    Felgo Team

    Hi,

    the YoutubeWebPlayer uses a Qt WebView to embed the YT HTML Player, which relies on the native platform webview capabilities. The issue is probably related to actual platform/device. Which platform are experiencing this error on?
    There doesn’t seem to be a general problem with the YoutubeWebPlayer implementation.

    Best,
    Günther from Felgo

    #25499

    Taher

    Hello,

    I am trying to build the appYoutubePlayer example project on my windows machine for android and windows platform.

    I am facing the same error as above.

    I am using android 14 pixel 8 and i am facing the same error. NDK is 26.1.10909125 & API level 34.

    Also, on windows platform i am facing error as below:

    qt.tlsbackend.ossl: Failed to load libssl/libcrypto.

    #25500

    Günther
    Felgo Team

    Hi,

    In general, the YouTubeWebPlayer demo is currently outdated and fails to retrieve the list of channel videos from the YouTube API. This is due to API changes on YouTube side. I suspect that also the CORS error might be related to that.

    However, the main YouTubeWebPlayer component by itself is still functional.
    You can try to run this example code and should see the embedded video:

    import Felgo 3.0
    
    App {
      NavigationStack {
        Page {
          title: "YouTube Player"
    
          YouTubeWebPlayer {
            videoId: "KYy1SdpEdU4"
          }
    
        }
      }
    }

    For Felgo 4 it would look like this:

    import Felgo
    
    App {
      NavigationStack {
        AppPage {
          title: "YouTube Player"
          
          YouTubeWebPlayer {
            videoId: "KYy1SdpEdU4"
          }
          
        }
      }
    }

    For Windows, please not that the Qt WebView module is only available when using the MSVC Build Kit. WebView capabilities are not supported when compiling with the default MinGW Build Kit. You can install the MSVC Build Kit with the MaintenanceTool.

    If you want to connect with the YouTube API for custom queries, like retrieving the list of videos from a channel, please have a look at the latest API documentation and requirements.

    Best,
    Günther

Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded