2 Replies Latest reply on Nov 2, 2010 11:19 AM by djm132

    Cloudfront dynamic streaming of private content issue

    djm132

      I am using OSMF to implement dynamic switching in my project. It works fine with our local FMS server (switches up and down), but when i tried to make such with Amazon Cloudfront i've discovered that even if several streams specified in DynamicStreamingResource.streamItems no actual switching occurs (it stuck on initialIndex, 0 or whatever specified).

       

      The difference here is because we use cloudfront to stream private content using signed urls. Signature and policy specified in url as http get parameters, so the resource name for DynamicStreamingItem looks like

       

      mp4:stream_2000.mp4?Policy=XXXXXX&Signature=YYYYY&Key-Pair-Id=ZZZZZ

       

      After digging into the OSMF sources i've found the issue inside DynamicStreamingResourceDynamicStreamingResource.indexFromName function. At the NetStream.Play.Transition handler it compares the NetStatusEvent.info.details with stream resource names using this method. But the problem is in fact, that Cloudfront (and probably any FMS, not tested) returns "clean" stream name in info.details, like stream_2000.mp4.

       

      I think this method should cut everything begins with ? to ensure that get parameters does not affect switching.

       

      PS.

      Going to modify my copy of osmf sources, but think this may filed to osmf JIRA ?