]> _ Git - fluidbook-html5.git/commitdiff
wait #4581 @0:20
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 8 Jul 2021 08:54:00 +0000 (10:54 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 8 Jul 2021 08:54:00 +0000 (10:54 +0200)
js/libs/fluidbook/fluidbook.audioplayer.js

index f5694feeb13a623b4ea9b655e3b51ff6e8a05f62..50ffac77f17b7922fb2058a1bb78bf468bab5ca7 100644 (file)
@@ -8,7 +8,6 @@ FluidbookAudioPlayer.prototype = {
         var $this = this;
         $(document).on('click', "audio + .visualPlayer", function () {
             var audio = $(this).prev('audio').get(0);
-            console.log(audio);
             if (audio.paused) {
                 audio.play();
                 $(audio).addClass('playing');
@@ -27,7 +26,7 @@ FluidbookAudioPlayer.prototype = {
     },
 
 
-    initAudios:function() {
+    initAudios: function () {
         var $this = this;
         $('audio.redbull').each(function () {
             $this.initRedbullPlayer(this);
@@ -63,6 +62,10 @@ FluidbookAudioPlayer.prototype = {
 
     initRedbullPlayer: function (player) {
         var vp = $(player).next('.visualPlayer');
+        if($(player).prop('autoplay')){
+            $(player).addClass('playing');
+            $(vp).addClass('playing');
+        }
 
         vp.append('<div class="back"></div>');
         vp.append('<div class="icon play">' + getSpriteIcon('play') + '</div>');