2 Incheckningar

Upphovsman SHA1 Meddelande Datum
  Amirul Anwar a975c2323c Merge branch 'master' of https://git.mirfalah.my/mirfalah-tech/digital-card 4 månader sedan
  Amirul Anwar b3b13f9dcc instant play 4 månader sedan
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4
    1
      resources/views/digital-card.blade.php

+ 4
- 1
resources/views/digital-card.blade.php Visa fil

@@ -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();

Laddar…
Avbryt
Spara