]> git.0d.be Git - panikweb-esperanzah.git/commitdiff
rename DirectStreamPanik to LiveStream and fix Controler spelling
authorFrédéric Péters <fpeters@0d.be>
Thu, 24 Aug 2023 08:22:02 +0000 (10:22 +0200)
committerFrédéric Péters <fpeters@0d.be>
Thu, 24 Aug 2023 08:22:02 +0000 (10:22 +0200)
panikweb_esperanzah/static/css/style.scss
panikweb_esperanzah/static/js/specifics.js
panikweb_esperanzah/templates/includes/player.html

index 6a6134183b2b06ca098936d148bcb429214307ae..cb3284c82355aa4b870fbae95e9b5da3e28631ce 100644 (file)
@@ -524,9 +524,7 @@ button.check:before, a.check:before {
 #player-container .metas{
     float:right;
 }
-#DirectStreamPanikControler {
-}
-#DirectStreamPanikControler div.label {
+#LiveStreamController div.label {
        margin-top: -10px;
 }
 
index 4041542850f0d394aee1cf4adf026490042e3f4b..5d61acb9615df7c4ca19be53e1fa9c82cc567d8a 100644 (file)
@@ -236,14 +236,14 @@ $(function() {
                if (e.type === 'keypress' && !(e.key === ' ' || e.key === 'Enter'))
                        return;
                e.preventDefault();
-               var stream = $('#DirectStreamPanik').get(0);
+               var stream = $('#LiveStream').get(0);
                if (stream.paused == false){
                        if ($(this).find('.player-stop')) {
-                               $('#DirectStreamPanik').trigger('pause');  // icon change
+                               $('#LiveStream').trigger('pause');  // icon change
                                stream.pause();
-                               var par = $('#DirectStreamPanik').parent()
-                               var dup = $('#DirectStreamPanik').clone();
-                               $('#DirectStreamPanik').remove();
+                               var par = $('#LiveStream').parent()
+                               var dup = $('#LiveStream').clone();
+                               $('#LiveStream').remove();
                                $(dup).appendTo($(par));
                                add_stream_handlers();
                        } else {
@@ -259,11 +259,11 @@ $(function() {
        });
 
        function add_stream_handlers() {
-         $('#DirectStreamPanik').on('play',function(){
-               $('audio:not(#DirectStreamPanik)').each(function(){this.pause();});
+         $('#LiveStream').on('play',function(){
+               $('audio:not(#LiveStream)').each(function(){this.pause();});
                $('#streamSymbol').removeClass('player-start').addClass('player-stop');
          }).on('pause',function(){
-               //$('audio:not(#DirectStreamPanik)').each(function(){this.pause();});
+               //$('audio:not(#LiveStream)').each(function(){this.pause();});
                $('#streamSymbol').addClass('player-start').removeClass('player-pause').removeClass('player-stop');
          });
        }
@@ -286,7 +286,7 @@ $(function() {
                        self.controlButtons['playpause'].addClass('resymbol');
                },
                onPlay:function(self){
-                       $('#DirectStreamPanik')[0].pause();
+                       $('#LiveStream')[0].pause();
                },
                onAdd:function(self){
                        //self.isLastAdd[0].scrollIntoView();
index 4cac30718529db2c570e52eee227b76b59a04c44..7c836cfcc4cc3d80f54925e43d661a67ff00b062 100644 (file)
@@ -4,7 +4,7 @@
   <div id="player" class="cf">
     <div id="audioPlayer" class="cf">
       <div id="Live" class="cf">
-        <span class="button" id="DirectStreamPanikControler">
+        <span class="button" id="LiveStreamController">
           <div id="streamSymbol" tabindex="0"
                role="button" class="player-start"
                aria-label="{% trans "Listen to the radio" %}"></div>
@@ -18,7 +18,7 @@
           <span>La radio est ouverte</span>
         </div>
         <audio
-          id="DirectStreamPanik"
+          id="LiveStream"
           preload="none"
           class="hidden"
           tabindex="0"