Capacitor: Native DRM support

Created on 5 Dec 2018  路  8Comments  路  Source: ionic-team/capacitor

Does Capacitor support native video playback?

What I mean is, if I build an app using Capacitor that allows the user to play some content, will it use the native DRM technology (e.g. PlayReady or Widevine or FairPlay) according to which mobile platform the app is delivered to?

Most helpful comment

You can have a look at this for example: https://shaka-player-demo.appspot.com/demo/

This is an open source player which supports PlayReady and Widevine DRMs. There is one more DRM which is FairPlay by Apple but this player doesn't support it.

It would be nice if any app built with Capacitor behaved like it would behave natevely (e.g. iOS apps using FairPlay, Android apps using Widevine, Windows apps using PlayReady).

All 8 comments

It supports video playback, but no idea about DRM. Can you provide videos with DRM so we can test?

You can have a look at this for example: https://shaka-player-demo.appspot.com/demo/

This is an open source player which supports PlayReady and Widevine DRMs. There is one more DRM which is FairPlay by Apple but this player doesn't support it.

It would be nice if any app built with Capacitor behaved like it would behave natevely (e.g. iOS apps using FairPlay, Android apps using Widevine, Windows apps using PlayReady).

I loaded that player on a Capacitor app, tried two of the widevine videos and they both worked, so I'll assume it's working fine already.
I couldn't test FairPlay.

Going to close, if you can provide a sample app using it that shows that it doesn't work I'll take a look.

@jcesarmobile it is not about that player, that is actually just an open source implementation that is supposed to run in the browser (so there is no doubt it will work).

My point here was actually, like I said:

if any app built with Capacitor behaved like it would behave natively (e.g. iOS apps using FairPlay, Android apps using Widevine, Windows apps using PlayReady).

So you build your app ONCE and using Capacitor it will behave natively on different devices.

As I said, if you can provide a sample app that uses DRM and doesn't work I'll look into it.

I have no idea about how to use DRM in videos, so I can't tell you if it works or not, if you do, create a sample app and check if it works or not, and if it doesn't we will try to fix it. But I can't fix something I don't know how it works or if I don't know for sure that it's broken.

@jcesarmobile I understand. I can try to build a sample app and test it, but I need to know what would be the API to build the video player in the app. I can't find any video player api in the documentation.

It would be nice to know whether you support DRM natively or not. Thanks.

Question: Is there support for digital rights management (DRM) in HTML5 video?

HTML5 doesn't provide direct support, nor any barrier, to using DRM in video. It currently expects this to be handled by the particular codec/implementation. There are implementations which allow for DRM in HTML5 video.

https://www.w3.org/html/wiki/FAQs#Is_there_support_for_digital_rights_management_.28DRM.29_in_HTML5_video.3F

So try with video tag.

If not supported on video tag, we don鈥檛 provide a video player

Was this page helpful?
0 / 5 - 0 ratings

Related issues

natevw picture natevw  路  3Comments

gnesher picture gnesher  路  3Comments

nicobytes picture nicobytes  路  3Comments

ebk46 picture ebk46  路  3Comments

mlynch picture mlynch  路  3Comments