Changeset 106487 in spip-zone for _plugins_/soundmanager/sm_pipelines.php


Ignore:
Timestamp:
Oct 2, 2017, 12:38:58 PM (3 years ago)
Author:
booz@…
Message:

surcharge des evenement du player 360 + fichier spécial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/soundmanager/sm_pipelines.php

    r100480 r106487  
    1616                        $page = substr_replace($page, $script, strpos($page, '</head>'), 0);
    1717                }
    18 
     18               
    1919                if(strpos($page, 'class="ui360')  OR strpos($page, "class='ui360") AND $GLOBALS['html']){                                       
    2020                        $script .= "<link rel='stylesheet' href='" . find_in_path('360-player/360player.css') . "' type='text/css' />"."\n";
    2121                        $script .= "<link rel='stylesheet' href='" . find_in_path('360-player/360player-visualization.css') . "' type='text/css' />"."\n";
    22 
     22                       
    2323                        $script .= "\n"."<script type=\"text/javascript\" src=\"" . find_in_path('360-player/script/berniecode-animator.js') . "\"></script>"."\n";
    2424                        $script .= "\n"."<script type=\"text/javascript\" src=\"" . find_in_path('script/soundmanager2.js') . "\"></script>"."\n";
     
    2626                        $script .= "\n". "<!-- special IE-only canvas fix -->" . "\n". "<!--[if IE]><script type=\"text/javascript\" src=\"" . find_in_path('360-player/script/excanvas.js') . "\"></script><![endif]-->"."\n";
    2727                        $script .= "\n"."<script type=\"text/javascript\" src=\"" . find_in_path('360-player/script/360player.js') . "\"></script>"."\n";
    28                
    2928                       
    30 $str = <<<EOD
    31 <script type="text/javascript">
    32 
    33 soundManager.setup({
    34           url: '/plugins/soundmanager/swf/',
    35           flashVersion: 9, // optional: shiny features (default = 8)
    36           useFlashBlock: false, // optionally, enable when you're ready to dive in
    37           debugMode: false
    38 });
    39 
    40 threeSixtyPlayer.config.scaleFont = (navigator.userAgent.match(/msie/i)?false:true);
    41 threeSixtyPlayer.config.showHMSTime = true;
    42 
    43 // enable some spectrum stuffs
    44 
    45 threeSixtyPlayer.config.useWaveformData = true;
    46 threeSixtyPlayer.config.useEQData = true;
    47 
    48 // enable this in SM2 as well, as needed
    49 
    50 if (threeSixtyPlayer.config.useWaveformData) {
    51   soundManager.flash9Options.useWaveformData = true;
    52 }
    53 if (threeSixtyPlayer.config.useEQData) {
    54   soundManager.flash9Options.useEQData = true;
    55 }
    56 if (threeSixtyPlayer.config.usePeakData) {
    57   soundManager.flash9Options.usePeakData = true;
    58 }
    59 
    60 if (threeSixtyPlayer.config.useWaveformData || threeSixtyPlayer.flash9Options.useEQData || threeSixtyPlayer.flash9Options.usePeakData) {
    61   // even if HTML5 supports MP3, prefer flash so the visualization features can be used.
    62   soundManager.preferFlash = true;
    63 }
    64 
    65 </script>
    66 EOD;
    67 
    68                         $script .= "\n" . $str ."\n";
     29                        $script .= "<script type=\"text/javascript\" src=\"" . generer_url_public('player360.js') . "\"></script>"."\n";
    6930                       
    7031                        $page = substr_replace($page, $script, strpos($page, '</head>'), 0);
    7132                }
    72 
    7333        }
    7434        return $page;
    7535}
    76 
    7736
    7837 /**
Note: See TracChangeset for help on using the changeset viewer.