Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-64958

QWebEngineView and VLC do not work together

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.7.1, 5.9.1, 5.9.3, 5.10.1
    • None
    • Windows 8 x64 + Qt 5.9.3 + Visual Studio 2015

      Windows 8.1 x64 + Qt 5.10.1 + Qt Creator 4.5.1
    • Windows

      In case a main window contains the instance of QWebEngineView and there is VLC video rendered to a widget it doesn't work when the main window is shown full-screen. QWebEngineView turns black and the video widget simply shows nothing. If the normal mode (not full-screen) it works fine.

      // main.cpp
      
      #include "playerwindow.h"
      #include "player.h"
      
      #include <QtCore>
      #include <QtWidgets>
      #include <QtWebEngineWidgets>
      
      
      int main(int argc, char * argv[])
      {
      QApplication app(argc, argv);
      
      QMainWindow mainWindow;
      
      QSplitter splitter(Qt::Horizontal);
      
      QWebEngineView browser;
      browser.load(QUrl("http://www.binsearch.info"));
      
      PlayerWindow playerWindow;
      
      splitter.addWidget(&browser);
      splitter.addWidget(&playerWindow);
      
      mainWindow.setCentralWidget(&splitter);
      //mainWindow.show();
      mainWindow.showFullScreen();	// !
      
      playerWindow.play();
      
      return app.exec();
      }
      
      
      

       

       VLC needs widget->winId() in order to render the video: 

      // playerwindow.h
      
      #ifndef PLAYERWINDOW_H
      #define PLAYERWINDOW_H
      
      #include "player.h"
      
      #include <QtWidgets>
      #include <QMacCocoaViewContainer>
      
      class PlayerWindow: public QWidget
      {
      public:
      PlayerWindow() : player(*this) {}
      
      void * getVideoArea() const { return (void*)this->winId(); } // !
      
      void play() { this->player.play(); }
      
      private:
      Player player;
      #ifdef Q_OS_MAC
      QMacCocoaViewContainer container;
      #endif
      }; // PlayerWindow
      
      #endif
      

      The project exceeds the attachment limit for it contains VLC libraries and test video. Hence, I'm posting the download link to the external storage

       

      In 5.10.1 this example crashes (regardless of full screen mode) with the following error:

      [10632:20208:0330/153745.122:FATAL:com_init_util.cc(71)] Check failed: false. CoCreateInstance calls in Chromium require explicit COM initialization via base::CreateCOMSTATaskRunnerWithTraits() or ScopedCOMInitializer. See the comment in DCheckedCoCreateInstance for more details.
      Backtrace:
      {{ GetHandleVerifier [0x03379357+341015]}}
      {{ GetHandleVerifier [0x03380911+371153]}}
      {{ QWebEngineUrlSchemeHandler::_q_destroyedUrlSchemeHandler [0x032A93BE+2910]}}
      {{ GetHandleVerifier [0x033D11D5+701077]}}
      {{ GetHandleVerifier [0x033CC7DD+682141]}}
      {{ DllGetClassObject [0x503FBA95+15653]}}
      {{ DllGetClassObject [0x503FBC36+16070]}}
      {{ DllGetClassObject [0x503FB007+12951]}}
      {{ DllGetClassObject [0x503FA6C9+10585]}}
      {{ DirectSoundCreate [0x504122FE+110]}}
      {{ (No symbol) [0x507939EE]}} 

        1. 2017-12-05_154113.png
          602 kB
          Pugach Yaroslav
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            mentalmushroom Pugach Yaroslav
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes