Results 1 to 10 of 10

Thread: How to Access-Control-Allow-Origin to playlist.m3u8 file?

  1. #1
    Join Date
    Dec 2011
    Posts
    22

    Default How to Access-Control-Allow-Origin to playlist.m3u8 file?

    I would like to read the playlist file from a domain different to the one that Wowza is running on. I'm currently doing this via a jquery get request to path/to/playlist.m3u8. This works fine when running from a file but when running from localhost I get this:

    XMLHttpRequest cannot load http://slalom.local:1935/timedmetatest/mp4:sample.mp4/playlist.m3u8. 
    Origin http://localhost is not allowed by Access-Control-Allow-Origin.

  2. #2
    Join Date
    Sep 2011
    Posts
    1,920

    Default

    Hi
    There is a file called crossdomain.xml and a file called clientaccesspolicy.xml have you made changes in ether of these files?

    crossdomain.xml is set to allow all as the default which is why I ask.
    clientaccesspolicy.xml is set to allow all as the default as well.

    Please check these files as this may not have been the default (to allow all) in the past.

    Jason

  3. #3
    Join Date
    Dec 2011
    Posts
    22

    Default

    Hi Jason thanks for your reply.

    The crossdomain.xml file currently reads:

    <cross-domain-policy>
    	<allow-access-from domain="*" />
    	<site-control permitted-cross-domain-policies="all"/>
    </cross-domain-policy>
    Is there anything I should add to this?

  4. #4
    Join Date
    Sep 2011
    Posts
    1,920

    Default

    Hi
    No that's correct,
    I think if that's not the case then you must have a policy on the local server which stops you from getting data from outside the local server.

    Unfortunately I don't know where this policy would be for you locally.

    Jason

  5. #5
    Join Date
    Dec 2011
    Posts
    22

    Default

    Hi

    Is there a way I can simply do 'resp.setHeader("Access-Control-Allow-Origin", "*");' in the HTTPProvider class responsible for the playlist.m3u8 hosting?

  6. #6

    Default

    See IHTTPStreamerSession.setUserHTTPHeader

    Charlie

  7. #7
    Join Date
    Dec 2011
    Posts
    22

    Default

    Will do, thanks Charlie

  8. #8
    Join Date
    Dec 2011
    Posts
    22

    Default

    As far I'm aware, IHTTPStreamerSession is passed as an argument to onHTTPSessionCreate. I'm not dealing with sessions; I would just like to be able to access the playlist.m3u8 file. As the error messages are point to Access-Control-Allow-Origin, I have a strong suspicion its a case of setting the header of the HTTPProvider that is responsible for the playlist.m3u8 response output.

    Can anyone point me in the right direction as to where or how to obtain the playlist.m3u8 file before it is streamed?

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

    Default

    HTTP origin stream is a possible (maybe) future feature of Wowza 3, but I don't have any time frame. At present it is not supported, though not impossible. I'm not sure, but I don't think your approach of extending Wowza will work, though I am not sure what to suggest, an external approach perhaps.

    Richard

  10. #10
    Join Date
    Dec 2011
    Posts
    22

    Default

    We're using Wowza with Node.js. Node is taking care of the majority of the HTTP requests. The timed metadata is what we're most interested in and after discovering that getting timed meta of HLS streams is restricted to native iOS apps we're trying everything possible to work out a way of synchronising live material with html content.

    I found this article very helpful: http://www.wowza.com/forums/content....ams-(ID3-tags)

Similar Threads

  1. Replies: 2
    Last Post: 09-30-2014, 12:32 PM
  2. Replies: 4
    Last Post: 09-05-2012, 06:32 AM
  3. Replies: 5
    Last Post: 11-16-2011, 10:30 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
  •