You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Forum user: laughingbovine

Basic information

Registered Nov 6, 2009
Last login Sep 14, 2010
Forum posts 7
Direct URL http://www.flowplayer.org/forum/users/18321

Latest forum posts

Posts:

Registered:

» » » » Multiple Players and referring to them

Posted: Sep 15, 2010

Ah, cool. Thanks for the jQuery tip.

Yeah, so I tried to recreate the issue on a demo page but wasn't able to =). Unfortunately I dont have the time right now to fiddle with it and see what was causing the problem. I didn't think I did anything wrong, and all I did to get it working was switch to using IDs to uniquely identify the different players. Now that I tried again, my variables work as does '$f(index)'.

But still... sounds like it was my mistake. I'll post more if I figure out what did it.

Thank you very much for your time!

Posts:

Registered:

» » Multiple Players and referring to them

Posted: Sep 15, 2010

I'm sorry... I don't see how that's different than what I have done.

As I said, I was able to reference the second and third players via their ID, but not by index or through variables returned by the flowplayer() constructor.

Here's another example:

$(function () {
        var f1 = flowplayer('player_1', ...);

        // this flowplayer has a playlist which otherwise works (clips play, ff skips to the next clip, etc.)
        var f2 = flowplayer('player_2', ...);
 
        $('#playlist_2 a').click(function () {
            var clip_index = parseInt($(this).attr('clip'));

            f2.play(clip_index); // doesn't work
            $f(1).play(clip_index); // doesn't work
            $f('player_2').play(clip_index); // works!
        });
});

...

<div id="playlist_2">
<a clip="0">clip 0</a>
<a clip="1">clip 1</a>
<a clip="2">clip 2</a>
<a clip="3">clip 3</a>
</div>

Posts:

Registered:

» Multiple Players and referring to them

Posted: Sep 14, 2010

In the meantime I started using the $f('playerID') method of referencing players which seems to be the only way that works. The reason why I didn't do it this way in the first place is because I wasn't using just IDs.

Posts:

Registered:

Multiple Players and referring to them

Posted: Sep 14, 2010

I have a few flowplayers on one page. One with only one item in the playlist, the others with several (not sure if that matters).

When I try to refer to the players to start the clips or what-have-you, I keep referring to the first player and can't seem to get to the others.

I've used the following methods:
On creation...

// first player
flowplayer(...);

// second player
$f_player2 = flowplayer(
    $('.player2').get(0),
    '/flowplayer/flowplayer-3.2.4.swf',
    ...
);
$f_player2 just refers to the first player.

And by index...

$f(1)
$f(1) just refers to the first player (as does $f(0)).

Bug? Or is it me?

Posts:

Registered:

ah.. found on forum

Posted: Nov 8, 2009

this guy seems to have the same problem
http://flowplayer.org/forum/3/20389#post-27459

as i said, i wound up doing a 'manual' playlist a la..

<div id="playlist">
    <div href="a.mp3">AAA</div>
    <div href="b.mp3">BBB</div>
    <div href="aintnobody.mp3">Ain't Nobody</div>
    <div href="d.mp3">DDD</div>
</div>
and then..

$f("player").playlist("div#playlist");

This actually worked out better for me since I needed 2 playlists to link to the same Flowplayer, and it seems like taking the templating route would put the playlist all in one place.

Thanks for all your time and help.
- Geoff

Posts:

Registered:

» » using an apostrophe in playlist title (with playlist plugin) causes flowplayer not to load

Posted: Nov 7, 2009

The extra comma wasn't the issue... I had other playlist items afterwards. Also, wasn't using PHP. I tried using '&apos;' and others with the same result (still didn't work). I wound up creating the playlist manually.

Not sure why it wasn't not-working for you. I was able to reproduce reliably.

Posts:

Registered:

using an apostrophe in playlist title (with playlist plugin) causes flowplayer not to load

Posted: Nov 6, 2009

I was creating a playlist with the playlist plugin, and one of my songs had an apostrophe in the title... the playlist plugin apparently does not like this.

heres the template i'm using...

<div class="derp">
    <div><a href="${url}">${title}</a></div>
</div>

and heres the playlist from the flowplayer config...

playlist: [
    { title : "Ain't Nobody", url   : 'aintnobody.mp3' },
    ...
]

(amongst other code and other playlist entries) causes the flowplayer element to show up all black (no player). Taking out the apostrophe makes everything run fine.

Oh, and another thing... the playlist plugin apparently doesn't work with only one playlist entry (still using templates in this case).

My guess is that it's a problem with the whole javascript templating thing you guys do.