UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Camera not working in Webview

    Scheduled Pinned Locked Moved Solved App Development
    4 Posts 2 Posters 824 Views 2 Watching
    Loading More Posts
    • 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.
      • A Offline
        ari
        last edited by

        Using a webview in QML, testing with sites like: https://webcamtests.com/ the camera does not appear.

        Trying the same site on the regular morph browser works as expected.

        I've already set "camera" as one of the policy_groups.

        What am I missing?

        dobeyD 1 Reply Last reply Reply Quote 0
        • A Offline
          ari @ari
          last edited by

          Finally figured it out. Well... kind of.
          The solution is to not use the Webview, but instead WebEngineView, and make sure to include the onFeaturePermissionRequested method.
          In conclusion, just steal the code from the discord app.

          1 Reply Last reply Reply Quote 1
          • dobeyD Offline
            dobey @ari
            last edited by

            @ari said in Camera not working in Webview:

            Using a webview in QML

            What exactly are you using when you say "webview" here?

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              ari @dobey
              last edited by

              @dobey I'm using the Ubuntu.Web WebView in a clickable qml project. But actually importing "Morph .Web" as... well actually its because you said so.

              A 1 Reply Last reply Reply Quote 0
              • A ari marked this topic as a question on
              • A Offline
                ari @ari
                last edited by

                Finally figured it out. Well... kind of.
                The solution is to not use the Webview, but instead WebEngineView, and make sure to include the onFeaturePermissionRequested method.
                In conclusion, just steal the code from the discord app.

                1 Reply Last reply Reply Quote 1
                • A ari has marked this topic as solved on

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • First post
                  Last post