Socket
Socket
Sign inDemoInstall

@instructure/media-capture

Package Overview
Dependencies
26
Maintainers
31
Versions
810
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @instructure/media-capture

--- category: packages experimental: true ---


Version published
Maintainers
31
Created

Readme

Source

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

FAQs

Last updated on 20 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc