|
@@ -38,7 +38,8 @@
|
38
|
38
|
var scrollAmount = window.innerHeight / 7; // Amount to scroll per interval
|
39
|
39
|
|
40
|
40
|
function playAudio() {
|
41
|
|
- if (!hasPlayed && scrollCount >= maxScrolls) {
|
|
41
|
+ if (!hasPlayed) {
|
|
42
|
+ console.log('play')
|
42
|
43
|
var playPromise = audioElement.play();
|
43
|
44
|
|
44
|
45
|
if (playPromise !== undefined) {
|
|
@@ -55,6 +56,7 @@
|
55
|
56
|
|
56
|
57
|
function smoothScroll() {
|
57
|
58
|
if (!hasPlayed) {
|
|
59
|
+ playAudio();
|
58
|
60
|
scrollCount++;
|
59
|
61
|
if (scrollCount >= maxScrolls) {
|
60
|
62
|
playAudio();
|
|
@@ -67,6 +69,7 @@
|
67
|
69
|
|
68
|
70
|
function playOnly() {
|
69
|
71
|
if (!hasPlayed) {
|
|
72
|
+ playAudio();
|
70
|
73
|
scrollCount++;
|
71
|
74
|
if (scrollCount >= maxScrolls) {
|
72
|
75
|
playAudio();
|