Skip to content

[BUG] Cannot Access Audio Via iFrame #79

@fish-not-phish

Description

@fish-not-phish

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running any container off this base image works fine, except when I put the connection inside of an iFrame on a HTML page. To explain in more detail:

  1. I have domain https://top.tld
  2. I have an iFrame on this domains home page which links back to the selkies container
    <iframe src="https://container-top.tld" allow="autoplay; microphone; camera; clipboard-read; clipboard-write; fullscreen"></iframe>
  3. This iFrame loads and displays the container fine, but I am unable to hear audio and use the microphone.
  4. In my browser I see the following errors which I believe are due to cross-origin permissions/policies.
Microphone error: NotAllowedError - Permission denied
[Violation] Permissions policy violation: microphone is not allowed in this document.
rm @ index-D7DR09zb.js:372
_4 @ index-D7DR09zb.js:171
postMessage
xr @ index-D7DR09zb.js:80
Xg @ index-D7DR09zb.js:48
(anonymous) @ index-D7DR09zb.js:48
Sr @ index-D7DR09zb.js:48
cf @ index-D7DR09zb.js:48
xf @ index-D7DR09zb.js:49
pb @ index-D7DR09zb.js:49Understand this error
index-D7DR09zb.js:372 Failed to start microphone capture: 

I don't seem to receive an explicit error for the audio output, but I cannot seem to hear anything regardless. I assume the audio output is the same root cause as the microphone being inaccessible. This is likely an NGINX change I need to make and I have tried a few different configurations to no avail.

Expected Behavior

I expected a more plausible way to have cross-origin support for the audio. These items previously worked on the KasmVNC base image and didn't require any NGINX configuration modifications.

Steps To Reproduce

Steps were outlined above, you can use any browser application like the Firefox selkies image. Everything works on localhost, just not when working with domains and accessing the container through an iFrame.

Environment

- OS: Ubuntu
- How docker service was installed: Through tradition means through the official Docker documentation.

Docker creation

docker run -d \
  --name=firefox \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -p 3000:3000 \
  -p 3001:3001 \
  lscr.io/linuxserver/firefox:latest

Container logs

No container logs are relevant in this case, as it is highly likely a proxy configuration issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions