I am trying to encrypt live with the methods given in the documentation:
This is my method in module
public void onHTTPCupertinoEncryptionKeyLiveChunk(ILiveStreamPacketizer liveStreamPacketizer, String streamName,
CupertinoEncInfo encInfo, long chunkId, int mode) {
if (streamName.startsWith(“aes128”)) {
encInfo.setEncMethod(CupertinoEncInfo. METHOD_AES_128 );
encInfo.setEncUrl(“http://mycompanykeyserver.com/authenticate.aspx”);
encInfo.setEncKeyBytes(BufferUtils. decodeHexString (“123456789ABCDEF123456789ABCDEF12”));
encInfo.setEncIVBytes(BufferUtils. decodeHexString (“FEDCBA9876543210FEDCBA9876543210”));
encInfo.setEncKeyFormatVersion(“1”);
getLogger ().info(“FairPlay encryption”);
}
if (streamName.startsWith(“aes”)) {
encInfo.setEncMethod(CupertinoEncInfo. METHOD_SAMPLE_AES );
encInfo.setEncUrl(“http://mycompanykeyserver.com/authenticate.aspx”);
encInfo.setEncKeyBytes(BufferUtils. decodeHexString (“123456789ABCDEF123456789ABCDEF12”));
encInfo.setEncIVBytes(BufferUtils. decodeHexString (“FEDCBA9876543210FEDCBA9876543210”));
encInfo.setEncKeyFormat(CupertinoEncInfo. APPLE_KEYFORMAT_IDENTITY );
encInfo.setEncKeyFormatVersion(“1”);
getLogger ().info(“FairPlay encryption”);
}
}
I can’t play my encrypted live anywhere when I give the license server URL, the license is definitely good because it is for fairplay but it doesn’t work in any player. My question is how can I check if my encryption with given key will work? I want to play my stream after entering my license. what free players are recommended?