Have a look at this sample code:
public class MyAliasTest extends ModuleBase implements IMediaStreamNameAliasProvider {
public String resolvePlayAlias(IApplicationInstance appInstance, String name) {
return name + "?test=true";
}
public String resolveStreamAlias(IApplicationInstance appInstance, String name) {
return name + "?test=true";
}
}
This generates an error:
MediaReaderH264.open[vod/_definst_]: Not found: /usr/local/WowzaStreamingEngine/content/sample.mp4?test=true.: java.io.FileNotFoundException: /usr/local/WowzaStreamingEngine/content/sample.mp4_test=true (No such file or directory)|at java.io.RandomAccessFile.open(Native Method)|at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)|at com.wowza.io.WowzaRandomAccessFile.<init>(WowzaRandomAccessFile.java:12)|at com.wowza.io.DirectRandomAccessReader.open(DirectRandomAccessReader.java:222)|at com.wowza.wms.mediareader.h264.MediaReaderH264.open(MediaReaderH264.java:250)|
This code however:
public class MyAliasTest extends ModuleBase implements IMediaStreamNameAliasProvider {
public String resolvePlayAlias(IApplicationInstance appInstance, String name) {
return name;
}
public String resolveStreamAlias(IApplicationInstance appInstance, String name) {
return name;
}
}
… together with this URL: http://[wowza-ip]/vod/sample.mp4?test=true, will strip away the entire querystring, so that the variable queryStr is empty when I try
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
String queryStr = httpSession.getQueryStr();
}
What happens behind resolvePlayAlias and resolveStreamAlias so that the querystring doesn’t work? I want it to work as in the first sample above …