1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 3<head> 4<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 5<title>FlowPlayer</title> 6<script type="text/javascript" src="swfobject.js"></script> 7<script type="text/javascript"> 8/* 9 * Init and setup FlowPlayer. This example file shows 'advanced' features like 10 * playlists and configuring with JavaScript. FlowPlayer.html is a simpler example. 11 */ 12 13var flowPlayer1; 14function init() { 15 if (document.getElementById) { 16 flowPlayer1 = document.getElementById("FlowPlayer"); 17 } 18 setFlowPlayerConfig(); 19} 20 21// wait for the page to fully load before initializing 22window.onload = init; 23 24 25function setFlowPlayerConfig() { 26 flowPlayer1.setConfig(fpConf); 27} 28 29function clipSelected(clipIndex) { 30 flowPlayer1.ToClip(clipIndex); 31} 32 33// Playlist. 34var clips = [ 35 { name: 'ClickToPlay', url: 'http://www.kolumbus.fi/apiirain/video/resources/main_clickToPlay.jpg' }, 36 { name: 'Honda ad', url: 'honda_accord.flv', controlEnabled: false, linkUrl: 'http://api.blogs.com/flow?haa\u0026foo=bar', linkWindow: '_self' }, 37 { name: 'Skiing in ounasvaara', url: 'ounasvaara.flv' }, 38 { name: 'New lake', url: 'http://www.sunsetcities.com/sunset-park/new-lake/09230031.jpg' }, 39 { name: 'Sunset', url: 'http://www.ashdown-eyes.co.uk/28dec4-j.JPG', duration: 10 }, 40 { name: 'Chaco sunset', url: 'http://www.photo.net/photo/pcd1666/chaco-sunset-74.3.jpg', duration: 10 } 41]; 42 43// FlowPlayer configuration 44var fpConf = { 45// for FMS: 46// streamingServerURL: 'rtmp://cyzy7r959.rtmphost.com/flowplayer', 47// for red5: 48// streamingServerURL: 'rtmp://localhost:1935/oflaDemo', 49// thumbsOnFLV: true, 50 playList: clips, 51 showPlayList: false, 52 baseURL: '', 53 autoPlay: true, 54 autoBuffering: true, 55 startingBufferLength: 5, 56 bufferLength: 10, 57 loop: true, 58 videoHeight: 420, 59 hideControls: false, 60 initialScale: 'fill' 61} 62 63</script> 64</head> 65<body bgcolor="#CCCCCC"> 66 67 <div id="flowplayerholder"> 68 You need to have the <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> installed and 69 a browser with JavaScript support. 70 </div> 71 <script type="text/javascript"> 72 // <![CDATA[ 73 74 var fo = new SWFObject("FlowPlayer.swf", "FlowPlayer", "500", "560", "7", "#ffffff", true); 75 // need this next line for local testing, it's optional if your swf is on the same domain as your html page 76 fo.addParam("allowScriptAccess", "always"); 77 fo.addParam("flashVars", "config={configInject: true}"); 78 fo.write("flowplayerholder"); 79 80 // ]]> 81 </script> 82 83 84<table> 85 <tr><td>Splash</td><td><a href="javascript: clipSelected(0)">Play</a></td></tr> 86 <tr><td>Honda ad / Skiing</td><td><a href="javascript: clipSelected(1)">Play</a></td></tr> 87 <tr><td>New lage</td><td><a href="javascript: clipSelected(2)">Play</a></td></tr> 88 <tr><td>Sunset</td><td><a href="javascript: clipSelected(3)">Play</a></td></tr> 89 <tr><td>Chaco sunset</td><td><a href="javascript: clipSelected(4)">Play</a></td></tr> 90</table> 91 92</body> 93</html> 94