     AV_BUTTON
       danger: !me.video
       onClick: (e) ->
-        if me.video
-          plugin_handle?.muteVideo()
+        if window.camera == undefined
+          # TODO: warn the user when they don't have an accessible camera but
+          # try to turn on video. This silently keeps it off.
           me.video = false
         else
-          plugin_handle?.unmuteVideo()
-          me.video = true
-        return
-
+          # TODO: call window.camera.close() to turn off camera entirely. Right
+          # now when you turn off video, your camera light is on, even though we
+          # aren't using that camera feed.
+          me.video = !!!me.video
+          window.camera.setEnabled(me.video)
       VIDEO_ICON
         on: !!me.video
         width: 16

    me.timeEntered = Date.now()
    me.active = true
    me.space = sb['tawk/space']
    me.video = true
    me.audio = true
    me.avatar_url = next_avatar_url()

  if not agora_initialized

streams = {}
agora_initialized = false

window.camera = undefined
window.microphone = undefined

###############################################################################
# Client Bus (all state prefixed with tawk/)
