From 9534973faab455f52e3a6e1dfee5f3d889d3cfc6 Mon Sep 17 00:00:00 2001 From: marcsello Date: Mon, 14 Jun 2021 23:28:57 +0200 Subject: [PATCH] Some minor fixes --- public/index.html | 21 +++++++++++---------- src/views/Home.vue | 17 ++++++++++++++++- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/public/index.html b/public/index.html index 3e5a139..c1b863c 100644 --- a/public/index.html +++ b/public/index.html @@ -1,17 +1,18 @@ - + - + <%= htmlWebpackPlugin.options.title %> - - - -
- - + + + +
+ + diff --git a/src/views/Home.vue b/src/views/Home.vue index d1c1b3d..aeb6586 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -29,7 +29,8 @@ export default { bgSound: null, soundsLoaded: 0, errorText: null, - columnWidth: 6 + columnWidth: 6, + fullscreenRequested: false } }, computed: { @@ -40,6 +41,20 @@ export default { methods: { play(sampleId) { + if (!this.fullscreenRequested) { + const elem = document.documentElement + + if (elem.requestFullscreen) { + elem.requestFullscreen(); + } else if (elem.webkitRequestFullscreen) { /* Safari */ + elem.webkitRequestFullscreen(); + } else if (elem.msRequestFullscreen) { /* IE11 */ + elem.msRequestFullscreen(); + } + + this.fullscreenRequested = true + } + const sample = this.availableSounds[sampleId].howl if (sample.playing()) {