Results 1 to 3 of 3

Thread: Alias or Media uri rewrite for .stream files

  1. #1

    Default Alias or Media uri rewrite for .stream files

    Hi,

    I use .stream files with json content.

    How to alias/rewrite request uri?

    Use this interface instead of the StreamNameAlias AddOn or .stream files when you need programmatic control of aliasing.
    IMediaStreamNameAliasProvider2 is incompatible with .stream files.

    Any ideas appreciated.

  2. #2

    Default

    Hi,

    When you implement the IMediaStreamNameAliasProvider2 interface, your class replaces the .stream files as both use the interface and there can be only one alias provider assigned. You have a couple of options, depending on your workflow.

    1. Call the .stream file handler from your own resolveStreamAlias methods. This will pull the JSON output into the methods and then you can return that directly or perform extra processing on it before returning.
      public String resolveStreamAlias(IApplicationInstance appInstance, String name)
      {
      	name = MediaCasterUtils.handleStreamAliasFile(appInstance, name);
      	
      	// do further processing here.
      
      	return name;
      }
      
      public String resolveStreamAlias(IApplicationInstance appInstance, String name, IMediaCaster mediaCaster)
      {
      	name = MediaCasterUtils.handleStreamAliasFile(appInstance, name);
      
      	// do further processing here.
      
      	return name;
      }
    2. Create & return JSON from your resolveStreamAlias methods.


    Roger.

  3. #3

    Default

    Thanks, great!

Similar Threads

  1. Can be used to switch the live-stream source URI dynamically?
    By Solomon82 in forum Live Streaming and Encoders
    Replies: 4
    Last Post: 06-11-2014, 04:00 AM
  2. Alias/Rewrite before Application reaching
    By arturc in forum Server-side Modules and Code Samples Discussion
    Replies: 1
    Last Post: 10-09-2012, 05:14 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
  •