diff --git a/packager/hls/base/simple_hls_notifier.cc b/packager/hls/base/simple_hls_notifier.cc index f016a7a3d5..2ab7087aa5 100644 --- a/packager/hls/base/simple_hls_notifier.cc +++ b/packager/hls/base/simple_hls_notifier.cc @@ -58,6 +58,12 @@ bool IsFairPlaySystemId(const std::vector& system_id) { media::kFairPlaySystemId); } +bool IsLegacyFairPlaySystemId(const std::vector& system_id) { + return system_id.size() == std::size(media::kLegacyFairPlaySystemId) && + std::equal(system_id.begin(), system_id.end(), + media::kLegacyFairPlaySystemId); +} + bool IsPlayReadySystemId(const std::vector& system_id) { return system_id.size() == std::size(media::kPlayReadySystemId) && std::equal(system_id.begin(), system_id.end(), @@ -462,7 +468,7 @@ bool SimpleHlsNotifier::NotifyEncryptionUpdate( iv, "identity", "", media_playlist.get()); return true; } - if (IsFairPlaySystemId(system_id)) { + if (IsFairPlaySystemId(system_id) || IsLegacyFairPlaySystemId(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 diff --git a/packager/media/base/protection_system_ids.h b/packager/media/base/protection_system_ids.h index 92dd923565..5ddaf8cb07 100644 --- a/packager/media/base/protection_system_ids.h +++ b/packager/media/base/protection_system_ids.h @@ -23,6 +23,12 @@ const uint8_t kFairPlaySystemId[] = {0x94, 0xCE, 0x86, 0xFB, 0x07, 0xFF, 0x4F, 0x43, 0xAD, 0xB8, 0x93, 0xD2, 0xFA, 0x96, 0x8C, 0xA2}; +// this is a legacy system ID used for FairPlay in old packager versions, kept +// for backwards compatibility only +const uint8_t kLegacyFairPlaySystemId[] = {0x29, 0x70, 0x1F, 0xE4, 0x3C, 0xC7, + 0x4A, 0x34, 0x8C, 0x5B, 0xAE, 0x90, + 0xC7, 0x43, 0x9A, 0x47}; + // Marlin Adaptive Streaming Specification – Simple Profile, V1.0. const uint8_t kMarlinSystemId[] = {0x5E, 0x62, 0x9A, 0xF5, 0x38, 0xDA, 0x40, 0x63, 0x89, 0x77, 0x97, 0xFF,