Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Handle Media Session API



  • Hi.
    Web pages can expose Media Session API, it is using for lock screens notifications and also for changing playing status directly on the page.
    https://developer.mozilla.org/en-US/docs/Web/API/Media_Session_API
    You can see what I mean by playing youtube video on Fire Fox or Chromium based browser and in console run:

    navigator.mediaSession.metadata
    

    Is it possible to retrieve such data in page loaded in QWebEngineView? I want it back to the C++. Also, I want even more, I want to hook on this data and get notified when metadata changed or when navigator.mediaSession.playbackState changed.
    Qt 5.15.2, QWebEngine based on chromium 83.0.4103.122.

    Regards


Log in to reply