Show TOC

Offline Media Stream SetupLocate this document in the navigation structure

There are two ways to offline a media stream. If you do not offline the stream, the media entity will return online links for the media_src and edit_media metadata properties.

  • When creating the store provide a defining request in the format Object<String, { url: String, retrieveStreams: boolean }>. For example:
    Sample Code
    "definingRequests" : {
      "req1" : { "url" : "/Drivers", "retrieveStreams" : true }
    }
  • On the store object, make a request to the registerStreamRequest method. After the stream is registered you must refresh the store to download it. There is also a unregisterStreamRequest method that can use to remove an offline stream.
    Sample Code
    store.registerStreamRequest("stream", "Drivers(1)", function() {
      store.refresh(function() {
        alert("Stream downloaded");
      },
      function() {
        alert("Failed to download stream");
      });
    },
    function() {
      alert("Failed to register stream");
    });