Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Send to register page if not a member

19 replies [Last post]
Reply

Hi, I am right now testing JW for small online business..

Is it possible in anyway to show the player with the playlist and do so it only works as a link to a register page?? I meen so Guests can see what videos there is for members...
??

Regards
Jannik

Reply

I am not 100% sure what you are asking here, can you clarify?

Reply

Hi Ethan
Thanks for your answer.

I will try to specify:)

I offer memberships where you can see videos leaning to play music.

I want guests who are not logged in to see the video with the playlist, but when they click on the video they must be sent to a page telling them to create a profile...

Now they can't see the player at all... and therefore they cannot really see what they get...

Really hope you can help me. Would love to buy and use your player... if I just can get it to work proberly:)

Regards
Jannik

Reply

@Jannik

You could use the events feature.

For example:

anyone who isn't a membership gets assigned mem0 whereas members get assigned mem1.

then in the events; for example:

events:
{
  onReady: function ()
    {
      if(!mem0)
       {
         play the video
       }
       else
        { window.location= register page
        }
    }
}

The above is thinking off the top of my head BUT it should give you insight on what you may be able to do to achieve your goal by having non-members(mem0) register.

Again, this is off the top of my head actually thinking out loud on this and not sure if this will solve your query.

Reply

sounds like something I could use...

Where is it this could should be inserted???

In the page that calls the player? or in some jwplayer file???

Thanks in advance

Reply

link please or test page?

My guess would be on the page but in looking at a link or test page would help

Reply

The test page will not show you anything, as you are not logged in..

But here is my code:

In my php file

add_to_head("<script type='text/javascript' src='jwplayer/jwplayer.js'></script>");

//This is shown if you are logged in
echo "<div id='mediaplayer'></div>";

echo "<script type='text/javascript'>
jwplayer('mediaplayer').setup({
'flashplayer': 'jwplayer/player.swf',
'id': 'playerID',
'width': '700',
'height': '280',
'playlistfile': 'playlist.xml',
'playlist.position': 'right',
'playlist.size': '250',
'controlbar': 'over'
});
</script>";

//This is shown if you are a guest THIS IS WHAT I WANT TO CHANGE, SO GUESTS CAN SEE THE VIDEO AND PLAYLIST
echo "<a href='register.php'><img src='images/video-poster.jpg' alt='' width='480' height='270' /></a>";

Reply

You can re-direct people to a register page at the end of the video, like this:

<h2>Redirecting on complete</h2>

<div id="container">This'll be the player</div>

<script type="text/javascript">
jwplayer("container").setup({
    file:"http://www.longtailvideo.com/jw/upload/bunny.mp4",
    height:400,
width:600,
    events:{
        onComplete: function() {
            window.location = "register_now.html";
        }
    },
});

</script>

Reply

Hi Ethan.
Can you help me so it sends to register BEFORE or INSTEAD OF playing the video...

Thanx:)

Reply

Ok, so you don't really want people to be able to play the video then? Why not just make a picture of a player then for non-registered users, and then clicking on the image brings you to a register page?

Reply

I had that before, but now I use playlists... and I want the guests to see what videos there are... and see the descriptions...

Reply

I will just add:
I am going to have a lot of playlists ... and they are going to be updated weekly or dayly... so greating a unique image to each player everytime I edit a playlist is just not a good solution...

Hope you can help

Regards
Jannik

Reply

So then why not make an image with a playlist? I'm sorry but there is not any functionality do something like this. This is the first time I have seen something requested by this, where users will see the video with the playlist and then they can't even play the video are are re-directed? The only thing I can think of is instead of doing the onComplete function, you do an onPlay function, so users will click the player to play the video, and then THAT would re-direct them to the page asking them to register.

Reply

exactly... and how do I do the onPlay function??

Can you perhaps insert that function into my code:

echo "<div id='mediaplayer'></div>";
echo "<script type='text/javascript'>
jwplayer('mediaplayer').setup({
'flashplayer': '".BASEDIR."jwplayer/player.swf',
'id': 'playerID',
'width': '730',
'height': '280',
'playlistfile': '".BASEDIR."downloads/".$row['url']."',
'playlist.position': 'right',
'playlist.size': '250',
'controlbar': 'over'
});
</script>";

Thanks for your help:)

Reply
<div id="container">This'll be the player</div>

<script type="text/javascript">
jwplayer("container").setup({
    file:"http://www.longtailvideo.com/jw/upload/bunny.mp4",
    height:400,
width:600,
    events:{
        onPlay: function() {
            window.location = "register_now.html";
        }
    },
});

</script>

Reply

Wow this is very cool... and it works:) can we do so it first redirects after like 10 secs... so guests can see 10 secs of the video before being redirected to register??

Reply

Cool, glad it works :)

Yes, you could probably use the onTime event in order to do this:

onTime(callback)

    When the player is playing, fired as the playback position gets updated. This happens with a resolution of 0.1 second, so there's a lot of events! Event attributes:

        duration: Number: Duration of the current item in seconds.
        offset: Number: When playing streaming media, this value contains the last unbuffered seek offset.
        position: Number: Playback position in seconds.

Reference - http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12540/javascript-api-reference

You would probably need to write your own custom if statement here that basically tells the player if the time is 10 seconds, then do the re-direct.

Reply

Here is a demo of how to do this:

<html>
<head>
<title>Test</title>
</head>
<body>

<script type='text/javascript' src='http://player.longtailvideo.com/jwplayer.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
  jwplayer('mediaspace').setup({
    'flashplayer': 'http://player.longtailvideo.com/player.swf',
    'file': 'http://content.longtailvideo.com/videos/flvplayer.flv',
    'controlbar': 'bottom',
    'width': '468',
    'height': '320',
     events:{
        onTime: function(event) {
if(event.position >= "10"){
window.location = "register_now.html";
}
        }
    }
  });
</script>

</body>
</html>

Reply

Very cool. works perfect. Thanks alot.

Now I just have to figure out the HD plugin, and the best ways to save my videos... then I am buying this sofware for sure:)

Reply

Np :)

Regarding implementing plugins, here is a general overview - http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/10629/using-jw-player-plugins

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options