title: Blazor MAUI - Camera and Microphone Android permissions
body: <p>I am trying to show live stream from camera &amp; microphone in <code>&lt;video&gt;</code> html element.</p>
  <p>In blazor file (<code>sample.razor</code>) I invoke method to request and show video:</p>
  <pre><code>protected override async Task OnAfterRenderAsync(bool firstRender)
      {
          await base.OnAfterRenderAsync(firstRender);
  
          if (firstRender)
          {
              await JSRuntime.InvokeVoidAsync(&quot;requestMediaAndShow&quot;);
          }
      }
  </code></pre>
  <p>In javascript file (<code>sample.js</code>) I request stream and assign to video html element.</p>
  <pre><code>// Create request options
  let options = {
      audio: true,
      video: true
  };
  
  // Request user media
  navigator.mediaDevices
      .getUserMedia(options)
      .then(gotLocalStream)
      .catch(logError);
  </code></pre>
  <p>But when I am requesting i catch an error like &quot;NotAllowedError: Permission denied&quot;.</p>
  <p><code>AndroidManifest.xml</code> contains:</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.RECORD_AUDIO&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.MODIFY_AUDIO_SETTINGS&quot; /&gt;
  </code></pre>
  <p><code>MainActivity.cs</code> contains:</p>
  <pre><code>public class MainActivity : MauiAppCompatActivity
  {
      protected override void OnCreate(Bundle savedInstanceState)
      {
          base.OnCreate(savedInstanceState);
  
          ActivityCompat.RequestPermissions(this, new[] { Manifest.Permission.Camera, Manifest.Permission.RecordAudio, Manifest.Permission.ModifyAudioSettings }, 0);
      }
  }
  </code></pre>
  <p>Any ideas how to request audio and video stream by javascript in BlazorWebView natively on android?
  PS. On both on website and natively on Windows platform works great and no extra permissions are required.</p>