I'm using a playlist and javascript to switch videos. Sometimes, more often than not, there is a visual and/or audio glitch at the beginning of the video, or a frame from the previous played video will flash on the before the new video starts. The videos are all H.264, and I've tried both mp4 wrappers and quicktime wrappers with the same result. Others have said that switching to FLV files solved the problem, but that is not an option for us.
The test site is http://www.stuckonon.com/indexD.php
You'll need to click on "Projects" at the top, and then choose "Color Correction" from the projects menu on the left. Any of the first 5 videos on the list should be good for testing. The problems arise when clicking on a new video, while another video is playing. (This test site has only been tested on Safari and Firefox on Macs)
The code I use for initializing the player looks like this:
$(document).ready(function(){
createPlayer('playerAholder','playerA','http://www.stuckonon.com/playlist/playlist_home.xml',false,'640','380','bottom');
createPlayer('playerBholder','playerB','http://www.stuckonon.com/playlist/playlist_reel.xml',true,'640','380','bottom');
homepagecaption();
projectpagecaption();
});
function createPlayer(thecontainer, theplayid, thefile, theauto, thewidth, theheight, thecontrol) {
var flashvars = {
file:thefile,
autostart:theauto,
image:"http://www.stuckonon.com/videostill/Soo-jamboxlogo2.jpg",
controlbar:thecontrol,
skin:"http://www.stuckonon.com/JWplayer/modieus2.swf",
bufferlength:"5",
playlist:"none",
// abouttext:"Stuck On On"
}
var params = {
allowfullscreen:"true",
allowscriptaccess:"always"
}
var attributes = {
id:theplayid,
name:theplayid
}
swfobject.embedSWF("http://www.stuckonon.com/JWplayer/player2.swf", thecontainer, thewidth, theheight, "9.0.115", false, flashvars, params, attributes);
};
The code for switching videos from the playlist looks like this and is called from an onclick:
function playfromlist(whichplayer2,vidnum,holderID){
whichplayer2.sendEvent('ITEM',vidnum);
};I am using jw player v. 4.5.230 and SWFobject v. 2.2
Any advice or assistance is very much appreciated. We're trying to go live with this site as soon as possible.
thanks,
Parke
I've made it easier to see/hear the problem. At my site, when you select a video from the list on the left, you then need to click on the "play" graphic in the player. When you click, you hear and/or see the glitch I've been describing. It also happens with AAC files. (You can test it in the "Music Library" section on the Projects panel)
Any help would really really be appreciated. I've tried all sorts of different encoded techniques and apps, all with the same result. Thanks!
-Parke