Browse Source

Logiciel: Evolution #787: Lecture auto: soundcloud

Bastien Sevajol 11 years ago
parent
commit
672222c918

+ 4 - 5
src/Muzich/CoreBundle/Resources/public/js/player/SoundCloudPlayer.js View File

30
     }
30
     }
31
     else
31
     else
32
     {
32
     {
33
-      // On gère la lecture auto difframment: rappel: si on supprime une iframe l'api SC ne la trouve plus et bug
34
-      $('#autoplay').append('<iframe id="'+_iframe_id+'" src="http://w.soundcloud.com/player/?url='
33
+      $('#autoplay_player_soundcloud').append('<iframe id="'+_iframe_id+'" src="http://w.soundcloud.com/player/?url='
35
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
34
         +_ref_id+'&show_artwork=false&auto_play=true" width="100%" '
36
         +'height="350" scrolling="no" frameborder="no"></iframe>');
35
         +'height="350" scrolling="no" frameborder="no"></iframe>');
37
     }
36
     }
93
   
92
   
94
   this.destroy = function(force)
93
   this.destroy = function(force)
95
   {
94
   {
96
-    if (_player)
95
+    if (_player && !_autoplay)
97
     {
96
     {
98
-      _player.pause();
97
+      _object_for_player.html('');
99
     }
98
     }
100
     if (_autoplay || force)
99
     if (_autoplay || force)
101
     {
100
     {
102
-      $('#'+_iframe_id).hide();
101
+      $('#autoplay_player_soundcloud').html('');
103
     }
102
     }
104
   }
103
   }
105
   
104