@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
      }
    )
  }
}

/@instructure/media-capture/

    Package Sidebar

    Install

    npm i @instructure/media-capture

    Weekly Downloads

    3,478

    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