Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngineView WebRTC udp/tcp test failed?
Forum Updated to NodeBB v4.3 + New Features

QWebEngineView WebRTC udp/tcp test failed?

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 276 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Salamander
    wrote on 11 Feb 2020, 04:03 last edited by
    #1

    I just want to use WebRTC in the QWebEngineView, but it seems udp/tcp was not supported and how to resovle it?
    Here is my simple code:

    MainWindow::MainWindow(QWidget *parent)
        : QMainWindow(parent)
        , ui(new Ui::MainWindow)
    {
        ui->setupUi(this);
        webView = new QWebEngineView;
        connect(webView->page(),
                SIGNAL(featurePermissionRequested(const QUrl&, QWebEnginePage::Feature)),
                SLOT(featurePermissionRequested(const QUrl&, QWebEnginePage::Feature)));
    
        QUrl url = QUrl("https://test.webrtc.org/");
        this->webView->setUrl(url);
        this->webView->show();
    
        this->setCentralWidget(this->webView);
    }
    
    void MainWindow::featurePermissionRequested(const QUrl &securityOrigin,
                                                QWebEnginePage::Feature feature)
    {
        qDebug() << "securityOrigin" << securityOrigin << feature;
    
        this->webView->page()->setFeaturePermission(securityOrigin,
                feature, QWebEnginePage::PermissionGrantedByUser);
    }
    

    and the test result was:
    2020-02-11-11-57-22.png

    1 Reply Last reply
    0

    1/1

    11 Feb 2020, 04:03

    • Login

    • Login or register to search.
    1 out of 1
    • First post
      1/1
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved