I have PlaybackCDN class which is returning the URL from another Wowza server. As you can see I send the token in the URL, but when the play method is called I receive just the stream name, without any token. How can I send the parameters?
public class PlaybackCDN extends CDNBase implements IMediaStreamNameAliasProvider{
private static WMSLogger log = WMSLoggerFactory.getLogger(null);
public void onAppStart(IApplicationInstance appInstance) {
appStart(appInstance);
appInstance.setStreamNameAliasProvider(this);
}
@Override
public String resolvePlayAlias(IApplicationInstance arg0, String arg1) {
log.error("In resolvePlayAlias: " + arg1);
StreamParams params = getParamsFromQuery(arg1);
try {
streamSource = validatePlaybackURL(params);
} catch (Exception e) {
log.error("Error calling the API to get CDN info for" + params.getStreamName() );
log.error(e.toString());
}
String sourceUrl = "wowz://" + streamSource.getPlaybackHostname() + ":" + streamSource.getPlaybackPort() + "/" + streamSource.getPlaybackApplicationName() + "?token=" + streamSource.getToken() + "/" + streamSource.getStreamName();
log.info("resolve source url: "+ sourceUrl);
return sourceUrl;
}
@Override
public String resolveStreamAlias(IApplicationInstance arg0, String arg1) {
log.error("In resolveStreamAlias: " + arg1);
String sourceUrl = "wowz://" + streamSource.getPlaybackHostname() + ":" + streamSource.getPlaybackPort() + "/" + streamSource.getPlaybackApplicationName() + "?token=" + streamSource.getToken() + "/" + streamSource.getStreamName();
log.info("resolve source url: "+ sourceUrl);
return sourceUrl;
}
}