How QWebView HTML video.play() emit url to QMediaPlayer?



  • alt text

    webview = new QWebView;
    webview->load(QUrl("http://m.91kds.net/"));
    ui->tabWidget->insertTab(0,webview,"91KDS");
    ......
    QWebFrame *frame = webView->page()->currentFrame();
    QWebElement document = frame->documentElement();
    QWebElement video = document.findFirst("video");
    QString surl = video.attribute("src");
    qDebug() << "91KDS" << surl;
    .....
    player = new QMediaPlayer;
    player->play(surl);


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.