Changeset 417

Show
Ignore:
Timestamp:
08/20/08 08:19:27 (3 months ago)
Author:
082net
Message:

## media-filter ##

Separated some IE object tags from others

Location:
media-filter/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • media-filter/trunk/media-filter.js

    r416 r417  
    44                return; 
    55        var html =  ''; 
     6        var userAgent = navigator.userAgent.toLowerCase(); 
     7        var is_IE = /msie/.test(userAgent) && !/opera/.test(userAgent); 
     8 
    69        switch(type) { 
    710                case 'flv': 
    8                         html = '<object width="'+width+'" height="'+height+'">'; 
    9                         html += '<param name="movie" value="http://www.youtube.com/v/5IWDGmEu0B8&fs=1"><'+'/param>'; 
    10                         html += '<param name="wmode" value="transparent"><'+'/param>'; 
    11                         html += '<param name="allowFullScreen" value="true"><'+'/param>'; 
    12                         html += '<param name="quality" value="high"><'+'/param>'; 
    13                         html += '<embed src="http://www.youtube.com/v/5IWDGmEu0B8&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent" width="'+width+'" height="'+height+'"><'+'/embed>'; 
    14                         html += '<'+'/object>'; 
     11                        html = '<object type="application/x-shockwave-flash" data="'+url+'" '; 
     12                        html += 'width="'+width+'" height="'+height+'">'; 
     13                        if (is_IE) { 
     14                                html += '<param name="classid" value="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" />'; 
     15                                html += '<param name="codebase" value="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" />'; 
     16                                html += '<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />'; 
     17                                html += '<param name="movie" value="'+url+'" />'; 
     18                        } else { 
     19                                html += '<param name="data" value="'+url+'" />'; 
     20                        } 
     21                        html += '<param name="quality" value="high" />'; 
     22                        html += '<param name="wmode" value="transparent" />'; 
     23                        html += '<param name="FlashVars" value="playerMode=embedded" />'; 
     24                        html += '<param name="allowScriptAccess" value="sameDomain" />'; 
     25                        html += 'Browser does not supports flash video<'+'/object>'; 
    1526                break; 
    1627                case 'swf': 
     
    4960                case 'asx': 
    5061                default: 
    51                         html += '<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '; 
    52                         html += 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" '; 
    53                         html += 'standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" '; 
    54                         html += 'width="' + width + '" height="' + width + '">'; 
    55                         html += '<param name="url" value="' + url + '" />'; 
    56                         html += '<param name="allowchangedisplaysize" value="true" />'; 
    57                         html += '<param name="autosize" value="true" />'; 
    58                         html += '<param name="displaysize" value="1" />'; 
    59                         html += '<param name="showcontrols" value="true" />'; 
    60                         html += '<param name="showstatusbar" value="true" />'; 
    61                         html += '<param name="autorewind" value="true" />'; 
    62                         html += '<param name="autostart" value="'+autostart+'" />'; 
    63                         html += '<param name="volume" value="85" />'; 
    64                         html += 'Browser does not supports windows media<'+'/object>'; 
    65 /* 
    66                         var _ua = navigator.userAgent.toLowerCase(); 
    67                         if (/msie/.test(_ua)) 
    68                                 var type_param = 'classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"'; 
     62                        if (is_IE) 
     63                                var type_param = 'classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-ms-wmp"'; 
    6964                        else  
    70                                 var type_param = 'type="application/x-mplayer2"'; 
    71                         html += '<object data="'+url+'" '.type_param.' width="'+width+'" height="'+height+'">'; 
    72                         html += '<param name="src" value="'+url+'" />'; 
    73                         html += '<param name="autostart" value="'+autostart+'" />'; 
    74                         html += 'Browser does not supports windows media<'+'/object>'; 
    75 */ 
     65                                var type_param = 'type="video/x-ms-wmv"'; 
     66                        html += '<object '+type_param+' width="'+width+'" height="'+height+'">'; 
     67                        html += '<param name="URL" value="'+url+'" />'; 
     68                        html += '<param name="AutoStart" value="'+autostart+'" />'; 
     69                        html += '<param name="ShowTracker" value="1" />'; 
     70                        html += '<param name="ShowControls" value="1" />'; 
     71                        html += '<param name="ShowGotoBar" value="0" />'; 
     72                        html += '<param name="ShowDisplay" value="0" />'; 
     73                        html += '<param name="ShowStatusBar" value="0" />'; 
     74                        html += '<param name="AutoSize" value="0" />'; 
     75                        html += '<param name="StretchToFit" value="0" />'; 
     76                        html += '<'+'/object>'; 
    7677                break; 
    7778        } 
  • media-filter/trunk/media-filter.php

    r416 r417  
    2929        // END Options 
    3030        var $preset = array( 
    31                 'd1' => array('url'=>'http://controller.tvpot.media.daum.net/mflvPlayer.swf?vid=', 'w'=>502, 'h'=>399), 
    32                 'd2' => array('url'=>'http://flvs.daum.net/flvPlayer.swf?vid=', 'w'=>502, 'h'=>399), 
    33                 'd3' => array('url'=>'http://flvs.daum.net/sflvPlayer_full.swf?vid=', 'w'=>649, 'h'=>509), 
    34                 'd4' => array('url'=>'http://photo-tvpot.hanmail.net/player/cdn/flvPlayer.swf?video=', 'w'=>502, 'h'=>399), 
     31                'd1' => array('url'=>'http://flvs.daum.net/flvPlayer.swf?vid='), 
     32                'd2' => array('url'=>'http://flvs.daum.net/flvPlayer.swf?vid='), 
     33                'd3' => array('url'=>'http://flvs.daum.net/sflvPlayer_full.swf?vid=', 'w'=>502, 'h'=>399), 
     34                'd4' => array('url'=>'http://photo-tvpot.hanmail.net/player/cdn/flvPlayer.swf?video='), 
    3535                'gv' => array('url'=>'http://video.google.com/googleplayer.swf?docId='), 
    3636                'yt' => array('url'=>'http://www.youtube.com/?fs=1&v='), 
     
    4848        function _filter($content) { 
    4949                if ($this->use_html_tag) 
    50                         $content = preg_replace('#(<p>)?\s*<act(.*?)>(.*?)</act>\s*(</p>)#sie', '$this->get_script(\'$3\', \'$2\');', $content); 
    51                 $content = preg_replace('#(<p>)?\s*\[act(.*?)\](.*?)\[/act\]\s*(</p>)#sie', '$this->get_script(\'$3\', \'$2\');', $content); 
     50                        $content = preg_replace('#(<p>)?\s*<act(.*?)>(.*?)</act>\s*(</p>)?#sie', '$this->get_script(\'$3\', \'$2\');', $content); 
     51                $content = preg_replace('#(<p>)?\s*\[act(.*?)\](.*?)\[/act\]\s*(</p>)?#sie', '$this->get_script(\'$3\', \'$2\');', $content); 
    5252                return $content; 
    5353        }