can play music and authenticate
This commit is contained in:
parent
bd06b5fe21
commit
451fb433eb
2 changed files with 20 additions and 5 deletions
|
@ -41,7 +41,7 @@ var app = new Vue({
|
|||
document.addEventListener('musickitloaded', function() {
|
||||
// MusicKit global is now defined
|
||||
MusicKit.configure({
|
||||
developerToken: '',
|
||||
developerToken: 'put key here pls',
|
||||
app: {
|
||||
name: 'My Cool Web App',
|
||||
build: '1978.4.1'
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
const {app, BrowserWindow, ipcMain} = require("electron")
|
||||
const {join, resolve} = require("path")
|
||||
const getPort = require("get-port");
|
||||
const express = require("express");
|
||||
const path = require("path");
|
||||
|
||||
const CiderWin = {
|
||||
CreateBrowserWindow() {
|
||||
|
@ -16,26 +19,38 @@ const CiderWin = {
|
|||
plugins: true,
|
||||
nodeIntegration: true,
|
||||
nodeIntegrationInWorker: false,
|
||||
webSecurity: true,
|
||||
webSecurity: false,
|
||||
allowRunningInsecureContent: true,
|
||||
enableRemoteModule: true,
|
||||
sandbox: true,
|
||||
nativeWindowOpen: true
|
||||
}
|
||||
}
|
||||
CiderWin.InitWebServer()
|
||||
if (process.platform === "darwin" || process.platform === "linux") {
|
||||
win = new BrowserWindow(options)
|
||||
} else {
|
||||
const {BrowserWindow} = require("electron-acrylic-window");
|
||||
win = new BrowserWindow(options)
|
||||
}
|
||||
let location = join(__dirname, "../cider-ui-tests/index.html")
|
||||
win.loadFile(location)
|
||||
|
||||
let location = "http://localhost:9000/"
|
||||
win.loadURL(location)
|
||||
win.on("closed", () => {
|
||||
win = null
|
||||
})
|
||||
},
|
||||
SetupHandlers() {
|
||||
async InitWebServer() {
|
||||
const webRemotePort = await getPort({port : 9000});
|
||||
const webapp = express();
|
||||
const webRemotePath = path.join(__dirname, '../cider-ui-tests/');
|
||||
webapp.use(express.static(webRemotePath));
|
||||
webapp.get('/', function (req, res) {
|
||||
res.sendFile(path.join(webRemotePath, 'index.html'));
|
||||
});
|
||||
webapp.listen(webRemotePort, function () {
|
||||
console.log(`Web Remote listening on port ${webRemotePort}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue