Skip to content

Conversation

@tobbee
Copy link
Contributor

@tobbee tobbee commented Nov 11, 2025

Add DASH-IF Certurl support and test for CPIX-based DRM configuration that verifies LaURL and CertificateURL are properly inserted into MPD manifests for Widevine, PlayReady, and FairPlay systems.

Changes:

  • Added TestParamToMPD test case for CPIX-based DRM with all three DRM systems
  • Extended pkg/drm/drm_test.go to verify CertificateURL population for all DRM systems (Widevine has empty, PlayReady and FairPlay have values)
  • Updated cpix_1key_cbcs_test.xml with all three DRM system IDs
  • Created DRM configuration file for app testdata
  • Fixed CertURL field reference in livempd.go (should be CertificateURL)

Implements #256 and #264.

Add DASH-IF Certurl support and test for CPIX-based DRM configuration
that verifies LaURL and CertificateURL are properly inserted into
MPD manifests for Widevine, PlayReady, and FairPlay systems.

Changes:
- Added TestParamToMPD test case for CPIX-based DRM with all three DRM systems
- Extended pkg/drm/drm_test.go to verify CertificateURL population for
  all DRM systems (Widevine has empty, PlayReady and FairPlay have values)
- Updated cpix_1key_cbcs_test.xml with all three DRM system IDs
- Created DRM configuration file for app testdata
- Fixed CertURL field reference in livempd.go (should be CertificateURL)
@avelad
Copy link

avelad commented Nov 20, 2025

@tobbee Any update? I'd like to see it merged into livesim2 soon.. Thanks!

@tobbee
Copy link
Contributor Author

tobbee commented Nov 21, 2025

@avelad The main thing I'm unsure about is whether FairPlay will work. Can it be tested with Shaka-player?

@avelad
Copy link

avelad commented Nov 21, 2025

@avelad The main thing I'm unsure about is whether FairPlay will work. Can it be tested with Shaka-player?

Yes, you can test it on Shaka Player

@tobbee tobbee merged commit 1238e3b into main Nov 25, 2025
4 checks passed
@tobbee tobbee deleted the feat/certurl branch November 25, 2025 15:28
@tobbee
Copy link
Contributor Author

tobbee commented Nov 25, 2025

@avelad

I merged this PR and tried to configure everything on my test instance at https://192-46-234-23.ip.linodeusercontent.com

The URL
https://192-46-234-23.ip.linodeusercontent.com/livesim2/drm_EZDRM-1-key-pr-cbcs/testpic_2s/Manifest.mpd

includes the following ContentProtection info for FairPlay

<ContentProtection schemeIdUri="urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2" value="Fairplay">
  <dashif:Laurl xmlns:dashif="https://dashif.org/CPS" licenseType="EME-1.0">https://fps.ezdrm.com/api/licenses/auth?px=F5926B&amp;assetID=312e3362-3410-469a-b536-b9c9d0cafc31</dashif:Laurl>
</ContentProtection>

but this does not seem to enough for shaka-player to play. Is there something else needed?

@avelad
Copy link

avelad commented Nov 25, 2025

@avelad

I merged this PR and tried to configure everything on my test instance at https://192-46-234-23.ip.linodeusercontent.com

The URL https://192-46-234-23.ip.linodeusercontent.com/livesim2/drm_EZDRM-1-key-pr-cbcs/testpic_2s/Manifest.mpd

includes the following ContentProtection info for FairPlay

<ContentProtection schemeIdUri="urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2" value="Fairplay">
  <dashif:Laurl xmlns:dashif="https://dashif.org/CPS" licenseType="EME-1.0">https://fps.ezdrm.com/api/licenses/auth?px=F5926B&amp;assetID=312e3362-3410-469a-b536-b9c9d0cafc31</dashif:Laurl>
</ContentProtection>

but this does not seem to enough for shaka-player to play. Is there something else needed?

Missing Certurl :D You only includes Laurl....

@tobbee
Copy link
Contributor Author

tobbee commented Nov 25, 2025

Ooh. That was embarrassing 🫢. I didn't run the latest version with including this fix. After rebuild, I now have

<ContentProtection schemeIdUri="urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2" value="Fairplay">
  <dashif:Laurl xmlns:dashif="https://dashif.org/CPS" licenseType="EME-1.0">https://fps.ezdrm.com/api/licenses/auth?px=F5926B&amp;assetID=312e3362-3410-469a-b536-b9c9d0cafc31</dashif:Laurl>
  <dashif:Certurl xmlns:dashif="https://dashif.org/CPS">https://na-fps.ezdrm.com/demo/video/eleisure.cer</dashif:Certurl>
</ContentProtection>

Just trying with "custom content"with the online demo of v4.16.10 at https://shaka-player-demo.appspot.com/demo/ it still does not play in Safari, although the unencrypted version does.
I don't get any understandable log messages.

I did manage to get content running in Safari with this EZDRM URL and key setup a long time ago, although that was with a proprietary MSE+EME player, so I may need to double-check that again.

@avelad did you manage to run with FairPlay with some other content?

@avelad
Copy link

avelad commented Nov 26, 2025

@tobbee I found an issue in Shaka: shaka-project/shaka-player#9436 but after fixing it, I get "Media failed to decode" and this isn't related to Shaka... I'm checking working HLS streams and comparing segments, and I see that the BTRT box isn't included in LiveSim2. I don't know if this is related...

@avelad
Copy link

avelad commented Nov 26, 2025

imagen

SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(267EBDB6914C0002) 0, but this is not usefull, so i need ask to Apple to debug it...

@tobbee
Copy link
Contributor Author

tobbee commented Nov 30, 2025

@avelad Thanks for the feedback. When I, or rather a colleague, got MSE+EME working with Safari a long time ago, we did not have an BTRT box, so that shouldn't be the issue.

I've got limited time, but I hope to get the old system working again so that I can check the exact MSE+EME calls being made there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants