Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 489 Bytes

File metadata and controls

27 lines (21 loc) · 489 Bytes

useMediaDevices

Vue hook that tracks connected hardware devices.

Usage

import { createComponent } from '@vue/composition-api'
import { useMediaDevices } from 'vuses'

const Demo = createComponent({
  setup() {
    const devices = useMediaDevices()
    return { devices }
  },
  render() {
    const { devices } = this
    return <pre>{JSON.stringify(devices, null, 2)}</pre>
  }
})

Reference

function useMediaDevices(): Partial<MediaDeviceInfo>[]