// setup player var plugin = $f("myDiv").getPlugin("myContent"); $f("player2", "/test/swf/flowplayer-3.0.3.swf", { // controlbar is initially hidden plugins: { controls: {display: 'none' } }, // properties that are common to both clips in the playlist clip: { baseUrl: 'http://video.supercheats.com' }, // playlist with two entries playlist: [ { url: '.jpg', scaling: 'orig' }, // user is forced to see this entry. pause action is disabled { url: '/intro/640x480/ccccc.flv', // when this event returns false - player's default behaviour is disabled onBeforePause: function() { return false; } }, // this is the actual video. controlbar is shown { url: '.flv', scaling: 'orig', onStart: function() { this.getControls().show(); }, // when playback finishes player is resumed back to it's original splash image state onFinish: function() { $f().getPlugin().toggle(); // this.unload(); } } ] }); plugins: { // "myContent" is the name of our plugin myContent: { // location of the plugin url: 'flowplayer.content-3.0.1.swf', // display properties top: 20, width: 300, // styling properties borderRadius: 10, backgroundImage: 'url(pattern.png)', // linked stylesheet stylesheet: 'content-plugin.css', // "inline" styling (overrides stylesheet rules), style: { '.title' { fontSize: 16, fontFamily: 'verdana,arial,helvetica' } } /* initial HTML content. this can also be fetched from HTML document like we did in this page. see source code for that. */ html: '

My title

', // clicking on the plugin hides it (but you can do anything) onClick: function() { this.hide(); } } }