Skip to content

Commit

Permalink
当页面url未定义时,视频预处理base url采用localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinlic committed Dec 6, 2023
1 parent 9d8e3c2 commit 1bf7356
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion media/VideoCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ export default class VideoCanvas {
async _fetchData() {
if (!this.buffer) {
// console.time();
const response = await captureCtx.fetch("/api/video_preprocess", {
// 当页面url未定义时采用localhost代替
const base = window.location.url ? "" : "http://localhost";
const response = await captureCtx.fetch(base + "/api/video_preprocess", {
method: "POST",
body: JSON.stringify(this._exportConfig()),
retryFetchs: 0
Expand Down

0 comments on commit 1bf7356

Please sign in to comment.