天天看點

vue-electron打包後報錯:Fetch API cannot load app://./EasyPlayer.wasm. URL scheme “app“ is not supported

該應用是使用vue-electron+EasyPlayer.wasm播放H265視訊問題,開發運作時,能正常播放H265視訊,npm run electron:build打包後就不能播放H265視訊了,小白摸索了大半天,在控制台發現了以下錯誤資訊:

9da924e0-5036-44d1-8c95-63e0916ff0f1:1 Fetch API cannot load app://./EasyPlayer.wasm. URL scheme "app" is not supported.

(anonymous) @ 9da924e0-5036-44d1-8c95-63e0916ff0f1:1

(anonymous) @ 9da924e0-5036-44d1-8c95-63e0916ff0f1:1

a @ 9da924e0-5036-44d1-8c95-63e0916ff0f1:1

(anonymous) @ 9da924e0-5036-44d1-8c95-63e0916ff0f1:1

9da924e0-5036-44d1-8c95-63e0916ff0f1:1 Uncaught (in promise) TypeError: Failed to fetch

    at 9da924e0-5036-44d1-8c95-63e0916ff0f1:1

    at 9da924e0-5036-44d1-8c95-63e0916ff0f1:1

    at a (9da924e0-5036-44d1-8c95-63e0916ff0f1:1)

    at 9da924e0-5036-44d1-8c95-63e0916ff0f1:1

說是無法擷取 app://./EasyPlayer.wasm,不支援“app”協定,我想不對啊,那app://./index.html怎麼能通路呢?

運作打包後的 electron 應用

繼續閱讀