Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Additional Parameters for playvid() - Playlist doesn't display correct Videotitles


Hello,

I'm working for a customer who actually bought your script. Thing is there have been several people working on the customers site before I started there.

Neither do I know if it's normal to pass the image-location to the playVid() function nor do I know if I even have to pass the time to it.
However, I had to add the last parameter to handle some related database-functions. The function-call now looks like this:

playVid('b7akJd356VM&feature=youtube_gdata_player' , '7' ,'Android Lust - Follow' ,'http://i.ytimg.com/vi/b7akJd356VM/0.jpg' ,'04:20', 'noTT');

As far as I could analyze it using firebug it's working fine if I just cut out the last 3 parameters.

If I don't it'll add just the time and the last Parameter to the stream_titel-container when the next title is played. Like '04:20','noTT'.

Also the first playlist-item works fine, I guess because the function getPlayedVideo() isn't called on the first one.

I followed all calls to the getPlaylistItem() function here:

jwplayer("stream_player").onPlaylistItem(
function(){
var item = jwplayer("stream_player").getPlaylistItem();
var itemx = item.title;
document.getElementById('stream_titel').innerHTML = ' '+itemx;
}
);

As your js-file seems to be minified i'd be really nice (and time saving) if you could tell me either what that function does or how to change the behavior.

kind regards,
chris

P.S. I'm german so please excuse the bad english.

4 Community Answers

JW Player

User  
0 rated :

Grusse aus Bad Salzuflen

Ich bin ein Kanadier so entschuldigen Sie bitte meinen schlechtes Deutsch

gerne ein link bitte fur troubleshooting

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you provide a link?

JW Player

User  
0 rated :

Hi Willie,

sorry, as it isn't my project I can't post links here. :(

Still don't know what getPlaylistItem() exactly does, but figured out that it seems to use arrays that are created before the function call.

Found this (twice):

matchesTitel = completePlaylist.match(/,s'.{1,40}');">/gi);

And as I'm not really into JavaScript I replaced it with some even more horrible stuff:

matchesTitel = completePlaylist.match(/(playVid('[^ ]*'s,s'[^ ]*'s,')(.*?)'/gi);

for(var i=0, len=matchesTitel.length; i < len; i++){
matchesTitel[i] = matchesTitel[i].replace(/playVid('[^ ]*'s,s'[^ ]*'s,'/g, '');
}

It's magically working now. But it feels kind of wrong to do it that way. o.O

Are all those RegEx really part of the original code?

kind regards,
chris

Ethan Feldman

JW Player Support Agent  
0 rated :

Can you put up a test page and email it to us privately if possible?

This question has received the maximum number of answers.