Changeset 419 for media-filter

Show
Ignore:
Timestamp:
08/20/08 08:41:53 (5 months ago)
Author:
082net
Message:

## media-filter ##

Fixed YouTube? error.

Location:
media-filter/trunk
Files:
2 modified

Legend:

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

    r417 r419  
    44                return; 
    55        var html =  ''; 
     6//      url = decodeURIComponent(url); 
    67        var userAgent = navigator.userAgent.toLowerCase(); 
    78        var is_IE = /msie/.test(userAgent) && !/opera/.test(userAgent); 
     
    910        switch(type) { 
    1011                case 'flv': 
    11                         html = '<object type="application/x-shockwave-flash" data="'+url+'" '; 
    12                         html += 'width="'+width+'" height="'+height+'">'; 
     12/*                      html += '<object type="application/x-shockwave-flash" data="'+url+'" width="'+width+'" height="'+height+'">'; 
    1313                        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+'" />'; 
     14                                html += '<param name="classid" value="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><'+'/param>'; 
     15                                html += '<param name="codebase" value="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"><'+'/param>'; 
     16                                html += '<param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer"><'+'/param>'; 
     17                                html += '<param name="movie" value="'+url+'"><'+'/param>'; 
    2018                        } 
    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>'; 
     19                        html += '<param name="quality" value="high"><'+'/param>'; 
     20                        html += '<param name="wmode" value="transparent"><'+'/param>'; 
     21                        html += '<param name="FlashVars" value="playerMode=embedded"><'+'/param>'; 
     22                        html += '<param name="allowScriptAccess" value="sameDomain"><'+'/param>'; 
     23                        html += '<param name="allowfullscreen" value="true"><'+'/param>'; 
     24                        html += 'Browser does not supports flash video<'+'/object>';*/ 
     25                        html += '<object width="'+width+'" height="'+height+'">'; 
     26                        html += '<param name="movie" value="'+url+'"><'+'/param>'; 
     27                        html += '<param name="allowFullScreen" value="true"><'+'/param>'; 
     28                        html += '<embed src="'+url+'" type="application/x-shockwave-flash" allowfullscreen="true" width="'+width+'" height="'+height+'"><'+'/embed>'; 
     29                        html += '<'+'/object>'; 
    2630                break; 
    2731                case 'swf': 
    2832                        html += '<object type="application/x-shockwave-flash" data="'+url+'" '; 
    2933                        html += 'width="'+width+'" height="'+height+'">'; 
    30                         html += '<param name="movie" value="'+url+'" />'; 
    31                         html += '<param name="allowScriptAcess" value="sameDomain" />'; 
    32                         html += '<param name="quality" value="best" />'; 
    33                         html += '<param name="wmode" value="opaque" />'; 
     34                        html += '<param name="movie" value="'+url+'"><'+'/param>'; 
     35                        html += '<param name="allowScriptAcess" value="sameDomain"><'+'/param>'; 
     36                        html += '<param name="quality" value="best"><'+'/param>'; 
     37                        html += '<param name="wmode" value="opaque"><'+'/param>'; 
    3438                        html += 'Browser does not supports flash movie<'+'/object>'; 
    3539                break; 
     
    3842                case 'sdp': 
    3943                        html += '<object type="video/quicktime" data="'+url+'" width="'+width+'" height="'+height+'">'; 
    40                         html += '<param name="src" value="'+url+'" />'; 
    41                         html += '<param name="controller" value="true" />'; 
    42                         html += '<param name="autostart" value="'+autostart+'" />'; 
     44                        html += '<param name="src" value="'+url+'"><'+'/param>'; 
     45                        html += '<param name="controller" value="true"><'+'/param>'; 
     46                        html += '<param name="autostart" value="'+autostart+'"><'+'/param>'; 
    4347                        html += 'Browser does not supports quicktime movie<'+'/object>'; 
    4448                break; 
     
    5054                        html += '<object type="audio/x-pn-realaudio-plugin" data="'+url+'" '; 
    5155                        html += 'width="'+width+'" height="'+height+'">'; 
    52                         html += '<param name="movie" value="'+url+'" />'; 
    53                         html += '<param name="controls" value="Imagewindow" />'; 
    54                         html += '<param name="console" value="clip'+Math.random()+'" />'; 
    55                         html += '<param name="autostart" value="'+autostart+'" />'; 
     56                        html += '<param name="movie" value="'+url+'"><'+'/param>'; 
     57                        html += '<param name="controls" value="Imagewindow"><'+'/param>'; 
     58                        html += '<param name="console" value="clip'+Math.random()+'"><'+'/param>'; 
     59                        html += '<param name="autostart" value="'+autostart+'"><'+'/param>'; 
    5660                        html += 'Browser does not supports realmedia<'+'/object>'; 
    5761                break; 
     
    6569                                var type_param = 'type="video/x-ms-wmv"'; 
    6670                        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" />'; 
     71                        html += '<param name="URL" value="'+url+'"><'+'/param>'; 
     72                        html += '<param name="AutoStart" value="'+autostart+'"><'+'/param>'; 
     73                        html += '<param name="ShowTracker" value="1"><'+'/param>'; 
     74                        html += '<param name="ShowControls" value="1"><'+'/param>'; 
     75                        html += '<param name="ShowGotoBar" value="0"><'+'/param>'; 
     76                        html += '<param name="ShowDisplay" value="0"><'+'/param>'; 
     77                        html += '<param name="ShowStatusBar" value="0"><'+'/param>'; 
     78                        html += '<param name="AutoSize" value="0"><'+'/param>'; 
     79                        html += '<param name="StretchToFit" value="0"><'+'/param>'; 
    7680                        html += '<'+'/object>'; 
    7781                break; 
  • media-filter/trunk/media-filter.php

    r418 r419  
    44Plugin URI: http://082net.com/tag/media-filter 
    55Description: 글 작성시 동영상 삽입을 쉽게 할 수있도록 도와주는 플러그인 입니다. GoogleVideo, YouTube, Mncast, Daum(tvpot) 등의 FLV 동영상을 지원하며, 일반적인 동영상(wmv, mov, swf 등)의 삽입도 지원합니다. 이 플러그인은 <a href="http://www.coolcode.cn/?p=100">coolplayer</a> v3.5 에 기반을 두고 있습니다. 자세한 사용법은 플러그인페이지를 참고하세요. 
    6 Version: 0.4 
     6Version: 0.41 
    77Author: Cheon, Yong-Min 
    88Author URI: http://082net.com/ 
     
    2020        // START Options 
    2121 
    22         var $version = '0.4'; 
     22        var $version = '0.41'; 
    2323        var $base, $baseurl; 
    2424        var $width = 425;        // 플레이어 너비 기본값 
     
    3434                'd4' => array('url'=>'http://photo-tvpot.hanmail.net/player/cdn/flvPlayer.swf?video='), 
    3535                'gv' => array('url'=>'http://video.google.com/googleplayer.swf?docId='), 
    36                 'yt' => array('url'=>'http://www.youtube.com/?fs=1&v='), 
     36                'yt' => array('url'=>'http://www.youtube.com/v/'), 
    3737                'mnc' =>array('url'=>'http://dory.mncast.com/mncHMovie.swf?movieID=', 'w'=>420, 'h'=>374), 
    3838                'tagstory' => array('url'=>'http://play.tagstory.com/player/TS00@'), 
     
    7878                if ('' != $type && isset($this->preset[$type])) { 
    7979                                $url = $this->preset[$type]['url'].$url; 
     80                                $url .= $type == 'yt' ? '&fs=1' : ''; 
    8081                                if ( isset($this->preset[$type]['w']) && isset($this->preset[$type]['h']) ) { 
    8182                                        $wh = true; $width = $this->preset[$type]['w']; $height = $this->preset[$type]['h'];