Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Create a space in DuraCloud which you will use to host streamed files
  2. Transfer media files to the space. Be sure that the files have been transcoded to support HLS (.ts and .m3u8 files are expected)
  3. Enable streaming
    1. To enable open streaming: Select the space in the DuraCloud interface and click the "ON" button next to "HLS Streaming:" in the Streaming section of the Space Detail pane. Alternatively, open streaming can be enabled using the same enable-streaming call as secure streaming, but with the "secure" parameter set to 'false".
    2. To enable secure streaming: Perform a POST HTTP call to the URL https://{institution}.duracloud.org/durastore/task/enable-streaming. The body of the POST request should include this JSON document: {"spaceId" : "","secure" : "true"}. Fill in the ID of the space to stream. Note that this call is using the DuraCloud REST API.
    3. For either open or secure streaming, if you would like to limit the hosts able to stream content, include the "allowedOrigins" parameter with a list of allowed origin values. For example, to allow calls from example.com and my.test.com, the value of allowedOrigins would be: ["https://example.com","https://my.test.com"]. Note that it is necessary to include the protocol as part of the origin, and that "http://" is considered different than "httphttps://". The default allowedOrigins value is is ["https://*"], which allows calls from all sites using an https protocol.
  4. Wait up to 15 minutes. If this is the first time the space has been streamed, it can take up to 15 minutes for the files to be available on the Amazon edge servers.
  5. Stream a file
    1. When using open streaming: 
      1. Select an HLS index (playlist) file in the space. A video player will appear in the Content Detail pane. Verify that you are able to play the streamed file.
      2. Look in the space properties for the HLS streaming host address. This is the path you will use for streaming files. Alternatively, you can perform a get-url-hls task call through the DuraCloud REST API to retrieve the streaming URL for each content item to be streamed. These URLs are predictable and do not expire.
    2. When using secure streaming:
      1. Spaces using secure streaming do not provide playback via the DuraCloud UI. You will need to perform a "get-signed-cookies-url" call, then redirect the user to the returned URL. More details about the get-signed-cookies-url call can be found in the Amazon S3 Storage Provider tasks section of the DuraCloud REST API.
  6. Set up your website or application to provide access to the streamed files.

...