@instructure/media-capture

10.0.0 • Public • Published

category: packages experimental: true

media-capture

Installation

yarn add @instructure/media-capture

Browser Support

  • Chrome, Firefox

Usage

import React, { Component } from 'react'
import { canUseMediaCapture, mediaCaptureStates }, MediaCapture from '@instructure/media-capture'

export default class Container extends Component {
  saveFile (file) {
    // do something with the file
  },

  mediaCaptureClosed (state) {
    if (state === mediaCaptureStates.RECORDING) {
      alert('Recording canceled.')
    }
  },

  render () {
    return (
      { canUseMediaCapture() ?
        <MediaCapture
          onCompleted={this.saveFile}
          onCancel={this.mediaCaptureClosed}
          onClose={this.mediaCaptureClosed}
        /> : null
      }
    )
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @instructure/media-capture

Weekly Downloads

2,631

Version

10.0.0

License

MIT

Unpacked Size

1.13 MB

Total Files

348

Last publish

Collaborators

  • bpjatacsuk
  • ajmal-esa
  • razorsh4rk
  • david.wenzlick.inst
  • robinkuss64
  • ardena
  • jcflow
  • jguardadom
  • jdewar
  • xcudder
  • ericsaupe
  • joyenjoyer
  • omarpr
  • cguanzon-inst
  • sarahgerard
  • jacksonhowe
  • jakeoeding
  • camray
  • cjs118
  • matyas.szabo
  • herrtopi
  • angela.gomba
  • kyler-instructure
  • instuici
  • eschiebel
  • maths22
  • jcrystal
  • skacsmark
  • itadmins
  • quizzesuici
  • instructure-toolsmiths-service-user
  • aogata-inst
  • instout