Changeset 1940
- Timestamp:
- 08/06/11 13:15:03 (22 months ago)
- Location:
- plugins/related
- Files:
-
- 2 added
- 14 edited
-
assets/close.png (added)
-
assets/glow.png (modified) (previous)
-
assets/replay.png (added)
-
assets/sheet.png (modified) (previous)
-
doc/assets/related_example.png (modified) (previous)
-
doc/guide.html (modified) (1 diff)
-
related.swf (modified) (previous)
-
src/as/Related.as (modified) (11 diffs)
-
src/as/RelatedThumb.as (modified) (5 diffs)
-
test/assets/blender.xml (modified) (1 diff)
-
test/assets/heineken.xml (modified) (1 diff)
-
test/assets/screencasts.xml (modified) (1 diff)
-
test/dimensions.html (modified) (1 diff)
-
test/modes.html (modified) (1 diff)
-
test/options.html (modified) (1 diff)
-
test/playlist.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
plugins/related/doc/guide.html
r1937 r1940 28 28 <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> 29 29 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> 31 31 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> 33 33 34 34 <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 12 12 import flash.net.*; 13 13 import flash.text.*; 14 import flash.utils.setTimeout; 14 15 15 16 … … 23 24 [Embed(source="../../assets/sheet.png")] 24 25 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; 25 30 26 31 … … 47 52 /** Reference to the player. **/ 48 53 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; 49 58 50 59 … … 55 64 /** Display the related items on complete. **/ 56 65 private function _completeHandler(evt:MediaEvent):void { 57 if(_config.oncomplete !== false) { show(); } 66 if(_config.oncomplete !== false) { 67 setTimeout(show,50); 68 } 58 69 }; 59 70 … … 78 89 public function hide():void { 79 90 _back.visible = false; 91 _replay.visible = false; 92 _close.visible = false; 80 93 _grid.visible = false; 81 94 _heading.visible = false; 82 95 // 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) {} 84 100 }; 85 101 … … 108 124 // Add the background sheet. 109 125 _back = new Sprite(); 110 _back.visible = false;111 126 _back.buttonMode = true; 112 127 _back.addChild(new BackSheet()); 113 128 _back.addEventListener(MouseEvent.CLICK,_backHandler); 114 129 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); 115 141 // Add the text heading. 116 142 _heading = new TextField(); 117 143 _heading.height = 30; 118 _heading.defaultTextFormat = new TextFormat('Arial', 16, 0xFFFFFF , true);144 _heading.defaultTextFormat = new TextFormat('Arial', 16, 0xFFFFFF); 119 145 _heading.autoSize = 'center'; 120 146 _heading.multiline = false; 121 147 _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)); 123 149 if(_config.heading) { 124 150 _heading.htmlText = _config.heading; … … 130 156 _grid = new Sprite(); 131 157 addChild(_grid); 132 // Hide the graphics on startup.133 hide();134 158 }; 135 159 … … 139 163 // Reset old data 140 164 _file = undefined; 165 while(_grid.numChildren > 0) { 166 _grid.removeChildAt(0); 167 } 168 hide(); 141 169 // Check for new file 142 170 if(_player.playlist.currentItem['related.file']) { … … 166 194 var related:Array = new Array(); 167 195 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) { 169 197 related.push(rss[i]); 170 198 } 171 199 } 172 200 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; 177 213 _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); 180 226 } else { 181 227 _errorHandler(new ErrorEvent(ErrorEvent.ERROR,false,false, … … 185 231 186 232 233 /** The replay button was clicked. **/ 234 private function _replayHandler(evt:MouseEvent):void { 235 hide(); 236 _player.seek(0); 237 }; 238 239 187 240 /** Reposition the screens when the player resizes itself **/ 188 241 public function resize(width:Number, height:Number):void { 242 // Do regular resize stuff 189 243 _back.width = width; 190 244 _back.height = height; 245 _close.x = width - 50; 191 246 _grid.x = Math.round(width/2 - _grid.width/2); 192 247 _grid.y = Math.round(height/2 - _grid.height/2) + 10; 193 248 _heading.y = _grid.y - 30; 194 249 _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 } 199 268 }; 200 269 … … 204 273 if(_file) { 205 274 _back.visible = true; 275 _replay.visible = true; 276 _close.visible = true; 206 277 _grid.visible = true; 207 278 _heading.visible = true; 279 _player.pause(); 208 280 // 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) {} 210 285 } 211 286 }; -
plugins/related/src/as/RelatedThumb.as
r1938 r1940 1 1 package { 2 2 3 import com.longtailvideo.jwplayer.utils.Stretcher; 3 4 4 5 import flash.display.*; … … 24 25 /** Container that imports the preview thumbnail **/ 25 26 private var _loader:Loader; 27 /** Mask for the loader. **/ 28 private var _mask:Sprite; 26 29 /** Graphic over the image. **/ 27 30 private var _glow:DisplayObject; … … 35 38 36 39 /** 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) { 38 41 _link = link; 39 42 _back = new Sprite(); 40 43 _back.graphics.beginFill(0,1); 41 _back.graphics.drawRect(0,0, 120,80);44 _back.graphics.drawRect(0,0,width,height); 42 45 _back.filters = new Array(new DropShadowFilter(1)); 43 46 addChild(_back); … … 46 49 _loader.load(new URLRequest(image)); 47 50 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; 49 56 _glow = new GlowSheet(); 57 _glow.width = width; 58 _glow.scaleY = _glow.scaleX; 50 59 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 } 65 77 buttonMode = true; 66 78 mouseChildren = false; 67 79 addEventListener(MouseEvent.CLICK,_clickHandler); 80 addEventListener(MouseEvent.MOUSE_OUT,_outHandler); 81 addEventListener(MouseEvent.MOUSE_OVER,_overHandler); 68 82 }; 69 83 … … 76 90 77 91 /** 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)); 81 109 }; 82 110 -
plugins/related/test/assets/blender.xml
r1938 r1940 4 4 <title>Big Buck Bunny</title> 5 5 <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" /> 7 7 </item> 8 8 <item> 9 9 <title>Elephants Dream</title> 10 10 <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" /> 12 12 </item> 13 13 <item> 14 14 <title>Sintel</title> 15 15 <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" /> 17 17 </item> 18 18 </channel> -
plugins/related/test/assets/heineken.xml
r1938 r1940 2 2 <channel> 3 3 <item> 4 <title>NEW Heineken Commercial - verry funny</title>5 <link>http://www.youtube.com/watch?v=S1ZZreXEqSY&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&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&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&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&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>29 4 <title>One Million Heineken Hugs</title> 30 5 <link>http://www.youtube.com/watch?v=smO1onPkA3Q&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"/> 32 7 </item> 33 8 <item> 34 9 <title>Heineken commercial</title> 35 10 <link>http://www.youtube.com/watch?v=3M8Dp7wGBe4&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"/> 37 12 </item> 38 13 <item> 39 14 <title>Heineken The Date</title> 40 15 <link>http://www.youtube.com/watch?v=57zo8O5pDXc&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"/> 42 17 </item> 43 18 <item> 44 <title>Heineken Light The Handlebar Moustache (HD)</title>45 19 <link>http://www.youtube.com/watch?v=XFdBK4gdYcA&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"/> 47 21 </item> 48 22 <item> 49 23 <title>Heineken - Men With Talent</title> 50 <link>http://www.youtube.com/watch?v=58-9Ae9cvDI&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"/> 52 25 </item> 53 26 <item> 54 27 <title>Elvis and Heineken</title> 55 28 <link>http://www.youtube.com/watch?v=miHVWNekujA&feature=youtube_gdata</link> 56 <media:thumbnail url="http://i.ytimg.com/vi/miHVWNekujA/2.jpg" height="90" width="120" time="00:00:31"/>57 29 </item> 58 30 <item> 59 31 <title>Heineken Cup Final 2011 highlights - Leinster vs Northampton Saints</title> 60 32 <link>http://www.youtube.com/watch?v=meJd5gGjdGc&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"/> 62 34 </item> 63 35 <item> 64 36 <title>Heineken | The Entrance</title> 65 37 <link>http://www.youtube.com/watch?v=i4m5Wkywew0&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"/> 67 39 </item> 68 40 <item> 69 41 <title>Heineken - Global Rugby World Cup 2011</title> 70 42 <link>http://www.youtube.com/watch?v=LfomUcl75ho&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"/> 72 44 </item> 73 45 <item> 74 46 <title>Heineken USA - No Hype</title> 75 47 <link>http://www.youtube.com/watch?v=yIMTTDJv3SU&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"/> 77 49 </item> 78 50 <item> 79 51 <title>Heineken - Brief Encounter</title> 80 52 <link>http://www.youtube.com/watch?v=P_pkeB7PbbQ&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"/> 82 54 </item> 83 55 <item> 84 56 <title>Leinster v. Northampton Heineken Cup Final 2011</title> 85 57 <link>http://www.youtube.com/watch?v=QyqfqW3L4wE&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"/> 87 59 </item> 88 60 <item> 89 61 <title>Heineken April 1st</title> 90 62 <link>http://www.youtube.com/watch?v=_Pnphme2bKc&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"/> 92 64 </item> 93 65 <item> 94 66 <title>Heineken Star Player BuzzmaniaTV.mp4</title> 95 67 <link>http://www.youtube.com/watch?v=XP5yySEZub8&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"/> 97 69 </item> 98 70 <item> 99 71 <title>KANYE WEST Heineken Red Star All Access show "ALL OF THE LIGHTS"</title> 100 72 <link>http://www.youtube.com/watch?v=ieGO4TPlWbY&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"/> 102 74 </item> 103 75 <item> 104 76 <title>Funny Heineken Commercial</title> 105 77 <link>http://www.youtube.com/watch?v=neoUi4poCXI&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"/> 107 79 </item> 108 80 <item> 109 81 <title>Heineken Italy Activation Milan AC Real Madrid</title> 110 82 <link>http://www.youtube.com/watch?v=M_URyWFBOy4&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"/> 112 84 </item> 113 85 <item> 114 86 <title>The Entrance for Heineken Beer by Wieden & Kennedy Amsterdam.mp4</title> 115 87 <link>http://www.youtube.com/watch?v=ozWu3lzE8d0&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"/> 117 89 </item> 118 90 <item> 119 91 <title>Northampton Saints vs Perpignan - Heineken Cup semi final - 2011</title> 120 92 <link>http://www.youtube.com/watch?v=Olqz6eIUL_Y&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"/> 122 94 </item> 123 95 <item> 124 96 <title>Heineken Open Design Explorations</title> 125 97 <link>http://www.youtube.com/watch?v=zsszRzTPft4&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"/> 127 99 </item> 128 100 </channel> -
plugins/related/test/assets/screencasts.xml
r1938 r1940 2 2 <channel> 3 3 <item> 4 <title>Uploading Videos</title>5 4 <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" /> 7 6 </item> 8 7 <item> 9 <title>Creating Playlists</title>10 8 <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" /> 12 10 </item> 13 11 <item> 14 <title>Building Players</title>15 12 <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" /> 17 14 </item> 18 15 <item> 19 <title>Video Analytics</title>20 16 <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" /> 22 18 </item> 23 19 <item> 24 <title>Reseller Overview</title>25 20 <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" /> 27 22 </item> 28 23 </channel> -
plugins/related/test/dimensions.html
r1937 r1940 1 1 <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"> 22 function 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> 28 76 </html> -
plugins/related/test/modes.html
r1937 r1940 1 1 <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 22 function 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> 27 62 </html> -
plugins/related/test/options.html
r1938 r1940 40 40 41 41 <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> 46 46 </ul> 47 47 -
plugins/related/test/playlist.html
r1938 r1940 24 24 'playlist.size': 240, 25 25 plugins: { '../related.js': {} }, 26 stretching: 'fill', 26 27 width: 880 27 28 };
Note: See TracChangeset
for help on using the changeset viewer.
