Skip to content

Commit

Permalink
Add click/ring sound to passages
Browse files Browse the repository at this point in the history
  • Loading branch information
gerdesque committed Jan 16, 2024
1 parent df6b4ee commit 189fc73
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
10 changes: 0 additions & 10 deletions dist/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ const cacheName = "ghosthunt-v0.3.3";
const urlsToCacheiOS = [
'/',
'/index.html',
'/audio/1.hotspot.ghost.mp3',
'/audio/2.hotspot.ghost.mp3',
'/audio/click.mp3',
'/audio/ring.mp3',
'/audio/setup.camera.mp3',
'/data/locations.js',
'/data/mapbox.js',
'/data/riddles.js',
Expand Down Expand Up @@ -84,11 +79,6 @@ const urlsToCacheiOS = [
const urlsToCacheAndroid = [
'/',
'/index.html',
'/audio/1.hotspot.ghost.mp3',
'/audio/2.hotspot.ghost.mp3',
'/audio/click.mp3',
'/audio/ring.mp3',
'/audio/setup.camera.mp3',
'/data/locations.js',
'/data/mapbox.js',
'/data/riddles.js',
Expand Down
17 changes: 16 additions & 1 deletion index.twee
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ Spuk & Schreck
<<cacheaudio "click" "audio/click.mp3">>
<<cacheaudio "ring" "audio/ring.mp3">>

<<script>>
postdisplay["setupAudioOnClick"] = function () {
const trackId = "click";

$("#story").find("a.link-internal,button.link-internal")
.on("click", function () {
new Wikifier(null, '<<audio "' + trackId + '" play>>');
});
};
<</script>>

-------------------------STARTVARIABLEN-------------------------------
<<set $hotspot to 0>>

Expand Down Expand Up @@ -629,6 +640,7 @@ $(document).one(":passagedisplay", function() {
</div>

:: intro.2 {"position":"700,900","size":"100,100"}
<<audio ":playing:" stop>>

<<video noHotspot>>

Expand All @@ -639,6 +651,7 @@ $(document).one(":passagedisplay", function() {
</div>

:: intro.3 {"position":"700,1100","size":"100,100"}
<<audio "ring" play loop>>

<script>
$('#story').attr('style', 'background-image:url(images/intro.3.jpg)');
Expand All @@ -657,6 +670,7 @@ $(document).one(":passagedisplay", function() {
</div>

:: intro.4 {"position":"700,1300","size":"100,100"}
<<audio ":playing:" stop>>

<<video noHotspot>>

Expand Down Expand Up @@ -965,6 +979,7 @@ $(document).one(":passagedisplay", function() {
</div>

:: hotspot.splash {"position":"900,900","size":"100,100"}
<<audio "ring" play loop>>

<<script>>
$('#story').attr('style', `background-image:url(images/hotspot.splash.jpg)`);
Expand All @@ -982,7 +997,7 @@ $(document).one(":passagedisplay", function() {
</div>

:: hotspot.intro {"position":"1300,1700","size":"100,100"}

<<audio ":playing" stop>>
<<video>>

<div class="btn-group">
Expand Down

0 comments on commit 189fc73

Please sign in to comment.