# how catch client events play, pause, stop, seek

**URL:** <https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769>\
**Category:** Wowza Streaming Engine\
**Created:** [February 15, 2012, 12:11am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769 "2012-02-15T00:11:45Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dima\_Kirakosyan](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dima\_Kirakosyan](https://community.wowza.com/u/Dima_Kirakosyan)\
**Post date:** [February 15, 2012, 12:11am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/1 "2012-02-15T00:11:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [February 15, 2012, 4:10pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/2 "2012-02-15T16:10:28Z")

</div>

To catch play use onPlay

For pause use onPauseRaw instead of onPause.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 2, 2012, 1:36pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/3 "2012-05-02T13:36:16Z")

</div>

IMediaStreamActionNotify.onSeek() should work.

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 7, 2012, 4:52pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/4 "2012-05-07T16:52:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 9, 2012, 1:31pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/5 "2012-05-09T13:31:18Z")

</div>

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

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

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 9, 2012, 7:38pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/6 "2012-05-09T19:38:40Z")

</div>

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

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [May 10, 2012, 1:09pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/7 "2012-05-10T13:09:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jan\_Ehrhardt](https://avatars.discourse-cdn.com/v4/letter/j/aca169/32.png) [@Jan\_Ehrhardt](https://community.wowza.com/u/Jan_Ehrhardt)\
**Post date:** [November 17, 2015, 4:52pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/8 "2015-11-17T16:52:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dima\_Kirakosyan](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dima\_Kirakosyan](https://community.wowza.com/u/Dima_Kirakosyan)\
**Post date:** [February 15, 2012, 9:27pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/9 "2012-02-15T21:27:32Z")

</div>

Thank you, Richard

---

<div class="post-metadata">

**Author:** ![Maanas\_Royy](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maanas\_Royy](https://community.wowza.com/u/Maanas_Royy)\
**Post date:** [May 2, 2012, 11:27am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/10 "2012-05-02T11:27:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Maanas\_Royy](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maanas\_Royy](https://community.wowza.com/u/Maanas_Royy)\
**Post date:** [May 7, 2012, 9:48pm UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/11 "2012-05-07T21:48:29Z")

</div>

Can i also disallow seek using IMediaStreamActionNotify.

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

---

<div class="post-metadata">

**Author:** ![Maanas\_Royy](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maanas\_Royy](https://community.wowza.com/u/Maanas_Royy)\
**Post date:** [May 9, 2012, 7:00am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/12 "2012-05-09T07:00:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Maanas\_Royy](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maanas\_Royy](https://community.wowza.com/u/Maanas_Royy)\
**Post date:** [May 10, 2012, 12:14am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/13 "2012-05-10T00:14:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Maanas\_Royy](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maanas\_Royy](https://community.wowza.com/u/Maanas_Royy)\
**Post date:** [May 10, 2012, 7:12am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/14 "2012-05-10T07:12:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Maanas\_Royy](https://avatars.discourse-cdn.com/v4/letter/m/85e7bf/32.png) [@Maanas\_Royy](https://community.wowza.com/u/Maanas_Royy)\
**Post date:** [May 11, 2012, 12:03am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/15 "2012-05-11T00:03:14Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![Jason\_Hatchett](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hatchett/32/391_2.png) [@Jason\_Hatchett](https://community.wowza.com/u/Jason_Hatchett)\
**Post date:** [April 29, 2016, 3:15am UTC](https://community.wowza.com/t/how-catch-client-events-play-pause-stop-seek/37769/16 "2016-04-29T03:15:53Z")

</div>

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](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
