uptest
This commit is contained in:
parent
c9a5fc546f
commit
3e728848d7
7 changed files with 68 additions and 2 deletions
|
@ -39,7 +39,7 @@
|
||||||
"@sentry/electron": "^3.0.7",
|
"@sentry/electron": "^3.0.7",
|
||||||
"@sentry/integrations": "^6.19.6",
|
"@sentry/integrations": "^6.19.6",
|
||||||
"adm-zip": "0.4.10",
|
"adm-zip": "0.4.10",
|
||||||
"airtunes2": "git+https://github.com/vapormusic/node_airtunes2.git",
|
"airtunes2": "git+https://github.com/vapormusic/node_airtunes2.git#hap",
|
||||||
"castv2-client": "^1.2.0",
|
"castv2-client": "^1.2.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"discord-rpc": "^4.0.1",
|
"discord-rpc": "^4.0.1",
|
||||||
|
|
|
@ -95,6 +95,7 @@ export class BrowserWindow {
|
||||||
"components/fullscreen",
|
"components/fullscreen",
|
||||||
"components/miniplayer",
|
"components/miniplayer",
|
||||||
"components/castmenu",
|
"components/castmenu",
|
||||||
|
"components/airplay-modal",
|
||||||
"components/artist-chip",
|
"components/artist-chip",
|
||||||
"components/hello-world",
|
"components/hello-world",
|
||||||
"components/inline-collection-list",
|
"components/inline-collection-list",
|
||||||
|
|
|
@ -178,6 +178,12 @@ export default class RAOP {
|
||||||
this._win.webContents.setAudioMuted(true);
|
this._win.webContents.setAudioMuted(true);
|
||||||
this._win.webContents.executeJavaScript(`CiderAudio.sendAudio()`).catch((err: any) => console.error(err));
|
this._win.webContents.executeJavaScript(`CiderAudio.sendAudio()`).catch((err: any) => console.error(err));
|
||||||
}
|
}
|
||||||
|
if (status == "need_password"){
|
||||||
|
this._win.webContents.executeJavaScript(`app.setAirPlayCodeUI()`)
|
||||||
|
}
|
||||||
|
if (status == "pair_success"){
|
||||||
|
this._win.webContents.executeJavaScript(`app.sendAirPlaySuccess()`)
|
||||||
|
}
|
||||||
if (status == 'stopped') {
|
if (status == 'stopped') {
|
||||||
this.airtunes.stopAll(() => {
|
this.airtunes.stopAll(() => {
|
||||||
console.log('end');
|
console.log('end');
|
||||||
|
@ -210,6 +216,12 @@ export default class RAOP {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
electron.ipcMain.on('setAirPlayPasscode', (event, passcode) => {
|
||||||
|
if (this.device){
|
||||||
|
this.device.setPasscode(passcode)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
electron.ipcMain.on('writeWAV', (event, leftbuffer, rightbuffer) => {
|
electron.ipcMain.on('writeWAV', (event, leftbuffer, rightbuffer) => {
|
||||||
if (this.airtunes != null) {
|
if (this.airtunes != null) {
|
||||||
if (this.worker == null) {
|
if (this.worker == null) {
|
||||||
|
|
|
@ -70,10 +70,11 @@
|
||||||
|
|
||||||
.spatialproperties-panel {
|
.spatialproperties-panel {
|
||||||
.modal-window {
|
.modal-window {
|
||||||
|
&:not(.airplay-modal){
|
||||||
height : 700px;
|
height : 700px;
|
||||||
max-height: 700px;
|
max-height: 700px;
|
||||||
width : 800px;
|
width : 800px;
|
||||||
max-width : 800px;
|
max-width : 800px;}
|
||||||
overflow : hidden;
|
overflow : hidden;
|
||||||
|
|
||||||
.info-header {
|
.info-header {
|
||||||
|
|
|
@ -207,6 +207,7 @@ const app = new Vue({
|
||||||
showPlaylist: false,
|
showPlaylist: false,
|
||||||
castMenu: false,
|
castMenu: false,
|
||||||
moreInfo: false,
|
moreInfo: false,
|
||||||
|
airplayPW: false,
|
||||||
},
|
},
|
||||||
socialBadges: {
|
socialBadges: {
|
||||||
badgeMap: {},
|
badgeMap: {},
|
||||||
|
@ -3836,6 +3837,12 @@ const app = new Vue({
|
||||||
|
|
||||||
// tracks are found in relationship.data
|
// tracks are found in relationship.data
|
||||||
},
|
},
|
||||||
|
setAirPlayCodeUI() {
|
||||||
|
this.modals.airplayPW = true
|
||||||
|
},
|
||||||
|
sendAirPlaySuccess(){
|
||||||
|
notyf.success('Device paired successfully!');
|
||||||
|
},
|
||||||
windowFocus(val) {
|
windowFocus(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
document.querySelectorAll(".animated-artwork-video").forEach(el => {
|
document.querySelectorAll(".animated-artwork-video").forEach(el => {
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
<transition name="modal">
|
<transition name="modal">
|
||||||
<castmenu v-if="modals.castMenu"></castmenu>
|
<castmenu v-if="modals.castMenu"></castmenu>
|
||||||
</transition>
|
</transition>
|
||||||
|
<transition name="modal">
|
||||||
|
<airplay-modal v-if="modals.airplayPW"></airplay-modal>
|
||||||
|
</transition>
|
||||||
<transition name="modal">
|
<transition name="modal">
|
||||||
<plugin-menu v-if="modals.pluginMenu"></plugin-menu>
|
<plugin-menu v-if="modals.pluginMenu"></plugin-menu>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
42
src/renderer/views/components/airplay-modal.ejs
Normal file
42
src/renderer/views/components/airplay-modal.ejs
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<script type="text/x-template" id="airplay-modal">
|
||||||
|
<div class="spatialproperties-panel castmenu modal-fullscreen airplay-modal" @click.self="close()" @contextmenu.self="close()">
|
||||||
|
<div class="modal-window airplay-modal">
|
||||||
|
<div class="modal-header">
|
||||||
|
<div class="modal-title">{{'Enter password'}}</div>
|
||||||
|
<button class="close-btn" @click="close()"></button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-content" style="overflow-y: overlay; padding: 3%">
|
||||||
|
<input type="text" v-model="passcode"/>
|
||||||
|
</div>
|
||||||
|
<div class="md-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col" >
|
||||||
|
<button style="width:100%" @click="enterPassword()" class="md-btn md-btn-block md-btn-primary">{{'OK'}}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
Vue.component('airplay-modal', {
|
||||||
|
template: '#airplay-modal',
|
||||||
|
data: function () {
|
||||||
|
return {
|
||||||
|
passcode: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.$root.modals.airplayPW = false
|
||||||
|
},
|
||||||
|
enterPassword() {
|
||||||
|
console.log('Entered passCode: ', this.passcode)
|
||||||
|
ipcRenderer.send("setAirPlayPasscode",this.passcode)
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
Loading…
Add table
Add a link
Reference in a new issue