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