With JW Mediaplayer 5 (in SWFTools 3.x) it only works if you include the viral tools when downloading the player (if you uncheck 'Include Viral, a video sharing plugin' when downloading the video doesn't size properly in the player).

That's fine, but I'd like to be able to disable the viral functionality in the UI (settings for JW Mediaplayer 5, maybe).

So, I suppose the request is either:

  1. Be able to use the player without issue when you DONT include the viral plugin
  2. Have a setting in the admin for the module which disables viral

Comments

Rob_Feature’s picture

Title: Disable Viral » JW Media 5: Disable Viral

Updating title to include the player name

Rob_Feature’s picture

Also, fyi, this code doesn't appear to actually work, although I see where you're attempting to work without the viral plugin:

 * Implementation of hook_swftools_methods().
 */
function swftools_jw5_swftools_methods() {

  // Wijering4 now comes in two versions - viral and non-viral - since we now cache the results of this function we can
  // check which is present, testing for the viral one first
  
  // Start with the viral player
  $player = '/player-viral.swf';
  
  // Get the library path
  $library = swftools_get_library('mediaplayer-5');
  
  // Discover if the viral player is present
  if (!file_exists($library . $player)) {
    
    // If not, try the non-viral version
    $player = '/player.swf';
    
    if (!file_exists($library . $player)) {
      
      // If non-viral isn't present either revert to viral for purposes of the download message (since viral is the default)
      $player = '/player-viral.swf';
      
    }
    
  }