0

Has anybody had experience using Microsoft's PlayReady Client SDK on iOS?

PlayReady Client SDK for iOS – Used to develop PlayReady-enabled apps that leverage native iOS APIs. This SDK can be used to implement PlayReady protection for media formats that iOS natively supports such as HLS, live and on-demand playback of MPEG- DASH, Smooth Streaming and HLS content, and various PlayReady features.

And if yes, were you either:

  • able to get a reference to the decrypted data/pixel buffer
  • able to get a handle to the texture id showing the decrypted video image
  • or found another method of getting access to the visual media in order to display it inside your own GL context?

The use case would be to stream encrypted audio visual media from the network to an iOS device, decrypt it and use the decrypted data to create images that are then displayed on an OpenGL texture.

Why PlayReady and not FairPlay?

It appears that once you use FairPlay, the only way to display your protected video content is by using an AVPlayerLayer. There appears to be no way as of today to retrieve FairPlay protected HLS media from Apple's APIs in order to display it on an OpenGL texture in 3D space for example.

https://stackoverflow.com/a/42873301/1097106

Community
  • 1
  • 1
schmittsfn
  • 1,412
  • 18
  • 40

2 Answers2

1

The answer definitely should be no, otherwise the DRM would not be doing its job vey well!

Unfortunately, if you could get the raw data then it would be fairly easy to save a copy of the file.

Note, in case it helps you, that some OS's will allow you apply filters and transformations to an encrypted frame. I'm not familiar enough with iOS in this area but on Android this is definitely possible.

Mick
  • 24,231
  • 1
  • 54
  • 120
  • With Android you can use a SurfaceTexture and then use its texture id to copy its content to your own gl texture: https://github.com/gcschrader/MediaSurfacePlugin . This works even for cases where you are using ExoPlayer with DRM. Apple's AVPlayer with FairPlay doesn't appear to offer the same functionality, so I'm wondering if there are alternatives. Should or shouldn't is not the question. How can it be done on iOS? Does Microsoft's PlayReady SDK offer similar functionality as on Android? (i.e. you can get a handle to the texture id and then copy its content over to your own.) – schmittsfn Mar 20 '17 at 15:48
  • Your answer actually made me realize that I didn't phrase my question correctly (thank you). Updating the question. – schmittsfn Mar 20 '17 at 15:49
1

I've never used PlayReady Client SDK for iOS but my understanding is that you should not have access to any of those.

PlayReady Client SDK ships with ready to use MediaPlayerController component inheriting from MPMediaPlayback. You have to use this component to play protected content (supports only H.264 and AAC). My understanding is that this component already handles downloading, decrypting, decoding and rendering of the content (it provides view as well). I'm not aware of any low level API exposed from PlayReady iOS SDK which would give you access directly to decryption buffers. I also don't understand iOS media playback enough to tell you if you can get frames from MPMediaPlayback inherited component.

Low level access to decryption is available only if you use PlayReady porting kit directly but that requires completely different license and you would need to make your own PlayReady port to iOS. PlayReady porting kit is meant more for chip and device manufactures, not for app developers and ports need to meet PlayReady robustness guidelines.

Ladislav Mrnka
  • 360,892
  • 59
  • 660
  • 670