You are here

function theme_soundmanager2_config_ui360_pause in SoundManager2 7.2

Theme function for overriding the UI 360 player configuration for pause/stop.

1 theme call to theme_soundmanager2_config_ui360_pause()
soundmanager2_field_formatter_view in ./soundmanager2.module
Implements hook_field_formatter_view().

File

./soundmanager2.module, line 634
Responsible for managing the required SWF and JS files for soundmanager2 to work

Code

function theme_soundmanager2_config_ui360_pause() {
  drupal_add_css('.ui360 .sm2-360ui.sm2_playing .sm2-360btn:hover, .ui360 .sm2-360btn-playing:hover { background:transparent url(/' . drupal_get_path('module', 'soundmanager2') . '/images/360-button-stop.png) no-repeat 50% 50%; _background:transparent url(/' . drupal_get_path('module', 'soundmanager2') . '/images/360-button-stop.gif) no-repeat 50% 50%; }', array(
    'type' => 'inline',
    'scope' => 'header',
  ));
  $data = "threeSixtyPlayer.css = {sDefault: 'sm2_link', sBuffering: 'sm2_buffering', sPlaying: 'sm2_playing', sPaused: 'sm2_link'}; ";
  $data .= "threeSixtyPlayer.events.stop = function() { threeSixtyPlayer.removeClass(this._360data.oUIBox,this._360data.className); this._360data.className = ''; threeSixtyPlayer.stopSound(this); threeSixtyPlayer.fanIn(this);}; ";
  $data .= "threeSixtyPlayer.events.pause = function() { threeSixtyPlayer.removeClass(this._360data.oUIBox,this._360data.className); this._360data.className = ''; threeSixtyPlayer.stopSound(this); threeSixtyPlayer.fanIn(this);}; ";
  $data .= "threeSixtyPlayer.events.resume = function() { threeSixtyPlayer.removeClass(this._360data.oUIBox,this._360data.className); this._360data.className = threeSixtyPlayer.css.sPlaying; threeSixtyPlayer.addClass(this._360data.oUIBox,this._360data.className); threeSixtyPlayer.fanOut(this);}; ";
  drupal_add_js($data, array(
    'type' => 'inline',
    'scope' => 'footer',
  ));
}