uppy/e2e/clients/dashboard-ui/app.js

36 lines
1.1 KiB
JavaScript

import Audio from '@uppy/audio'
import Compressor from '@uppy/compressor'
import Uppy from '@uppy/core'
import Dashboard from '@uppy/dashboard'
import DropTarget from '@uppy/drop-target'
import GoldenRetriever from '@uppy/golden-retriever'
import ImageEditor from '@uppy/image-editor'
import RemoteSources from '@uppy/remote-sources'
import ScreenCapture from '@uppy/screen-capture'
import Webcam from '@uppy/webcam'
import '@uppy/core/dist/style.css'
import '@uppy/dashboard/dist/style.css'
const COMPANION_URL = 'http://companion.uppy.io'
const uppy = new Uppy()
.use(Dashboard, { target: '#app', inline: true })
.use(RemoteSources, { companionUrl: COMPANION_URL })
.use(Webcam, {
target: Dashboard,
showVideoSourceDropdown: true,
showRecordingLength: true,
})
.use(Audio, {
target: Dashboard,
showRecordingLength: true,
})
.use(ScreenCapture, { target: Dashboard })
.use(ImageEditor, { target: Dashboard })
.use(DropTarget, { target: document.body })
.use(Compressor)
.use(GoldenRetriever, { serviceWorker: true })
// Keep this here to access uppy in tests
window.uppy = uppy