Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Qt c++ OrangePi (Linux) QWebView VideoCapture

Qt c++ OrangePi (Linux) QWebView VideoCapture

Scheduled Pinned Locked Moved Unsolved Qt WebKit
1 Posts 1 Posters 471 Views
  • 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.
  • C Offline
    C Offline
    chiffa_cff
    wrote on last edited by
    #1

    Hello! I'm try to make navigator.mediaDevices.getUserMedia in my Qt project with QWebView. In html I use standard code which work fine:

    <style>
    #container {
        margin: 0px auto;
        width: 500px;
        height: 375px;
        border: 10px #333 solid;
    }
    #videoElement {
        width: 500px;
        height: 375px;
        background-color: #666;
    }
    </style>
    
    <div id="container">
        <video autoplay="true" id="videoElement">
        
        </video>
    </div>
    
    <script>
    
    var video = document.querySelector("#videoElement");
    
    if (navigator.mediaDevices.getUserMedia) {
      navigator.mediaDevices.getUserMedia({ video: true })
        .then(function (stream) {
          video.srcObject = stream;
        })
        .catch(function (err0r) {
          console.log("Something went wrong!");
        });
    }
    
    </script>
    

    When I open it in browser, it get access to webcam and display video. But when I run in Qt I get error in console:

    TypeError: undefined is not an object (evaluating 'navigator.mediaDevices.getUserMedia')
    

    please help: how to set access for video in QWebView? Thanks!

    P.S. as I know, I can't make QWebEnginePage on OrangePi

    1 Reply Last reply
    0

    • Login

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