Skip to content
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #350 from vapormusic/audio-outputs
Browse files Browse the repository at this point in the history
minor visual fix
  • Loading branch information
vapormusic committed Nov 8, 2021
2 parents e936c2d + b44e363 commit 4512b84
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
4 changes: 2 additions & 2 deletions resources/js/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ try {
if (!document.querySelector('#airplayButton') && mediaControlsElement) {
const lyricsButton = document.createElement("div");
lyricsButton.style.height = "22px";
lyricsButton.style.width = "22px";
lyricsButton.style.marginInlineEnd = "22px";
lyricsButton.style.width = "30px";
lyricsButton.style.marginInlineEnd = "12px";
lyricsButton.style.zIndex = "9999";
lyricsButton.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" width: "100%" height: "100%" viewBox: "0 0 30 22" version="1.1" style: "fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421"><path d="M16.811,12.75c0.245,-0.355 0.389,-0.786 0.389,-1.25c0,-1.215 -0.985,-2.2 -2.2,-2.2c-1.215,0 -2.2,0.985 -2.2,2.2c0,0.466 0.145,0.898 0.392,1.254l-0.83,1.047c-0.537,-0.616 -0.862,-1.42 -0.862,-2.301c0,-1.933 1.567,-3.5 3.5,-3.5c1.933,0 3.5,1.567 3.5,3.5c0,0.879 -0.324,1.683 -0.859,2.297l-0.83,-1.047Zm1.271,1.604c0.694,-0.749 1.118,-1.752 1.118,-2.854c0,-2.32 -1.88,-4.2 -4.2,-4.2c-2.32,0 -4.2,1.88 -4.2,4.2c0,1.103 0.425,2.107 1.121,2.857l-0.814,1.028c-0.993,-0.995 -1.607,-2.368 -1.607,-3.885c0,-3.038 2.462,-5.5 5.5,-5.5c3.038,0 5.5,2.462 5.5,5.5c0,1.515 -0.613,2.887 -1.604,3.882l-0.814,-1.028Zm1.252,1.58c1.151,-1.126 1.866,-2.697 1.866,-4.434c0,-3.424 -2.776,-6.2 -6.2,-6.2c-3.424,0 -6.2,2.776 -6.2,6.2c0,1.739 0.716,3.311 1.869,4.437l-0.811,1.023c-1.452,-1.368 -2.358,-3.308 -2.358,-5.46c0,-4.142 3.358,-7.5 7.5,-7.5c4.142,0 7.5,3.358 7.5,7.5c0,2.15 -0.905,4.089 -2.355,5.457l-0.811,-1.023Zm-0.227,2.066l-8.219,0c-0.355,0 -0.515,-0.434 -0.27,-0.717l4.058,-5.12c0.178,-0.217 0.474,-0.217 0.652,0l4.058,5.12c0.237,0.283 0.085,0.717 -0.279,0.717Z" style="fill-rule:nonzero"/></svg>`;
lyricsButton.id = "airplayButton";
Expand Down
20 changes: 15 additions & 5 deletions resources/js/eq.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,9 @@ var AudioOutputs = {
},
OnCreate() {
vm.$mount("#castdevices-vue");
vm.scan();
for (var i = 0; i < 3 ;i++){
setTimeout(()=>{
vm.scan();},3000);
}
vm.scan();
setIntervalX(()=>{
vm.scan();},3000,5);
},
OnClose() {
_vues.destroy(vm);
Expand Down Expand Up @@ -578,4 +576,16 @@ function waitFor(condition, callback) {
}
}

function setIntervalX(callback, delay, repetitions) {
var x = 0;
var intervalID = window.setInterval(function () {

callback();

if (++x === repetitions) {
window.clearInterval(intervalID);
}
}, delay);
}

AudioOutputs.init()

0 comments on commit 4512b84

Please sign in to comment.