feat: add FFmpeg WASM runtime (#1512)

This commit is contained in:
Levi authored and GitHub committed 2026-09-16 00:38:22 +08:00
1 parent 46c34f2e92
commit c667f097dc
31 files changed
+2305 -24

No files matched your search

+10 -2
View File
@@ -3,9 +3,11 @@ package download
import (
"context"
"io"
"strings"
"sync"
internalblob "github.com/GopeedLab/gopeed/internal/blob"
httpProtocol "github.com/GopeedLab/gopeed/internal/protocol/http"
"github.com/GopeedLab/gopeed/pkg/download/engine"
"github.com/GopeedLab/gopeed/pkg/download/engine/inject/stream"
enginewebview "github.com/GopeedLab/gopeed/pkg/download/engine/webview"
@@ -119,9 +121,15 @@ func (d *Downloader) newExtensionEngine() (*engine.Engine, *engineSession) {
return d.blob.Revoke(url)
},
}
httpConfig := struct {
UserAgent string `json:"userAgent"`
}{UserAgent: httpProtocol.DefaultUserAgent}
d.getProtocolConfig("http", &httpConfig)
userAgent := strings.TrimSpace(httpConfig.UserAgent)
e := engine.NewEngine(&engine.Config{
ProxyConfig: d.cfg.Proxy,
StreamConfig: engineCfg,
HTTPUserAgent: &userAgent,
ProxyConfig: d.cfg.Proxy,
StreamConfig: engineCfg,
})
session.SetEngine(e)
return e, session