# Oh-video with go2rtc and two way audio

**URL:** <https://community.openhab.org/t/oh-video-with-go2rtc-and-two-way-audio/170298>\
**Category:** Widgets\
**Created:** [August 31, 2026, 12:35pm UTC](https://community.openhab.org/t/oh-video-with-go2rtc-and-two-way-audio/170298 "2026-08-31T12:35:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pedro\_Liberal](https://community.openhab.org/user_avatar/community.openhab.org/pedro_liberal/32/113638_2.png) [@Pedro\_Liberal](https://community.openhab.org/u/Pedro_Liberal)\
**Post date:** [August 31, 2026, 12:35pm UTC](https://community.openhab.org/t/oh-video-with-go2rtc-and-two-way-audio/170298/1 "2026-08-31T12:35:13Z")

</div>

Hey everyone, I’m having difficulties with the oh-video widget - or maybe the go2rtc link, I’m not sure - in the oh-webframe, the same url works fine (but lacks two way audio of course). When I add the url:  
[https://go2rtcmydomain.com/webrtc.html?src=camera&media=video+audio+microphone](https://go2rtcmydomain.com/webrtc.html?src=camera&media=video+audio+microphone)

Which works correctly in the browser, two way audio included, I get a black screen and no stream.  
The media controls are all there but no stream.

Any hints?

---

<div class="post-metadata">

**Author:** ![nite\_route](https://community.openhab.org/user_avatar/community.openhab.org/nite_route/32/194515_2.png) [@nite\_route](https://community.openhab.org/u/nite_route)\
**Post date:** [August 31, 2026, 10:40pm UTC](https://community.openhab.org/t/oh-video-with-go2rtc-and-two-way-audio/170298/2 "2026-08-31T22:40:40Z")

</div>

if the same webrtc.html url works in a normal browser tab but oh-video / webframe is black, it is usually the iframe/permissions thing not go2rtc itself.

microphone + webrtc inside a widget is picky:

- browser will block mic in a cross-origin iframe unless the iframe allow list has `microphone; camera; autoplay`
- mixed content kills it if main ui is https and the go2rtc link is http (or bad cert)
- oh-video sometimes wants a raw stream url, not the full webrtc.html page. try the go2rtc stream endpoint / the embed the widget docs expect, and keep webrtc.html for a webframe only

quick checks:

1. open browser devtools on the ui page, look for iframe permission / autoplay errors
2. confirm the widget url is exactly the same origin scheme as the ui (https both sides)
3. for two way audio you basically need webframe + allow mic, plain oh-video often wont pass microphone through

if webframe still blacks out, paste the exact widget yaml and whether ui and go2rtc are same host or reverse proxied.

---

<div class="post-metadata">

**Author:** ![Pedro\_Liberal](https://community.openhab.org/user_avatar/community.openhab.org/pedro_liberal/32/113638_2.png) [@Pedro\_Liberal](https://community.openhab.org/u/Pedro_Liberal)\
**Post date:** [September 17, 2026, 6:43pm UTC](https://community.openhab.org/t/oh-video-with-go2rtc-and-two-way-audio/170298/3 "2026-09-17T18:43:13Z")

</div>

Funnily enough AI came to the rescue and I got a widget to work with two way audio!  
I’ll leave it for the community.

```yaml

version: 1
widgets:
  go2rtc_twoway_audio:
    tags: []
    props:
      parameters:
        - description: "E.g.: https://URL/webrtc.html?src=cameraname"
          label: Full go2rtc URL
          name: streamUrl
          required: true
          type: TEXT
        - default: true
          description: Starts the camera without audio. Reduces network bandwidth.
          label: Start Muted
          name: startMuted
          required: false
          type: BOOLEAN
      parameterGroups: []
    component: f7-card
    config:
      style:
        padding: 0px
        height: 300px
        position: relative
    slots:
      default:
        - component: iframe
          config:
            src: '=(vars[props.streamUrl]) ? props.streamUrl + "&media=video+audio+microphone" : (props.startMuted ? props.streamUrl + "&media=video&muted=true" : props.streamUrl)'
            style:
              width: 100%
              height: 100%
              border: none
            allow: microphone; camera; fullscreen;
        - component: oh-button
          config:
            iconF7: '=(vars[props.streamUrl]) ? "mic_fill" : "mic_slash_fill"'
            iconColor: '=(vars[props.streamUrl]) ? "red" : "white"'
            action: variable
            actionVariable: =props.streamUrl
            actionVariableValue: "=(vars[props.streamUrl]) ? false : true"
            style:
              position: absolute
              bottom: 15px
              right: 15px
              background: rgba(0,0,0,0.6)
              border-radius: 50%
              width: 45px
              height: 45px
              box-shadow: 0px 4px 10px rgba(0,0,0,0.3)

```

Anyway it’s working 🙂 @nite_route thank you for the hints, I ended up setting most of my services with let’s encrypt certificates too to make sure no HTTP connections were happening in between.
