你好,我有一个简单的电子应用程序,它是从angular 7应用程序开始的,安装了electronic之后,我的应用程序在后台显示了一个循环的视频,在localhost中,我显示了视频的启动和循环,但是当我构建并制作一个发行包时对于Windows,我启动exe文件时,我只显示视频图片,但这不会启动。
slider.component.html
GlobalFilters.Filters.Add(new System.Web.Mvc.AuthorizeAttribute() { Users = "mydomain\\myuser" });
main.js
<div class="container">
<div class="col-md 12">
<video autoplay loop poster="" id="bgvid" #videoPlayer>
<!-- MP4 must be first for iPad! -->
<source src=" ./assets/video/Superb_sunset.mp4" type="video/mp4" /><!-- Safari / iOS video -->
</video>
</div>
</div>
文件夹组织
const { app, BrowserWindow } = require('electron')
let win;
function createWindow () {
// Create the browser window.
win = new BrowserWindow({
width: 600,
height: 600,
backgroundColor: '#ffffff',
icon: `file://${__dirname}/dist/lasalute/assets/logo.png`
})
win.loadURL(`file://${__dirname}/dist/lasalute/index.html`)
//// uncomment below to open the DevTools.
// win.webContents.openDevTools()
// Event when the window is closed.
win.on('closed', function () {
win = null
})
}
// Create window on electron intialization
app.on('ready', createWindow)
// Quit when all windows are closed.
app.on('window-all-closed', function () {
// On macOS specific close process
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', function () {
// macOS specific close process
if (win === null) {
createWindow()
}
})