4 Replies Latest reply on Jun 2, 2010 2:22 AM by Philarmon

    Problems with Akamai Streams


      Hi !


      I am new to OSMF and i love it. However, i can not get the Akamai streams to work properly.


      If i understood it correctly, OSMF should play the Akamai streams even without any plugins ( http://forums.adobe.com/message/2636240#2636240 )


      My player plays "normal" streams and progressive downloads just fine, but if i try an Akamai stream, i am first getting the MediaStateChangeEvent with "ready" and then a MediaStateChangeEvent with "playbackError". After that i am getting a MediaError with errorcode 16 (Stream not found)


      I am trying to connect just like i do for all other streams:


      var resource:URLResource = new URLResource(streamURL);
      var mediaElement:MediaElement =  _mediaFactory.createMediaElement(resource);


      _mediaPlayer.media = mediaElement;



      As i said, it works fine with normal streams (so my player works) and the same Akamai streams are playing fine in other players (for example, the Akamai test player) so the stream URLs are also fine.


      please help


      One more question regarding the plugins - if i would need to play secure Akamai streams, then i still would need the plugin, right ? And for dynamic streaming i still need the SMIL plugin ?


      Thank you !

        • 1. Re: Problems with Akamai Streams



          Is the problem stream live or vod?  Are they secure streams?


          If you put put the token on the URL as query params it will play fine without the Akamai plugin loaded.  If you want to attach the token as resource metadata, you'll need to load the plugin. The AkamaiPluginSample app might be a good place to start trouble shooting.


          I would recommend you use the Akamai plugin.  It sets optimal buffer lengths, handles connect-level and stream-level auth, and knows how to recover from primary and secondary encoder crashes for live streams.


          For FMS dynamic streaming, yes, you need to load the SMIL plugin also. The Akamai plugin works well with all the other plugins in the OSMF release.


          Let me know if you need more help.


          - charles

          1 person found this helpful
          • 2. Re: Problems with Akamai Streams
            Philarmon Level 1

            Hi !


            Thanks for the response


            Well, meanwhile i finally figured it out with the plugin loading and got most of stream types to play.


            The only type of streams i can not get to work properly are vod streams that have a .flv or .mp4 extension. All other vod streams (if the URL have no extensions at all) seem to play fine though.


            My player connects to the stream, then im getting


            onMediaPlayerStateChange: ready
            onMediaLoadStateChange: Media loaded.


            and then


            onMediaPlayerStateChange: playbackError


            Is the mediaElement built based on the type of URL somehow ? My guess is that the player is trying to play it as progressive download somehow because of the ".flv" ?


            The strange thing though is that it still plays fine in the Akamai test player http://support.akamai.com/flash/


            If you select the "on demand" streams in the top right dropdown, they also have the extension "flv" and "mp4". My stream plays there fine as well.


            Looks like there is something i am still missing Any ideas ?


            Thank you for your time !

            • 3. Re: Problems with Akamai Streams



              For the mp4 streams you need to add the prefix like this:




              For the .flv files, you need to remove the extension.  The support player does these things for you, that's why your streams play fine there.  We don't believe a plugin or a framework should be modifying URLs, so this needs to happen at the player level.



              - charles

              • 4. Re: Problems with Akamai Streams
                Philarmon Level 1

                Thank you very much Charles, works like a charm