Hey guys,
I wrote this code to autoPlay the video only the first time the page is loaded. Is there a better way to accomplish this? JSON is nice, but doesn't seem very friendly to being programmatically updated.
Thanks,
Cameron
I wrote this code to autoPlay the video only the first time the page is loaded. Is there a better way to accomplish this? JSON is nice, but doesn't seem very friendly to being programmatically updated.
Thanks,
Cameron
var config = {
logo: {
url: '/img/misc/logo.png',
fullscreenOnly: false
},
plugins: {
controls: {
url: '/flash/flowplayer.controls-3.0.1.swf',
backgroundColor: '#343434',
backgroundGradient: 'low',
fontColor: '#ffffff',
timeColor: '#c2d114',
autoHide: 'never',
progressColor: '#c2d114',
bufferColor: '#313131',
buttonColor: '#212121',
buttonOverColor: '#313131'
}
}
};
if (readCookie('TU-movie1'))
supplement = {
playlist: [
{
url: '/video/movie1.jpg',
scaling: 'orig'
},
{
url: '/video/movie1.mp4',
autoPlay: false,
autoBuffering: true
}
],
};
else
{
supplement = {
playlist: [
{
url: '/video/movie1.jpg',
scaling: 'orig'
},
{
url: '/video/movie1.mp4',
autoPlay: true,
autoBuffering: true
}
],
};
createCookie('TU-movie1',1,365);
}
var i;
for (i in supplement)
config[i] = supplement[i];
$f("video-player", "/flash/flowplayer.commercial-3.0.1.swf", config);