At the moment shaka-packager has a --hls_key_uri option for FairPlay.
If it is not set, it will be generated from key_id like this:
if (IsFairPlaySystemId(system_id)) {
std::string key_uri = hls_params().key_uri;
if (key_uri.empty()) {
// Use key_id as the key_uri. The player needs to have custom logic to
// convert it to the actual key uri.
std::string key_uri_data = VectorToString(key_id);
key_uri = Base64EncodeData(kUriFairPlayPrefix, key_uri_data);
}
// FairPlay defines IV to be carried with the key, not the playlist.
const std::vector<uint8_t> empty_iv;
NotifyEncryptionToMediaPlaylist(encryption_method, key_uri, empty_key_id,
empty_iv, "com.apple.streamingkeydelivery",
"1", media_playlist.get());
return true;
}
This however need custom player logic as noted in the comment which i am trying to avoid.
It would make sense to add hls_key_uri option to encryption config as a parameter.
If i hardcode hls_key_uri as skd://XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX in packager_node.py then FairPlay with Shaka Player demo starts playing the video correctly.
Maybe there is another way to pass the correct URI to playlist?
The pipeline configuration looks like this:
At the moment shaka-packager has a --hls_key_uri option for FairPlay. If it is not set, it will be generated from key_id like this:
This however need custom player logic as noted in the comment which i am trying to avoid.
It would make sense to add hls_key_uri option to encryption config as a parameter. If i hardcode hls_key_uri as skd://XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX in packager_node.py then FairPlay with Shaka Player demo starts playing the video correctly. Maybe there is another way to pass the correct URI to playlist? The pipeline configuration looks like this: