diff --git a/src/App.vue b/src/App.vue index 716c2c5..1e08f8a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,11 +1,26 @@ + @@ -25,6 +40,8 @@ export default class App extends Vue { private readonly LFO_DEPTH = 33; private readonly LFO_OFFSET = 66; + private names = ["alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta", "iota", "kappa", "lambda", "mu"]; + private urls = Array(this.N_CHANNELS).fill(""); private volumes = Array(this.N_CHANNELS).fill(50); private animateVolumeStart?: Date; private animateVolumeInterval?: number; @@ -33,6 +50,12 @@ export default class App extends Vue { "https://www.youtube.com/watch?v=q76bMs-NwRk", ]; + private mounted() { + this.defaultMedia.forEach((url, idx) => { + this.$set(this.urls, idx, url); + }); + } + private start() { (this.$refs.channels as Channel[]).forEach((channel) => { channel.start(); @@ -66,17 +89,52 @@ html, body { } #app { + font-family: monospace; display: flex; flex-direction: column; align-items: center; + padding: 2rem; +} + + +.channels-wrapper { + display: flex; + width: 80%; } .channels { display: flex; - padding: 2rem; + padding: 0 2rem; } .channel { margin: 0 1rem; } + +.channel-urls { + display: flex; + flex-direction: column; + justify-content: space-between; + width: 100%; +} + +.url-input { + display: flex; + width: 100%; + align-items: center; +} + +.url-input label { + display: inline-block; + width: 64px; + text-align: center; +} + +.url-input input { + flex-grow: 1; +} + +.controls { + padding: 2rem 0; +} diff --git a/src/components/Channel.vue b/src/components/Channel.vue index a54a8d6..fe904a3 100644 --- a/src/components/Channel.vue +++ b/src/components/Channel.vue @@ -5,7 +5,10 @@ -
{{state === "loading" ? "Loading..." : title}}
+
+
{{name}}
+
{{state === "loading" ? "Loading..." : title}}
+
@@ -32,6 +35,7 @@ enum ChannelState { @Component export default class Channel extends Vue { + @Prop() public name: string = "Channel"; @Prop() public volume: number = 50; @Prop() public url: string | undefined; private youtubePlayer?: YouTubePlayer; @@ -155,8 +159,7 @@ export default class Channel extends Vue { flex-direction: column; align-items: center; justify-content: space-between; - font-family: monospace; - font-size: 8px; + font-size: 10px; border: 1px solid black; } @@ -170,7 +173,7 @@ export default class Channel extends Vue { .volume-wrapper { - --height: 200px; + --height: 180px; --width: 30px; height: var(--height); width: var(--width); @@ -186,10 +189,15 @@ export default class Channel extends Vue { transform: rotate(270deg); } +.name { + text-align: center; + font-weight: bold; +} + .title { margin: .25em 1em; display: -webkit-box; - -webkit-line-clamp: 3; + -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-align: left;