Wowza Community

how catch client events play, pause, stop, seek

How i can catch client events such as play, pause, stop, seek on Wowza side for video on demand? I tried using IMediaStreamActionNotify methods onPause, onPlay, onSeek, but they don’t worked, but onSeek method. This works nice. I watched with jw player

To catch play use onPlay

For pause use onPauseRaw instead of onPause.

Richard

IMediaStreamActionNotify.onSeek() should work.

Richard

I don’t think so, this is a Notifier not an Override. I don’t think there is a server-side way to disallow seek request.

Richard

Right, override seek, good idea. You can use WMSProperties to store info per client.

client.getAppInstance().getProperties().setProperty("lastSeek", seekLocation);
// then later:		
String lastSeek = client.getAppInstance().getProperties().getPropertyStr("lastSeek");

Richard

I’m not sure what you mean. There are many NetStatusEvent notifications sent to Flash client on NetConnection and NetStream.

Richard

Take a look at the ServerSideModules example that ships with Wowza in the examples folder, it is a working reference for Flash <> Wowza communications.

Richard

In the Wowza3 logs I saw the ‘unpause’ event. Can I catch that as well? I want to prevent, that people are leaving their desk and stay paused too long.

Thank you, Richard

Thats a good info Richard,

I want to prevent seek from server side. I want to evaluate whether to allow seek on a media from server side based on some parameters. So when a seek request comes i want to intercept and evaluate as to whether to permit or not if not permitted then no response will flow from server and default play back will continue. In case it is permitted then the action will fire and it will further leads to action on IMediaStreamActionNotify.

Any suggestion where i can intercept this request evaluate and then let it move ahead.

Can i also disallow seek using IMediaStreamActionNotify.

Say i return false will the server ignore the seek request?

I tried to over ride server side implementation of seek(IClient client, RequestFunction function, AMFDataList params)

I m able to hold the seek. When i do not fire the this.invokePrevious(client, function, params) the seek hangs and waiting for input from the server.

It seems i can use the AMFDataList params to set the seek position to last played position.

Can you help in setting the location to last seek position. Say i store the last seek position.

Which params of AFMDataList contains the seek location

Thanks

Thanks i got it working.

Still struggling to find a way to detect onComplete Event. Any link which shows i can create flash pluggin and catch the parameter at Wowza Server end in customs module

I want to send the status from flash to wowza server. Say in play on meta i fire a location update into to Wowza Server which catches at its own end.

Thanks

Hello Jan,

I would suggest implementing the following module:

https://www.wowza.com/docs/how-to-disconnect-connected-clients-after-a-specified-time-period-moduletimeddisconnect

for your workflow.

If this does not fully meet your needs please let me know.

Regards,

Jason Hatchett