I'm having trouble with pseudo streaming. When moving the cursor to seek it jumps back to 0 and starts playback from the beginning even if the place I'm trying to jump is buffered or not.
Following is my code to embed the player using SWFObject 3.2.
var plugins = 'hd-1,quickkeys-1';
if (playlist[item]['video'] != '1') { // This is audio only. Give the user some eye-candy =)
plugins += ',spectrumvisualizer-1';
}
var flashvars = { // Look at how lovely this is compared to SWFObject 1.x <3
'backcolor':'#555555',
'frontcolor':'#ffffff',
'lightcolor':'#ffffff',
'controlbar':'over',
'skin':'player/bekle.swf',
'plugins':plugins,
'volume':'100',
'streamer':'../stream.php',
'file':encodeURIComponent(path),
'hd.file':encodeURIComponent(path + '&hd=1'),
'duration':duration,
'type':'http'
};
var params = {
'allowscriptaccess':'always',
'allowfullscreen':'true'
};
var attributes = {
'id':playerId,
'name':playerId
};
swfobject.embedSWF('player/player.swf',playerId,'100%','337','8','express.swf',flashvars,params,attributes);
First, let's straighten out some "things" in your player code.
1) Wrong format for the "color" flashvars.
2) You need to use a full URI for the value of the streamer flashvar.
3) Use the flashvar id for your Linux users.
4) The id of the HTML element that swfobject writes the object element to should be different than the player's id.
var plugins = 'hd-1,quickkeys-1';if (playlist[item]['video'] != '1') { // This is audio only. Give the user some eye-candy =)
plugins += ',spectrumvisualizer-1';
}
var flashvars = { // Look at how lovely this is compared to SWFObject 1.x <3
'backcolor': <strong>'555555',</strong>
'frontcolor': <strong>'ffffff',</strong>
'lightcolor': <strong>'ffffff',</strong>
'controlbar': 'over',
'skin': 'player/bekle.swf',
'plugins': plugins,
'volume': '100',
'streamer': <strong>'http://www.domain.com/path/stream.php',</strong>
'file': encodeURIComponent(path),
'hd.file': encodeURIComponent(path + '&hd=1'),
'duration': duration,
<strong>'id': playerId,</strong>
'type': 'http'
};
var params = {
'allowscriptaccess': 'always',
'allowfullscreen': 'true'
};
var attributes = {
'id': playerId,
'name': playerId
};
swfobject.embedSWF('player/player.swf', <strong>player</strong>, '100%', '337', '8', 'express.swf', flashvars,params,attributes);
Your FLV video container file must have the array of time/byte-position metadata to use pseudostreaming.
You can check the metadata with flvdump from: http://code.google.com/p/flvmeta/
You can use FLVMDI, flvtool2, flvtool++, yamdi, flvmeta, or other tools to create and inject the metadata array.
Using Live HTTP Headers for Firefox or ieHTTPHeaders for Internet Explorer, you should see requests that look like:
http://www.domain.com/path/stream.php?file=video.flv&start=12345