Development

Changeset 25903

You must first sign up to be able to contribute.

Changeset 25903

Show
Ignore:
Timestamp:
12/25/09 16:58:16 (3 years ago)
Author:
ornicar2
Message:

[Diem][dmFlowPlayer] fixed bug in dmWidgetContentFlowPlayerView when a flash media has a splash

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/dmFlowPlayerPlugin/README

    r25901 r25903  
    22================= 
    33 
    4 The `dmFlowPlayerPlugin` allow to read video, sound and flash media
     4The `dmFlowPlayerPlugin` allows to read video, sound and flash medias
    55It packages a Diem front widget, and extends the £media capabilities. 
    6 The plugin is fully extensible. Only works with Diem 5.0 installed. 
     6The plugin is fully extensible. Only works with [Diem 5.0](http://diem-project.org/) installed. 
    77 
    88Documentation 
  • plugins/dmFlowPlayerPlugin/lib/dmWidget/dmWidgetContentFlowPlayerView.php

    r25901 r25903  
    2121    $vars['mediaTag']->addClass('dm_widget_content_flow_player'); 
    2222     
    23     if ($vars['splashMediaId']
     23    if ($vars['mediaTag'] instanceof dmMediaTagFlowPlayerPlayable
    2424    { 
    25       $splashMedia = dmDb::table('DmMedia')->findOneByIdWithFolder($vars['splashMediaId']); 
    26        
    27       if (!$splashMedia instanceof DmMedia) 
     25      if ($vars['splashMediaId']) 
    2826      { 
    29         throw new dmException('No DmMedia found for media id : '.$vars['splashMediaId']); 
     27        $splashMedia = dmDb::table('DmMedia')->findOneByIdWithFolder($vars['splashMediaId']); 
     28         
     29        if (!$splashMedia instanceof DmMedia) 
     30        { 
     31          throw new dmException('No DmMedia found for media id : '.$vars['splashMediaId']); 
     32        } 
     33         
     34        $splashTag = $this->context->getHelper()->£media($splashMedia) 
     35        ->alt($vars['splashAlt']); 
     36         
     37        $vars['mediaTag']->splash($splashTag); 
    3038      } 
    3139       
    32       $splashTag = $this->context->getHelper()->£media($splashMedia) 
    33       ->alt($vars['splashAlt']); 
    34        
    35       $vars['mediaTag']->splash($splashTag); 
    36     } 
    37      
    38     if ($vars['mediaTag'] instanceof dmMediaTagFlowPlayerPlayable) 
    39     { 
    4040      $vars['mediaTag']->autoplay($vars['autoplay']) 
    4141      ->method($vars['method'])