Uncaught SyntaxError:使用videojs出现意外令牌'<'-ffmpegjs插件和多个插件问题

问题描述

我正在尝试将ffmpegjs插件用于videojs但出现错误

“未捕获的SyntaxError:意外的令牌'

也不知道如何在videojs中使用多个插件。想与ts-ebml一起使用ffmpeg。

这是我在videojs选项中使用的方式:

options: {
                controls: true,bigPlayButton: false,loop: false,width: 600,height: 340,fluid: false,plugins: {
                    wavesurfer: {
                        backend: "WebAudio",waveColor: "#ffffff",backgroundColor: "#000000",barHeight: 3,progressColor: "white",debug: true,cursorWidth: 1,displayMilliseconds: true,hideScrollbar: true,plugins: [
                            // enable microphone plugin
                            WaveSurfer.microphone.create({
                                bufferSize: 4096,numberOfInputChannels: 1,numberOfOutputChannels: 1,constraints: {
                                    video: false,audio: true
                                }
                            })
                        ]
                    },record: {
                        audio: true,video: false,maxLength: 3600,// enable ffmpeg.js plugin
                        convertEngine: "ffmpeg.js",// convert recorded data to MP3
                        convertOptions: ["-f","mp3","-codec:a","libmp3lame","-qscale:a","2"],// specify output mime-type
                        pluginLibraryOptions: {
                            outputType: "audio/mpeg"
                        },// use MP4 encoding worker (H.264 & AAC & MP3 encoders)
                        convertWorkerURL: "../../../../node_modules/ffmpeg.js/ffmpeg-worker-mp4.js"
                    }
                }
            }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)