How to play media and send another request to server

Seek help running and customizing Nuevoplayer Please do not post bug reports, or feature requests here.

How to play media and send another request to server

Postby sexclub » Sun Apr 04, 2010 1:17 pm

hi
How to play media and send another request to server (per one minute) at the same time
sexclub
 
Posts: 2
Joined: Sun Apr 04, 2010 1:10 pm

Re: How to play media and send another request to server

Postby dargre » Sun Apr 04, 2010 9:57 pm

I'm sorry but I do not follow your idea. You must be more precise.
Thank you,
Nuevolab Team
dargre
 
Posts: 299
Joined: Mon Sep 07, 2009 3:47 am

Re: How to play media and send another request to server

Postby sexclub » Tue Apr 06, 2010 1:29 am

Hi,
Sorry for my poor English. Let me explain more detail.
I use NuevoPlayer to play FLV media file, and I want to know how many time that user watched.
So my idea is that when NuevoPlayer is playing FLV, at the same time, making a trigger to send HTTP request to server side at one-minute interval.
Does NuevoPlayer provide event or method to achieve my idea?
Or where can I find related documents (such as API document)?
Thanks.
sexclub
 
Posts: 2
Joined: Sun Apr 04, 2010 1:10 pm

Re: How to play media and send another request to server

Postby nuevolab » Tue Apr 06, 2010 2:30 am

How can it be possible so flash app can call action that each user can dream?
That's simply not possible.

However Nuevoplayer has some javascript support, and it's possible to get current playing time (in seconds) using simple js function:
Code: Select all
function getUpdate(call, v1, v2, id)
{
   if(call == 'time') {
      var currentTime = v1;
                //do whatever you need here with currentTime value
   }
};

Where:
id = id name of the swf object (usually this is "nuevoplayer")
v1 = current time
v2 = time remaining to the end of video

So if someone knows javascript + ajax (can be already loaded jquery), can fires php function on certain time.
Best would be to put javascript posted above when document ready.

But what if user watches video for some time, then rewind and rewind....?

D.
nuevolab
Site Admin
 
Posts: 92
Joined: Sun Sep 06, 2009 2:32 am

Re: How to play media and send another request to server

Postby avcity » Tue Apr 13, 2010 8:42 am

Hi,
do you have any idea that we can observe the real playing time of the player, including the player was embed by other site, for example if a user watch 30 minute of video, if he skip forwarded to infront and watch just 5 minute, then on;y 5 minute will be counted. Can i pay you guys to fix or create this function for me? can this be done by using shell script + php? i use lighttpd now.

Thanks
avcity
 
Posts: 3
Joined: Wed Nov 04, 2009 10:36 am

Re: How to play media and send another request to server

Postby dargre » Thu Apr 15, 2010 7:38 pm

You cannot have any rational control over embed videos using own custom php or whatever code. Many browsers restricts to gather info from flash app, many sites owners or automated scripts restricts executing any code.
Look at faceboook and many others - their apps automatically removes "allowScriptAccess" param from flash object.
Thank you,
Nuevolab Team
dargre
 
Posts: 299
Joined: Mon Sep 07, 2009 3:47 am


Return to Troubleshooting & 'How Do I' Questions

Who is online

Users browsing this forum: No registered users and 0 guests

cron