Vue.js Video.js与vue electron合作制作视频播放列表

Vue.js Video.js与vue electron合作制作视频播放列表,vue.js,electron,video.js,Vue.js,Electron,Video.js,我正在制作自动播放视频播放列表。我使用glob从目标文件夹获取所有视频的绝对路径。我的代码如下: let vm = this; let trailerList = null; trailerList = glob.sync(`${__static}/trailers/*.{mp4,flv,mov}`).map(path => { return { sources: [{ src: path }] }; }); let option = { autop

我正在制作自动播放视频播放列表。我使用glob从目标文件夹获取所有视频的绝对路径。我的代码如下:

let vm = this;
let trailerList = null;
trailerList = glob.sync(`${__static}/trailers/*.{mp4,flv,mov}`).map(path => {
    return {
        sources: [{ src: path }]
    };
});
let option = {
    autoplay: true,
    controls: false,
    muted: true
};

this.player = videojs(this.$refs.videoPlayer, option, () => {
    this.player.playlist(trailerList);
    this.player.playlist.autoadvance(0);
    this.player.playlist.repeat(true);
});

我收到一个
错误:(code:4媒体\u ERR\u SRC\u不受支持)由于服务器或网络故障或格式不受支持,无法加载媒体。如果将变量
path
替换为
require(“C:/…/static/trailes/Video.mp4”)
,则该函数有效。但是,按要求更换(路径)
将返回未找到的模块

只需将electron版本降级为5并解决问题