-
-
Notifications
You must be signed in to change notification settings - Fork 314
Plugin: Unable to use lamejs plugin with the React Wiki example #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
After following React wiki page I tried:
Video.js options in const videoJsOptions = {
controls: true,
width: 320,
height: 240,
fluid: false,
plugins: {
// wavesurfer section is only needed when recording audio-only
wavesurfer: {
src: 'live',
waveColor: "#36393b",
progressColor: "black",
debug: true,
cursorWidth: 1,
msDisplayMax: 20,
hideScrollbar: true
},
record: {
audio: true,
video: false,
maxLength: 10,
debug: true,
audioEngine: "lamejs",
audioWorkerURL: "../../node_modules/lamejs/worker-example/worker-realtime.js",
audioSampleRate: 44100,
audioBitRate: 128
}
}
}; Gives the following error:
So I added a lamejs plugin import in import videojs from 'video.js';
import 'webrtc-adapter';
import RecordRTC from 'recordrtc';
// the following imports are only needed when you're recording
// audio-only using the videojs-wavesurfer plugin
import WaveSurfer from 'wavesurfer.js';
import MicrophonePlugin from 'wavesurfer.js/dist/plugin/wavesurfer.microphone.js';
WaveSurfer.microphone = MicrophonePlugin;
// register videojs-wavesurfer plugin
import 'videojs-wavesurfer/dist/css/videojs.wavesurfer.css';
import Wavesurfer from 'videojs-wavesurfer/dist/videojs.wavesurfer.js';
// register videojs-record plugin with this import
import Record from 'videojs-record/dist/videojs.record.js';
// register videojs-record lamejs plugin
import LamejsEngine from 'videojs-record/dist/plugins/videojs.record.lamejs.js';
videojs.LamejsEngine = LamejsEngine; And now I'm getting a syntax error when trying to load lamejs's |
Short answer no. Long answer is contained in this issue facebook/create-react-app#4505 - it'll be supported eventually, but no timeline was given. Although it looks like I could do research and come up with a solution in the meantime. |
any news @johnblakey? |
I'm making this low priority since lamejs doesn't seem to be maintained (actively) anymore. |
@thijstriemstra Our project isn't needing to upgrade the quality of our recordings so I was able to use the default. Feel free to close this ticket. |
Description
Attempted to modify the React version from the Wiki https://github.com/collab-project/videojs-record/wiki/React into a lamejs audio-only version with the instructions from https://github.com/collab-project/videojs-record/wiki/Plugins#lamejs and https://github.com/collab-project/videojs-record/blob/master/examples/plugins/audio-only-mp3.html .
Steps to reproduce
Note I added an entry into the webpack.config.dev.js file in the
new webpack.ProvidePlugin
array similar to theWaveSurfer: 'wavesurfer.js'
, but addinglamejs: 'lamejs'
did not impact the errors. I'm unclear how to use https://github.com/collab-project/videojs-record/wiki/Webpack with the lamejs plugin.npm start
Results
Expected
To record mp3 files
Actual
Error thrown when clicking the microphone icon
Error output
Additional Information
versions
videojs
2.4.1
browsers
Chrome Version 67.0.3396.99
OSes
macOS High Sierra Version 10.13.6
The text was updated successfully, but these errors were encountered: