Results 1 to 6 of 6

Thread: How to detect the stream is iphone or flash

  1. #1
    Join Date
    Dec 2008
    Posts
    14

    Default How to detect the stream is iphone or flash

    1 When play vod with iPad Player, I can see both OnStreamCreate & onHTTPCupertinoStreamingSessionCreate is called. Is onStreamCreate a general method instead of for flash player only?

    2 Can I detect if a stream is from iphone player or flash player with an instance of IMediaStream in OnStreamCreate.

    3 In the onStreamCreate(), can I get httpSession if this is a iphone stream?

    4 Is there a way for me to connect the events onStreamCreate & onHTTPCupertinoStreamingSessionCreate? By stream id?

    5 When play vod with iPad player, in onHTTPCupertinoStreamingSessionCreate
    httpSession.getQueryStr() returns correct query string

    but in onStreamCreate
    stream.getQueryStr() returns null

    What's wrong?

    Thanks
    Last edited by jordanliuhao; 10-08-2012 at 10:19 PM.

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

    Default

    Why is it a problem, what do you need to accomplish? onStreamCreate, as you observed, fires for http session as well as Flash stream. The stream name and querystring, as you observed, are null in onStreamCreate. The right place to get info is onHTTPCupertinoStreamingSessionCreate.

    Richard

  3. #3
    Join Date
    Dec 2008
    Posts
    14

    Default

    We have flash vod long time back. Now we need add iphone. We'd like to reuse more code. It means onStreamCreate, IMediaStreamActionNotify. We may need add some more code to handle onHTTPCupertinoStreamingSessionCreate. So we have above questions.

    One more question, will iphone vod trigger IMediaStreamActionNotify events? or I need handle IHTTPStreamerCupertinoVODActionNotify2 events?

    Thanks

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

    Default

    No, the IMediaStreamActionNotify is Flash rtmp only. An http session is different than rtmp netstream. A Flash rtmp NetConnection corresponds with Wowza IClient, and the rtmp NetStream corresponds with a IMediaStream. There can be many NetStream/IMediaStreams per NetConnection/IClient. Whereas an http session is much simpler, a playlist the device reads to make a series http requests to get responses containing media chunks. There is no equivalent to NetConnection. IMediaStreamActionNotify is built around RTMP NetStream interaction.

    Richard

  5. #5
    Join Date
    Dec 2008
    Posts
    14

    Default

    Thanks. Then I have the following questions.

    1 When streaming to iphone, I get both onStreamCreate and onHTTPCupertinoStreamingSessionCreate. I have used onStreamCreate to handle flash auth logic. Now I need handle auth in onHTTPCupertinoStreamingSessionCreate.
    I don't want to handle this twice. Should I use

    if (stream.getClient() == null) in onStreamCreate to see if it's not from a flash?

    2 I can rejectSession if auth failed. How can I stop the stream after the stream start? We have a timer, it is going to stop the streaming after sometime. Can I still use rejectSession or should I use shutdown?

    3 We have pay by time vod. iPhone doesn't give pause, play, seek event. What's the best way to count the time when user pause.

    4 We need set stream range for a movie sometime. e.g. start @ 15 min of the video and end @ 20 min. How can I do that?

    5 We also have pay by bytes vod. How can I get the total bytes sent?

    Jordan
    Last edited by jordanliuhao; 10-09-2012 at 10:14 AM.

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

    Default

    #1 I think that can work, you will have to test

    #2 use httpSession.rejectSession((

    #3 this is the best solution
    http://www.wowza.com/forums/content....aming-by-users

    #4
    http://www.wowza.com/forums/content....HTTP-streaming

    #5 Look at log rows with x-event "destroy" to get sc-bytes (server to client bytes) and x-duration

    Note that be because of the way cupertino streams are delivered in chunks accounting like you are doing is not as accurate as in rtmp streaming. There isn't a way around that.

    Richard

Similar Threads

  1. Can Wowza 4 stream from Flash to iPhone?
    By pidboretskyy in forum Live Streaming and Encoders
    Replies: 6
    Last Post: 05-10-2014, 01:51 AM
  2. Detect fragment number in San Jose stream (Flash HTTP)
    By slalompoint in forum Live Streaming and Encoder Discussion
    Replies: 2
    Last Post: 01-20-2012, 12:44 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
  •