category: packages
experimental: true
media-capture
Installation
yarn add @instructure/media-capture
Browser Support
Usage
import React, { Component } from 'react'
import { canUseMediaCapture, CaptureStates }, MediaCapture from '@instructure/media-capture'
export default class Container extends Component {
saveFile(file) {
},
mediaCaptureClosed() {
alert('Recording canceled.')
},
render () {
return (
{ canUseMediaCapture() ?
<ScreenCapture
onCompleted={this.saveFile}
onCancel={this.mediaCaptureClosed}
/> : null
}
)
}
}