Changeset 1940


Ignore:
Timestamp:
08/06/11 13:15:03 (22 months ago)
Author:
jeroen
Message:

wrapped up tests and Flash version of related plugin

Location:
plugins/related
Files:
2 added
14 edited

Legend:

Unmodified
Added
Removed
  • plugins/related/doc/guide.html

    r1937 r1940  
    2828<p>The Related plugin for the JW Player presents a screen with related videos to your viewers. This screen is shown when a video is completed or when a viewer presses the <em>related</em> button. Upon clicking a related video, the viewer is redirected to the page with that video, improving user engagement and advertising opportunities.</p> 
    2929 
    30 <p><img alt="Related Example Player" src="assets/related_example.png" style="margin-left: 60px" /></p> 
     30<p><img alt="Related Example Player" src="assets/related_example.png" style="margin-left: 10px" /></p> 
    3131 
    32 <p>The list of related videos is loaded using an mRSS feed. The plugin automatically renders as many related videos as fit the screen. Navigation buttons for displaying even more related videos are not shown.</p> 
     32<p>The list of related videos is loaded using an mRSS feed. The plugin automatically renders up t0 2 rows of up to 5 related videos, depending upon how many fit the screen. Buttons for re-playing the video and for closing the overlay are shown in the top corners.</p> 
    3333 
    3434<p>The plugin works in both Flash and HTML5, including touch devices like the iPad/iPhone and Android.  When using a playlist, every entry can have its own related videos.</p> 
  • plugins/related/src/as/Related.as

    r1938 r1940  
    1212    import flash.net.*; 
    1313    import flash.text.*; 
     14    import flash.utils.setTimeout; 
    1415 
    1516 
     
    2324        [Embed(source="../../assets/sheet.png")] 
    2425        private const BackSheet:Class; 
     26        [Embed(source="../../assets/replay.png")] 
     27        private const ReplayButton:Class; 
     28        [Embed(source="../../assets/close.png")] 
     29        private const CloseButton:Class; 
    2530 
    2631 
     
    4752        /** Reference to the player. **/ 
    4853        private var _player:IPlayer; 
     54        /** Reference to the replay button. **/ 
     55        private var _replay:Sprite; 
     56        /** Reference to the close button. **/ 
     57        private var _close:Sprite; 
    4958 
    5059 
     
    5564        /** Display the related items on complete. **/ 
    5665        private function _completeHandler(evt:MediaEvent):void {  
    57             if(_config.oncomplete !== false) { show(); } 
     66            if(_config.oncomplete !== false) { 
     67                setTimeout(show,50); 
     68            } 
    5869        }; 
    5970 
     
    7889        public function hide():void { 
    7990            _back.visible = false; 
     91            _replay.visible = false; 
     92            _close.visible = false; 
    8093            _grid.visible = false; 
    8194            _heading.visible = false; 
    8295            // Only 5.7+... 
    83             try { (_player.controls.display as Object).show(); } catch (error:Error) {} 
     96            try { 
     97                (_player.controls.display as Object).show(); 
     98                (_player.controls.dock as Object).show(); 
     99            } catch (error:Error) {} 
    84100        }; 
    85101 
     
    108124            // Add the background sheet. 
    109125            _back = new Sprite(); 
    110             _back.visible = false; 
    111126            _back.buttonMode = true; 
    112127            _back.addChild(new BackSheet()); 
    113128            _back.addEventListener(MouseEvent.CLICK,_backHandler); 
    114129            addChild(_back); 
     130            // Add the replay and close buttons. 
     131            _replay = new Sprite(); 
     132            _replay.buttonMode = true; 
     133            _replay.addChild(new ReplayButton()); 
     134            _replay.addEventListener(MouseEvent.CLICK,_replayHandler); 
     135            addChild(_replay); 
     136            _close = new Sprite(); 
     137            _close.buttonMode = true; 
     138            _close.addChild(new CloseButton()); 
     139            _close.addEventListener(MouseEvent.CLICK,_backHandler); 
     140            addChild(_close); 
    115141            // Add the text heading. 
    116142            _heading = new TextField(); 
    117143            _heading.height = 30; 
    118             _heading.defaultTextFormat = new TextFormat('Arial', 16, 0xFFFFFF, true); 
     144            _heading.defaultTextFormat = new TextFormat('Arial', 16, 0xFFFFFF); 
    119145            _heading.autoSize = 'center'; 
    120146            _heading.multiline = false; 
    121147            _heading.selectable = false; 
    122             _heading.filters = new Array(new DropShadowFilter(2,45,0,1,1,1,1)); 
     148            _heading.filters = new Array(new DropShadowFilter(1,45,0,1,1,1,1)); 
    123149            if(_config.heading) { 
    124150                _heading.htmlText = _config.heading; 
     
    130156            _grid = new Sprite(); 
    131157            addChild(_grid); 
    132             // Hide the graphics on startup. 
    133             hide(); 
    134158        }; 
    135159 
     
    139163            // Reset old data 
    140164            _file = undefined; 
     165            while(_grid.numChildren > 0) { 
     166                _grid.removeChildAt(0); 
     167            } 
     168            hide(); 
    141169            // Check for new file 
    142170            if(_player.playlist.currentItem['related.file']) { 
     
    166194            var related:Array = new Array(); 
    167195            for (var i:Number = 0; i < rss.length; i++) { 
    168                 if(rss[i].title && rss[i].image && rss[i].link) {  
     196                if(rss[i].image && rss[i].link) { 
    169197                    related.push(rss[i]); 
    170198                } 
    171199            } 
    172200            if(related.length) { 
    173                 Logger.log("Found "+related.length+" related videos",id); 
    174                 for(var j:Number = 0; j < related.length; j++) {  
    175                     var thumb:RelatedThumb = new RelatedThumb(related[j].image,related[j].link,related[j].title); 
    176                     thumb.x = 130*j; 
     201                var col:Number = 0; 
     202                var row:Number = 0; 
     203                for(var j:Number = 0; j < related.length; j++) { 
     204                    var thumb:RelatedThumb = new RelatedThumb( 
     205                        _dimensions[0], 
     206                        _dimensions[1], 
     207                        related[j].image, 
     208                        related[j].link, 
     209                        related[j].title 
     210                    ); 
     211                    thumb.x = (_dimensions[0]+10) * col; 
     212                    thumb.y = (_dimensions[1]+10) * row; 
    177213                    _grid.addChild(thumb); 
    178                     resize(_back.width,_back.height); 
    179                 } 
     214                    if(col == _dimensions[2]-1) { 
     215                        if(row == _dimensions[3]-1) { 
     216                            break; 
     217                        } else { 
     218                            row++; 
     219                            col = 0; 
     220                        } 
     221                    } else { 
     222                        col++; 
     223                    } 
     224                } 
     225                resize(_back.width,_back.height); 
    180226            } else { 
    181227                _errorHandler(new ErrorEvent(ErrorEvent.ERROR,false,false, 
     
    185231 
    186232 
     233        /** The replay button was clicked. **/ 
     234        private function _replayHandler(evt:MouseEvent):void {  
     235            hide(); 
     236            _player.seek(0); 
     237        }; 
     238 
     239 
    187240        /** Reposition the screens when the player resizes itself **/ 
    188241        public function resize(width:Number, height:Number):void { 
     242            // Do regular resize stuff 
    189243            _back.width = width; 
    190244            _back.height = height; 
     245            _close.x = width - 50; 
    191246            _grid.x = Math.round(width/2 - _grid.width/2); 
    192247            _grid.y = Math.round(height/2 - _grid.height/2) + 10; 
    193248            _heading.y = _grid.y - 30; 
    194249            _heading.x = Math.round(width/2 - _heading.width/2); 
    195             _dimensions = new Array( 
    196                 Math.floor(width/130), 
    197                 Math.floor((height-30)/90) 
    198             ); 
     250            // Determinie thumb grid dimensions on first resize. 
     251            if(!_dimensions) { 
     252                if (width >= 600) { 
     253                    _dimensions = new Array( 
     254                        160, 
     255                        90, 
     256                        Math.min(Math.floor(width/170),5), 
     257                        Math.min(Math.floor((height-40)/100),2) 
     258                    ); 
     259                } else { 
     260                    _dimensions = new Array( 
     261                        120, 
     262                        70, 
     263                        Math.min(Math.floor(width/130),5), 
     264                        Math.min(Math.floor((height-40)/80),2) 
     265                    ); 
     266                } 
     267            } 
    199268        }; 
    200269 
     
    204273            if(_file) { 
    205274                _back.visible = true; 
     275                _replay.visible = true; 
     276                _close.visible = true; 
    206277                _grid.visible = true; 
    207278                _heading.visible = true; 
     279                _player.pause(); 
    208280                // Only 5.7+... 
    209                 try { (_player.controls.display as Object).hide(); } catch (error:Error) {} 
     281                try { 
     282                    (_player.controls.display as Object).hide(); 
     283                    (_player.controls.dock as Object).hide(); 
     284                } catch (error:Error) {} 
    210285            } 
    211286        }; 
  • plugins/related/src/as/RelatedThumb.as

    r1938 r1940  
    11package { 
    22 
     3    import com.longtailvideo.jwplayer.utils.Stretcher; 
    34 
    45    import flash.display.*; 
     
    2425        /** Container that imports the preview thumbnail **/ 
    2526        private var _loader:Loader; 
     27        /** Mask for the loader. **/ 
     28        private var _mask:Sprite; 
    2629        /** Graphic over the image. **/ 
    2730        private var _glow:DisplayObject; 
     
    3538 
    3639        /** Constructor. **/ 
    37         public function RelatedThumb(image:String,link:String,title:String) { 
     40        public function RelatedThumb(width:Number,height:Number,image:String,link:String,title:String=null) { 
    3841            _link = link; 
    3942            _back = new Sprite(); 
    4043            _back.graphics.beginFill(0,1); 
    41             _back.graphics.drawRect(0,0,120,80); 
     44            _back.graphics.drawRect(0,0,width,height); 
    4245            _back.filters = new Array(new DropShadowFilter(1)); 
    4346            addChild(_back); 
     
    4649            _loader.load(new URLRequest(image)); 
    4750            addChild(_loader); 
    48             _overlay = new Sprite(); 
     51            _mask = new Sprite(); 
     52            _mask.graphics.beginFill(0,1); 
     53            _mask.graphics.drawRect(0,0,width,height); 
     54            addChild(_mask); 
     55            _loader.mask = _mask; 
    4956            _glow = new GlowSheet(); 
     57            _glow.width = width; 
     58            _glow.scaleY = _glow.scaleX; 
    5059            addChild(_glow); 
    51             _overlay.graphics.beginFill(0,0.7); 
    52             _overlay.graphics.drawRect(0,56,120,24); 
    53             addChild(_overlay); 
    54             _field = new TextField(); 
    55             _field.height = 20; 
    56             _field.width = 110; 
    57             _field.x = 5; 
    58             _field.y = 60; 
    59             _format = new TextFormat('Arial', 12, 0xFFFFFF); 
    60             _format.align = 'center'; 
    61             _field.defaultTextFormat = _format; 
    62             _field.selectable = false; 
    63             _field.text = title; 
    64             addChild(_field); 
     60            if(title) { 
     61                _overlay = new Sprite(); 
     62                _overlay.graphics.beginFill(0,0.8); 
     63                _overlay.graphics.drawRect(0,height-26,width,26); 
     64                addChild(_overlay); 
     65                _field = new TextField(); 
     66                _field.height = 20; 
     67                _field.width = width-10; 
     68                _field.x = 5; 
     69                _field.y = height-21; 
     70                _format = new TextFormat('Arial', 12, 0xFFFFFF); 
     71                _format.align = 'center'; 
     72                _field.defaultTextFormat = _format; 
     73                _field.selectable = false; 
     74                _field.text = title; 
     75                addChild(_field); 
     76            } 
    6577            buttonMode = true; 
    6678            mouseChildren = false; 
    6779            addEventListener(MouseEvent.CLICK,_clickHandler); 
     80            addEventListener(MouseEvent.MOUSE_OUT,_outHandler); 
     81            addEventListener(MouseEvent.MOUSE_OVER,_overHandler); 
    6882        }; 
    6983 
     
    7690 
    7791        /** Fade the image when loaded. **/ 
    78         private function _loaderHandler(event:Event):void {  
    79             _loader.width = 120; 
    80             _loader.height = 80; 
     92        private function _loaderHandler(event:Event):void { 
     93            try { 
     94                Bitmap(_loader.content).smoothing = true; 
     95            } catch(e:Error) {} 
     96            Stretcher.stretch(_loader,_back.width,_back.height,Stretcher.FILL); 
     97        }; 
     98 
     99 
     100        /** Redirect on thumb click. **/ 
     101        private function _outHandler(event:MouseEvent):void { 
     102            _back.filters = new Array(new DropShadowFilter(1)); 
     103        }; 
     104 
     105 
     106        /** Redirect on thumb click. **/ 
     107        private function _overHandler(event:MouseEvent):void { 
     108            _back.filters = new Array(new DropShadowFilter(0,45,0xFFFFFF,1,5,5,1.5)); 
    81109        }; 
    82110 
  • plugins/related/test/assets/blender.xml

    r1938 r1940  
    44                        <title>Big Buck Bunny</title> 
    55                        <link>http://content.bitsontherun.com/previews/ntPYsD4L-ALJ3XQCI</link> 
    6                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/ntPYsD4L-120.jpg" /> 
     6                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/ntPYsD4L-320.jpg" /> 
    77                </item> 
    88                <item> 
    99                        <title>Elephants Dream</title> 
    1010                        <link>http://content.bitsontherun.com/previews/LJSVMnCF-ALJ3XQCI</link> 
    11                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/LJSVMnCF-120.jpg" /> 
     11                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/LJSVMnCF-320.jpg" /> 
    1212                </item> 
    1313                <item> 
    1414                        <title>Sintel</title> 
    1515                        <link>http://content.bitsontherun.com/previews/r3ABWwdO-ALJ3XQCI</link> 
    16                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/r3ABWwdO-120.jpg" /> 
     16                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/r3ABWwdO-320.jpg" /> 
    1717                </item> 
    1818        </channel> 
  • plugins/related/test/assets/heineken.xml

    r1938 r1940  
    22<channel> 
    33    <item> 
    4         <title>NEW Heineken Commercial - verry funny</title> 
    5         <link>http://www.youtube.com/watch?v=S1ZZreXEqSY&amp;feature=youtube_gdata</link> 
    6         <media:thumbnail url="http://i.ytimg.com/vi/S1ZZreXEqSY/1.jpg" height="90" width="120" time="00:00:08"/> 
    7     </item> 
    8     <item> 
    9         <title>Heineken Open Design Invite</title> 
    10         <link>http://www.youtube.com/watch?v=_SDJ-gghGXA&amp;feature=youtube_gdata</link> 
    11         <media:thumbnail url="http://i.ytimg.com/vi/_SDJ-gghGXA/1.jpg" height="90" width="120" time="00:00:25.250"/> 
    12     </item> 
    13     <item> 
    14         <title>CyHi The Prynce Performs at Heineken's Red Access Tour in Miami</title> 
    15         <link>http://www.youtube.com/watch?v=sbprnV2Pqts&amp;feature=youtube_gdata</link> 
    16         <media:thumbnail url="http://i.ytimg.com/vi/sbprnV2Pqts/1.jpg" height="90" width="120" time="00:01:27"/> 
    17     </item> 
    18     <item> 
    19         <title>Heineken The Entrance</title> 
    20         <link>http://www.youtube.com/watch?v=TLgetLmlggA&amp;feature=youtube_gdata</link> 
    21         <media:thumbnail url="http://i.ytimg.com/vi/TLgetLmlggA/1.jpg" height="90" width="120" time="00:00:23"/> 
    22     </item> 
    23     <item> 
    24         <title>Heineken Commercial 2011 - The Asteroids Galaxy Tour</title> 
    25         <link>http://www.youtube.com/watch?v=On6U-kQGBcA&amp;feature=youtube_gdata</link> 
    26         <media:thumbnail url="http://i.ytimg.com/vi/On6U-kQGBcA/2.jpg" height="90" width="120" time="00:01:32.500"/> 
    27     </item> 
    28     <item> 
    294        <title>One Million Heineken Hugs</title> 
    305        <link>http://www.youtube.com/watch?v=smO1onPkA3Q&amp;feature=youtube_gdata</link> 
    31         <media:thumbnail url="http://i.ytimg.com/vi/smO1onPkA3Q/2.jpg" height="90" width="120" time="00:00:40"/> 
     6        <media:thumbnail url="http://i.ytimg.com/vi/smO1onPkA3Q/0.jpg" height="90" width="120" time="00:00:40"/> 
    327    </item> 
    338    <item> 
    349        <title>Heineken commercial</title> 
    3510        <link>http://www.youtube.com/watch?v=3M8Dp7wGBe4&amp;feature=youtube_gdata</link> 
    36         <media:thumbnail url="http://i.ytimg.com/vi/3M8Dp7wGBe4/2.jpg" height="90" width="120" time="00:00:45"/> 
     11        <media:thumbnail url="http://i.ytimg.com/vi/3M8Dp7wGBe4/0.jpg" height="90" width="120" time="00:00:45"/> 
    3712    </item> 
    3813    <item> 
    3914        <title>Heineken The Date</title> 
    4015        <link>http://www.youtube.com/watch?v=57zo8O5pDXc&amp;feature=youtube_gdata</link> 
    41         <media:thumbnail url="http://i.ytimg.com/vi/57zo8O5pDXc/2.jpg" height="90" width="120" time="00:00:46"/> 
     16        <media:thumbnail url="http://i.ytimg.com/vi/57zo8O5pDXc/0.jpg" height="90" width="120" time="00:00:46"/> 
    4217    </item> 
    4318    <item> 
    44         <title>Heineken Light The Handlebar Moustache (HD)</title> 
    4519        <link>http://www.youtube.com/watch?v=XFdBK4gdYcA&amp;feature=youtube_gdata</link> 
    46         <media:thumbnail url="http://i.ytimg.com/vi/XFdBK4gdYcA/2.jpg" height="90" width="120" time="00:00:30.500"/> 
     20        <media:thumbnail url="http://i.ytimg.com/vi/XFdBK4gdYcA/0.jpg" height="90" width="120" time="00:00:30.500"/> 
    4721    </item> 
    4822    <item> 
    4923        <title>Heineken - Men With Talent</title> 
    50         <link>http://www.youtube.com/watch?v=58-9Ae9cvDI&amp;feature=youtube_gdata</link> 
    51         <media:thumbnail url="http://i.ytimg.com/vi/58-9Ae9cvDI/2.jpg" height="90" width="120" time="00:00:21"/> 
     24        <media:thumbnail url="http://i.ytimg.com/vi/58-9Ae9cvDI/0.jpg" height="90" width="120" time="00:00:21"/> 
    5225    </item> 
    5326    <item> 
    5427        <title>Elvis and Heineken</title> 
    5528        <link>http://www.youtube.com/watch?v=miHVWNekujA&amp;feature=youtube_gdata</link> 
    56         <media:thumbnail url="http://i.ytimg.com/vi/miHVWNekujA/2.jpg" height="90" width="120" time="00:00:31"/> 
    5729    </item> 
    5830    <item> 
    5931        <title>Heineken Cup Final 2011 highlights - Leinster vs Northampton Saints</title> 
    6032        <link>http://www.youtube.com/watch?v=meJd5gGjdGc&amp;feature=youtube_gdata</link> 
    61         <media:thumbnail url="http://i.ytimg.com/vi/meJd5gGjdGc/2.jpg" height="90" width="120" time="00:03:28.500"/> 
     33        <media:thumbnail url="http://i.ytimg.com/vi/meJd5gGjdGc/0.jpg" height="90" width="120" time="00:03:28.500"/> 
    6234    </item> 
    6335    <item> 
    6436        <title>Heineken | The Entrance</title> 
    6537        <link>http://www.youtube.com/watch?v=i4m5Wkywew0&amp;feature=youtube_gdata</link> 
    66         <media:thumbnail url="http://i.ytimg.com/vi/i4m5Wkywew0/2.jpg" height="90" width="120" time="00:00:24"/> 
     38        <media:thumbnail url="http://i.ytimg.com/vi/i4m5Wkywew0/0.jpg" height="90" width="120" time="00:00:24"/> 
    6739    </item> 
    6840    <item> 
    6941        <title>Heineken - Global Rugby World Cup 2011</title> 
    7042        <link>http://www.youtube.com/watch?v=LfomUcl75ho&amp;feature=youtube_gdata</link> 
    71         <media:thumbnail url="http://i.ytimg.com/vi/LfomUcl75ho/2.jpg" height="90" width="120" time="00:00:30.500"/> 
     43        <media:thumbnail url="http://i.ytimg.com/vi/LfomUcl75ho/0.jpg" height="90" width="120" time="00:00:30.500"/> 
    7244    </item> 
    7345    <item> 
    7446        <title>Heineken USA - No Hype</title> 
    7547        <link>http://www.youtube.com/watch?v=yIMTTDJv3SU&amp;feature=youtube_gdata</link> 
    76         <media:thumbnail url="http://i.ytimg.com/vi/yIMTTDJv3SU/2.jpg" height="90" width="120" time="00:00:08"/> 
     48        <media:thumbnail url="http://i.ytimg.com/vi/yIMTTDJv3SU/0.jpg" height="90" width="120" time="00:00:08"/> 
    7749    </item> 
    7850    <item> 
    7951        <title>Heineken - Brief Encounter</title> 
    8052        <link>http://www.youtube.com/watch?v=P_pkeB7PbbQ&amp;feature=youtube_gdata</link> 
    81         <media:thumbnail url="http://i.ytimg.com/vi/P_pkeB7PbbQ/2.jpg" height="90" width="120" time="00:00:30"/> 
     53        <media:thumbnail url="http://i.ytimg.com/vi/P_pkeB7PbbQ/0.jpg" height="90" width="120" time="00:00:30"/> 
    8254    </item> 
    8355    <item> 
    8456        <title>Leinster v. Northampton Heineken Cup Final 2011</title> 
    8557        <link>http://www.youtube.com/watch?v=QyqfqW3L4wE&amp;feature=youtube_gdata</link> 
    86         <media:thumbnail url="http://i.ytimg.com/vi/QyqfqW3L4wE/2.jpg" height="90" width="120" time="00:02:46.500"/> 
     58        <media:thumbnail url="http://i.ytimg.com/vi/QyqfqW3L4wE/0.jpg" height="90" width="120" time="00:02:46.500"/> 
    8759    </item> 
    8860    <item> 
    8961        <title>Heineken April 1st</title> 
    9062        <link>http://www.youtube.com/watch?v=_Pnphme2bKc&amp;feature=youtube_gdata</link> 
    91         <media:thumbnail url="http://i.ytimg.com/vi/_Pnphme2bKc/2.jpg" height="90" width="120" time="00:00:46"/> 
     63        <media:thumbnail url="http://i.ytimg.com/vi/_Pnphme2bKc/0.jpg" height="90" width="120" time="00:00:46"/> 
    9264    </item> 
    9365    <item> 
    9466        <title>Heineken Star Player BuzzmaniaTV.mp4</title> 
    9567        <link>http://www.youtube.com/watch?v=XP5yySEZub8&amp;feature=youtube_gdata</link> 
    96         <media:thumbnail url="http://i.ytimg.com/vi/XP5yySEZub8/2.jpg" height="90" width="120" time="00:01:07.500"/> 
     68        <media:thumbnail url="http://i.ytimg.com/vi/XP5yySEZub8/0.jpg" height="90" width="120" time="00:01:07.500"/> 
    9769    </item> 
    9870    <item> 
    9971        <title>KANYE WEST Heineken Red Star All Access show "ALL OF THE LIGHTS"</title> 
    10072        <link>http://www.youtube.com/watch?v=ieGO4TPlWbY&amp;feature=youtube_gdata</link> 
    101         <media:thumbnail url="http://i.ytimg.com/vi/ieGO4TPlWbY/2.jpg" height="90" width="120" time="00:02:29"/> 
     73        <media:thumbnail url="http://i.ytimg.com/vi/ieGO4TPlWbY/0.jpg" height="90" width="120" time="00:02:29"/> 
    10274    </item> 
    10375    <item> 
    10476        <title>Funny Heineken Commercial</title> 
    10577        <link>http://www.youtube.com/watch?v=neoUi4poCXI&amp;feature=youtube_gdata</link> 
    106         <media:thumbnail url="http://i.ytimg.com/vi/neoUi4poCXI/2.jpg" height="90" width="120" time="00:00:30"/> 
     78        <media:thumbnail url="http://i.ytimg.com/vi/neoUi4poCXI/0.jpg" height="90" width="120" time="00:00:30"/> 
    10779    </item> 
    10880    <item> 
    10981        <title>Heineken Italy Activation Milan AC Real Madrid</title> 
    11082        <link>http://www.youtube.com/watch?v=M_URyWFBOy4&amp;feature=youtube_gdata</link> 
    111         <media:thumbnail url="http://i.ytimg.com/vi/M_URyWFBOy4/2.jpg" height="90" width="120" time="00:02:33"/> 
     83        <media:thumbnail url="http://i.ytimg.com/vi/M_URyWFBOy4/0.jpg" height="90" width="120" time="00:02:33"/> 
    11284    </item> 
    11385    <item> 
    11486        <title>The Entrance for Heineken Beer by Wieden &amp; Kennedy Amsterdam.mp4</title> 
    11587        <link>http://www.youtube.com/watch?v=ozWu3lzE8d0&amp;feature=youtube_gdata</link> 
    116         <media:thumbnail url="http://i.ytimg.com/vi/ozWu3lzE8d0/2.jpg" height="90" width="120" time="00:01:26"/> 
     88        <media:thumbnail url="http://i.ytimg.com/vi/ozWu3lzE8d0/0.jpg" height="90" width="120" time="00:01:26"/> 
    11789    </item> 
    11890    <item> 
    11991        <title>Northampton Saints vs Perpignan - Heineken Cup semi final - 2011</title> 
    12092        <link>http://www.youtube.com/watch?v=Olqz6eIUL_Y&amp;feature=youtube_gdata</link> 
    121         <media:thumbnail url="http://i.ytimg.com/vi/Olqz6eIUL_Y/2.jpg" height="90" width="120" time="00:02:47.500"/> 
     93        <media:thumbnail url="http://i.ytimg.com/vi/Olqz6eIUL_Y/0.jpg" height="90" width="120" time="00:02:47.500"/> 
    12294    </item> 
    12395    <item> 
    12496        <title>Heineken Open Design Explorations</title> 
    12597        <link>http://www.youtube.com/watch?v=zsszRzTPft4&amp;feature=youtube_gdata</link> 
    126         <media:thumbnail url="http://i.ytimg.com/vi/zsszRzTPft4/2.jpg" height="90" width="120" time="00:00:50.500"/> 
     98        <media:thumbnail url="http://i.ytimg.com/vi/zsszRzTPft4/0.jpg" height="90" width="120" time="00:00:50.500"/> 
    12799    </item> 
    128100</channel> 
  • plugins/related/test/assets/screencasts.xml

    r1938 r1940  
    22        <channel> 
    33                <item> 
    4                         <title>Uploading Videos</title> 
    54                        <link>http://content.bitsontherun.com/previews/sFLjZ5Ne-izMKc5WX</link> 
    6                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/sFLjZ5Ne-120.jpg" /> 
     5                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/sFLjZ5Ne-320.jpg" /> 
    76                </item> 
    87                <item> 
    9                         <title>Creating Playlists</title> 
    108                        <link>http://content.bitsontherun.com/previews/WhmFbPBE-izMKc5WX</link> 
    11                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/WhmFbPBE-120.jpg" /> 
     9                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/WhmFbPBE-320.jpg" /> 
    1210                </item> 
    1311                <item> 
    14                         <title>Building Players</title> 
    1512                        <link>http://content.bitsontherun.com/previews/f3oBo7sS-izMKc5WX</link> 
    16                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/f3oBo7sS-120.jpg" /> 
     13                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/f3oBo7sS-320.jpg" /> 
    1714                </item> 
    1815                <item> 
    19                         <title>Video Analytics</title> 
    2016                        <link>http://content.bitsontherun.com/previews/erpBm96r-izMKc5WX</link> 
    21                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/erpBm96r-120.jpg" /> 
     17                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/erpBm96r-320.jpg" /> 
    2218                </item> 
    2319                <item> 
    24                         <title>Reseller Overview</title> 
    2520                        <link>http://content.bitsontherun.com/previews/yDtLAunz-izMKc5WX</link> 
    26                         <media:thumbnail url="http://content.bitsontherun.com/thumbs/yDtLAunz-120.jpg" /> 
     21                        <media:thumbnail url="http://content.bitsontherun.com/thumbs/yDtLAunz-320.jpg" /> 
    2722                </item> 
    2823        </channel> 
  • plugins/related/test/dimensions.html

    r1937 r1940  
    11<html> 
    2         <head> 
    3                 <script src="/trunk/fl5/js/bin-debug/jwplayer.js" type="text/javascript"></script> 
    4         </head> 
    5         <body> 
    6                 <a href="index.html">Back to index</a> 
    7                 <div id="player"></div> 
    8                 <script type="text/javascript"> 
    9                 jwplayer('player').setup({ 
    10                         levels: [ 
    11                                 { file: 'http://playertest.longtailvideo.com/bunny.mp4' }, 
    12                                 { file: 'http://playertest.longtailvideo.com/bunny.ogv' } 
    13                         ], 
    14                         plugins: { 
    15                                 '../bin-debug/related.js': { 
    16                                         useicons: true, 
    17                                         redirect: true, 
    18                                         file: "./assets/recs.xml" 
    19                                 } 
    20                         }, 
    21                         'modes': [ 
    22                                 {type: 'html5'}, 
    23                                 {type: 'flash', src: './assets/player.swf'} 
    24                         ] 
    25                 }); 
    26                 </script> 
    27         </body> 
     2<head> 
     3 
     4<meta charset="UTF-8"> 
     5<script type="text/javascript" src="assets/jwplayer.min.js"></script> 
     6<title>Various dimensions</title> 
     7<style> 
     8    body,td { padding: 50px; font: 13px/20px Arial; background: #EEE; } 
     9    td { padding: 0 20px 0 0; border-collapse: collapse; } 
     10    #player, p, ul, table { margin-top: 20px; display: block; } 
     11    #player { -webkit-box-shadow: 0 0 5px #999; } 
     12</style> 
     13 
     14</head> 
     15<body> 
     16 
     17<h2>Various dimensions</h2> 
     18 
     19<div id="player"></div> 
     20 
     21<script type="text/javascript"> 
     22function reload(width,height,feed) { 
     23    jwplayer("player").setup({ 
     24        file: 'http://content.bitsontherun.com/videos/nPripu9l-327.mp4', 
     25        flashplayer: 'assets/player.swf', 
     26        height: height, 
     27        image:'http://content.bitsontherun.com/thumbs/nPripu9l-480.jpg', 
     28        plugins: { 
     29            '../related.js': { 
     30                file: feed, 
     31                usedock: true 
     32            } 
     33        }, 
     34        width: width 
     35    }); 
     36}; 
     37</script> 
     38 
     39 
     40<table> 
     41    <tr> 
     42        <td>320x240:</td> 
     43        <td><a href="javascript:reload(320,180,'assets/blender.xml');">3 videos</a></td> 
     44        <td><a href="javascript:reload(320,180,'assets/screencasts.xml');">5 videos</a></td> 
     45        <td><a href="javascript:reload(320,180,'assets/heineken.xml');">15 videos</a></td> 
     46    </tr> 
     47    <tr> 
     48        <td>480x270:</td> 
     49        <td><a href="javascript:reload(480,270,'assets/blender.xml');">3 videos</a></td> 
     50        <td><a href="javascript:reload(480,270,'assets/screencasts.xml');">5 videos</a></td> 
     51        <td><a href="javascript:reload(480,270,'assets/heineken.xml');">15 videos</a></td> 
     52    </tr> 
     53    <tr> 
     54        <td>640x360:</td> 
     55        <td><a href="javascript:reload(640,360,'assets/blender.xml');">3 videos</a></td> 
     56        <td><a href="javascript:reload(640,360,'assets/screencasts.xml');">5 videos</a></td> 
     57        <td><a href="javascript:reload(640,360,'assets/heineken.xml');">15 videos</a></td> 
     58    </tr> 
     59    <tr> 
     60        <td>960x540:</td> 
     61        <td><a href="javascript:reload(960,540,'assets/blender.xml');">3 videos</a></td> 
     62        <td><a href="javascript:reload(960,540,'assets/screencasts.xml');">5 videos</a></td> 
     63        <td><a href="javascript:reload(960,540,'assets/heineken.xml');">15 videos</a></td> 
     64    </tr> 
     65</table> 
     66 
     67 
     68<p> 
     69    The related videos overlay should look good in various dimensions.<br /> 
     70    The larger the screen, the mover videos will fit.<br/> 
     71    There is a maximum of 3 rows and 5 columns. 
     72</p> 
     73 
     74 
     75</body> 
    2876</html> 
  • plugins/related/test/modes.html

    r1937 r1940  
    11<html> 
    2         <head> 
    3                 <script src="./assets/jwplayer.js" type="text/javascript"></script> 
    4         </head> 
    5         <body> 
    6                 <a href="index.html">Back to index</a> 
    7                 <div id="player"></div> 
    8                 <script type="text/javascript"> 
    9                 jwplayer('player').setup({ 
    10                         levels: [ 
    11                                 { file: 'http://playertest.longtailvideo.com/bunny.mp4' }, 
    12                                 { file: 'http://playertest.longtailvideo.com/bunny.ogv' } 
    13                         ], 
    14                         plugins: { 
    15                                 '../bin-debug/related.js': { 
    16                                         useicons: true, 
    17                                         file: "./assets/recs.xml" 
    18                                 } 
    19                         }, 
    20                         'modes': [ 
    21                                 {type: 'html5'}, 
    22                                 {type: 'flash', src: './assets/player.swf'} 
    23                         ] 
    24                 }); 
    25                 </script> 
    26         </body> 
     2<head> 
     3 
     4<meta charset="UTF-8"> 
     5<script type="text/javascript" src="assets/jwplayer.min.js"></script> 
     6<title>Rendering Modes</title> 
     7<style> 
     8    body { padding: 50px; font: 13px/20px Arial; background: #EEE; } 
     9    form,p, ul { margin-top: 20px; } 
     10    #player { -webkit-box-shadow: 0 0 5px #999; background: #000; color:#FFF; } 
     11</style> 
     12 
     13</head> 
     14<body> 
     15 
     16<h2>Rendering Modes</h2> 
     17 
     18<div id="player"></div> 
     19<script type="text/javascript"> 
     20 
     21 
     22function loadPlayer(html5) { 
     23    var options = { 
     24        file: 'http://content.bitsontherun.com/videos/3XnJSIm4-364765.mp4', 
     25        image: 'http://content.bitsontherun.com/thumbs/3XnJSIm4-720.jpg', 
     26        height: 300, 
     27        plugins: { 
     28            '../related.js': { 
     29                file: 'assets/blender.xml' 
     30            } 
     31        }, 
     32        width: 640, 
     33        stretching: 'fill' 
     34    }; 
     35    if(html5) { 
     36        options.modes = [{type: 'html5'},{type:'flash',src:'assets/player.swf'}]; 
     37    } else {  
     38        options.modes = [{type:'flash',src:'assets/player.swf'},{type: 'html5'}]; 
     39    } 
     40    jwplayer("player").setup(options); 
     41}; 
     42</script> 
     43 
     44 
     45<ul> 
     46    <li><a href="javascript:loadPlayer(true)">HTML5 first</a></li> 
     47    <li><a href="javascript:loadPlayer(false)">Flash first</a></li> 
     48</ul> 
     49 
     50<p> 
     51    Check if the plugin works correctly in both rendering modes.<br/> 
     52    Check the IE 7/8/9, Firefox 3.5/5, Safari and Chrome browsers.<br/> 
     53    In HTML5 mode, the HD/SD video should not restart when toggling. 
     54</p> 
     55<p> 
     56    Also check the iPhone, iPad and Android devices.<br/> 
     57    On these, two buttons should show up instead of the dock. 
     58</p> 
     59 
     60 
     61</body> 
    2762</html> 
  • plugins/related/test/options.html

    r1938 r1940  
    4040 
    4141<ul> 
    42     <li><a href="javascript:reload(true,true,'Watch related videos');">Default options</a></li> 
    43     <li><a href="javascript:reload(false,true,'Watch some additional related videos');">Oncomplete disabled, long heading</a></li> 
    44     <li><a href="javascript:reload(true,false,'لوحة ال٠
    45 ÙØ§ØªÙŠØ­ العرؚية');">Usedock disabled, arab heading</a></li> 
     42    <li><a href="javascript:reload(true,true,'Watch related videos');">Both enabled</a></li> 
     43    <li><a href="javascript:reload(true,false,'Watch some additional related videos');">Only oncomplete, long heading</a></li> 
     44    <li><a href="javascript:reload(false,true,'لوحة ال٠
     45فاتيح العرؚية');">Only the dock, arab heading</a></li> 
    4646</ul> 
    4747 
  • plugins/related/test/playlist.html

    r1938 r1940  
    2424        'playlist.size': 240, 
    2525        plugins: { '../related.js': {} }, 
     26        stretching: 'fill', 
    2627        width: 880 
    2728    }; 
Note: See TracChangeset for help on using the changeset viewer.