JSPM

@instructure/media-capture

11.2.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 3761
    • Score
      100M100P100Q125015F
    • License MIT

    Package Exports

    • @instructure/media-capture
    • @instructure/media-capture/es/index.js
    • @instructure/media-capture/lib/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@instructure/media-capture) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme


    category: packages experimental: true

    media-capture

    Installation

    yarn add @instructure/media-capture

    Browser Support

    • Chrome, Firefox

    Usage

    import React, { Component } from 'react'
    import { canUseMediaCapture, CaptureStates }, MediaCapture from '@instructure/media-capture'
    
    export default class Container extends Component {
      saveFile(file) {
        // do something with the file
      },
    
      mediaCaptureClosed() {
        alert('Recording canceled.')
      },
    
      render () {
        return (
          { canUseMediaCapture() ?
            <ScreenCapture
              onCompleted={this.saveFile}
              onCancel={this.mediaCaptureClosed}
            /> : null
          }
        )
      }
    }