Results 1 to 7 of 7

Thread: How to pause a stream from the server end ?

  1. #1

    Default How to pause a stream from the server end ?

    Hi All,

    I am using wowza + jw player for streaming. it's kind of a pay per view app, where I keep track of user's time spent watching.

    I am trying to create pause events every X minutes so that we can ensure he's actually watching the video.

    i tried

    (stream.getPlayer()).pause(IMediaStreamPlay.PAUSE_PAUSE, 0);

    and
    stream.setIsPlaying(false)

    but this gets the player into buffering mode and it gets stuck. btw, what's the second parameter in IMediaStreamPlay.pause(), is it the offset at which the player is to be paused ? i am looking for something that just pauses the player as soon as the command reaches from server to jw player, not quite interested in an offset.

    i dont have any knowledge about flash streaming but i guess pause event is triggered by NetStream.Pause so i tried these as well,

    stream.send("NetStream.Pause");
    and
    sendClientOnStatusError(stream.getClient(), "NetStream.Pause", "Press Play to continue");

    but nothing happened.

    Can someone please help me with pausing the player from server side ?

    Thanks,
    RaBelle

  2. #2

    Default

    You're going to want to pause the stream on the player side. Look into the flash documentation for how to do that. Or, check out one of the Wowza simple video streaming examples. You can set a timer in Flash to have the stream paused after a certain amount of time.

    If you want to control pausing from the Server side. You will need to use Remote Procedure Calls. From the server, using RPC, you'll send a message that will run a certain function (your pausing function) on the Flash client. See the User Guide for examples of Bi-directional Remote Procedure Calls.

  3. #3

    Default

    Quote Originally Posted by randall View Post
    Look into the flash documentation for how to do that. Or, check out one of the Wowza simple video streaming examples. You can set a timer in Flash to have the stream paused after a certain amount of time.
    if it's possible for you, could you please point me to this tutorial. i assume you are talking about modifying the jwplayer and i have no knowledge of as3, so it'd be great if you could point me to the right place where to begin

    Quote Originally Posted by randall View Post
    If you want to control pausing from the Server side. You will need to use Remote Procedure Calls. From the server, using RPC, you'll send a message that will run a certain function (your pausing function) on the Flash client. See the User Guide for examples of Bi-directional Remote Procedure Calls.
    i suppose, this should be easier to implement but still i'd need to modify the jwplayer to add the pause routine, are any examples that i cana refer, esp pertaining to jwplayer

  4. #4

    Default

    I was able to work the player, taking pointers from this tutorial http://www.longtailvideo.com/support...ullscreen-code

    Just in case, someone has a similar problem

  5. #5
    Join Date
    Dec 2007
    Posts
    22,013

    Default

    Also take a look this example of IMediaStreamActionNotify3.
    http://www.wowza.com/forums/content....-of-codec-info

    The onPauseRaw event corresponds to NetStream.pause. (Don't use onPause)

    Some PPM and PPV systems use IMediaStreamActionNotify interface to track time, but it only works for Flash RTMP clients. Looking back at logs is easier and not limited to Flash RTMP clients. You can track usage for users in the logs following this guide:
    http://www.wowza.com/forums/content....aming-by-users

    Richard

  6. #6
    Join Date
    Sep 2011
    Posts
    1

    Default

    I am looking for something similar to this. I want to track "view count" on a video, but I want to make sure a view time threshold is met before it's considered "viewed". If Wowza can write a log file for any activity on any protocol why is this not made available through events/methods? Dredging through logs seems like a back-door unnecessary approach. Is there an option to send log entries to a database with the fields delimited? Is this a feature to be considered for a future release?

    Thanks for considering,

    Chris

  7. #7
    Join Date
    Dec 2007
    Posts
    22,013

Similar Threads

  1. Need help to make server continue stream VOD content while pause HLS stream
    By JohnnyTran in forum Video On Demand Streaming Discussion
    Replies: 1
    Last Post: 07-15-2013, 08:05 AM
  2. Can we pause and resume Live Video Stream in wowza media server ?
    By deepak.dixit in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 05-28-2013, 02:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •