Skip to content

Allow selection of back cameras from mobile phones #293

Answered by Zian00
Zian00 asked this question in Q&A
Discussion options

You must be logged in to vote

Update:
I managed to create the camera-selection feature by refering to this github and this article.

Basically, adding an extra file, the app.js from the github link and link it in your html file, and change the
const video = document.getElementById('video'); to
const video = document.getElementById('arjs-video');

Add the following code in html file:

    <div class="controls">
      <button id="button">Get camera</button>
      <select id="select">
        <option></option>
      </select>

The rest should be working fine. However, in my case, i need to change:

navigator.mediaDevices    
  .getUserMedia(constraints)    
  .then(stream =>{      
    currentStream = stream;     
    video.…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Zian00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant