Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Current item playing in vod playlist

  1. #1

    Default Current item playing in vod playlist

    Hi!

    Is there any way to retrieve Src of currently played item in vod on server-side?

  2. #2
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    You will see metadata in the stream when a new items starts playing. I'm not sure what you mean by "Src". The file name?

    Richard

  3. #3

    Default

    Yes, I mean new file name being processed and played in vod playlist (playlist like in Vod insert midroll tutorial).
    But I actually don't understand your answer. How can I refer this metadata? Is there any listener I should attach?

  4. #4
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I do not know how to do this server-side. I don't think there is a way. Wowza just treats this like one stream, there is not a Notifier for this like the Stream class has, as far as I know.

    Richard

  5. #5

    Default

    [st]There's the onPlaylistItemStart() onPlaylistItemStop() event listeners.[/st]
    Last edited by randall; 03-30-2012 at 04:37 AM.

  6. #6

    Default

    But these methods are for Stream class objects.
    When making vod playlist I cannot use Stream and Playlist methods (or can I?).
    I have to do it like in Vod insert midroll tutorial.

    @Randall, could you please correct my thinking? Or give some code snippets...

    @Richard, I override MediaReaderFLV like that:

    public class MediaReaderFLVInjectMetadata extends MediaReaderFLV
    {
    @Override
    public void setMediaReaderItem(MediaReaderItem arg0) {
    -> super.setMediaReaderItem(arg0);
    }

    When new MediaReaderItem is being picked up during streaming this method is executed.
    That means it can be done somehow to respond to new item being chosen...
    But... how to do that?

  7. #7

    Default

    "But these methods are for Stream class objects.
    When making vod playlist I cannot use Stream and Playlist methods (or can I?)."

    Yes, sorry, you are right.
    Last edited by randall; 03-30-2012 at 04:37 AM.

  8. #8

    Default

    Note: changed answer above

  9. #9

    Default

    class StreamListener implements IMediaStreamActionNotify2
    {
    public void onPlay(IMediaStream stream, String streamName, double playStart, double playLen, int playReset)
    {
    System.out.println("onPlay[" + stream.getContextStr() + "]: playStart:" + playStart + " playLen:" + playLen + " playReset:" + playReset + " streamName:" + streamName);
    }

    ...

    public void onSeek(IMediaStream stream, double location)
    {
    String streamName = stream.getName();

    System.out.println("onSeek[" + stream.getContextStr() + "]: location:" + location + " streamName:" + streamName);
    }
    ...
    }

    Now;

    - onPlay works fine - it logs actually started streamName every time new item is played.

    - onSeek is still a problem - when I seek on time bar in flash client onSeek logs streamName but it is not the streamName that is seeked to - it's the stream name of entire IMediaStream and that's not what I want. And I don't know how to retrieve it in this method. And onPlay is not executed after seek so... I'm stuck

  10. #10

    Default

    Can you show me what the two different streamNames return?

    Check out:
    getUniqueStreamIdStr()
    stream.getClient().getUri()

    Maybe that second one is what you want.

Page 1 of 2 12 LastLast

Similar Threads

  1. item not in cache vod error
    By dpakrk in forum On-Demand Streaming
    Replies: 4
    Last Post: 07-11-2014, 06:42 PM
  2. streamname group playlist file item path
    By koffieschaap in forum AddOn: Transcoder
    Replies: 2
    Last Post: 11-14-2011, 07:47 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
  •