首页 > 解决方案 > hbo go 无法在电子内部流式传输视频

问题描述

我正在使用电子 js 开发一个程序,这对媒体 pc ui 很有用,但我遇到了一个错误,因为当我想用它播放视频时,hbogo 指示错误。

错误: https ://imgur.com/InPUCWk

html

                <webview id="player"
                src="https://hbogo.hu/"
                style="display:inline-flex; width: 70vw; height:100vh"
                ></webview>

主窗口

app.on('ready', function() {

    //create window and set to main
    win = new BrowserWindow({
        height: 800,
        width: 1300,
        fullscreen: true,
        webPreferences: {
            nodeIntegration: true,
            contextIsolation: false,
            webviewTag: true
        }
    });

    win.loadURL(url.format({
        pathname: path.join(__dirname, 'HTML/home.html'),
        protocol:'file',
        slashes: true,

    }));

抱歉英语不好。

标签: javascripthtmlnode.jselectronvideo-streaming

解决方案


推荐阅读