jhomlala / betterplayer

Better video player for Flutter, with multiple configuration options. Solving typical use cases!
Apache License 2.0
889 stars 929 forks source link

[FEATURE] Why does Widevine force a security level of L3? #1263

Open os5633 opened 8 months ago

os5633 commented 8 months ago

We have implemented DRM in our service and need to address indiscriminate screen capturing. We have raised the security level as a policy, but Better Player enforces a security level of L3. When we force the security level to a higher value, playback doesn't work. What is the reason for this?

pastorrmelendez commented 8 months ago

@os5633 BetterPlayer doesn't work with Widevine L1/L2 because of textures. BetterPlayer uses VideoPlayer and the way VideoPlayer processes video is using textures in software level.

I need too a player with DRM L1 and I've been working some weeks building my custom plugin using hybrid composition for Widevine L1 support and it works good. Now I'm trying to migrate the cool stuff from Better Player to my plugin or changing textures to Hybrid Composition in VideoPlayer for DRM L1 support. I hope to finish soon but I have no so much time to work with it. If you want to join efforts, it would be great :)

os5633 commented 8 months ago

Thank you for your answer. I have one more question Does the implementation plan also have the ability to import DRM license keys stored on local storage from betterplayer?

pastorrmelendez commented 8 months ago

DRM License keys stored on local storage, no by now, but after published the update, hopefully someone is willing to do the work and submit a PR.

os5633 commented 8 months ago

It's not so difficult to do Android native work, but it's an object-c is a big obstaclePlease consider the transition to swift...

TDUser91 commented 8 months ago

@os5633 BetterPlayer doesn't work with Widevine L1/L2 because of textures. BetterPlayer uses VideoPlayer and the way VideoPlayer processes video is using textures in software level.

I need too a player with DRM L1 and I've been working some weeks building my custom plugin using hybrid composition for Widevine L1 support and it works good. Now I'm trying to migrate the cool stuff from Better Player to my plugin or changing textures to Hybrid Composition in VideoPlayer for DRM L1 support. I hope to finish soon but I have no so much time to work with it. If you want to join efforts, it would be great :)

I was facing the same issue and I came to the same conclusion, I'm trying to Implement exoplayer (preferebly with media3) using HybridComposition using AndroidViewSurface (Reason: https://source.android.com/docs/core/graphics/architecture and https://medium.com/androiddevelopers/android-hdr-migrating-from-textureview-to-surfaceview-part-1-how-to-migrate-6bfd7f4b970e).

We can work on this together (add me @GitGud31). Let me know!

pastorrmelendez commented 7 months ago

Hi @TDUser91 sure. The Android side is 90% migrated, but using ExoPlayer lastest version (I want to finish it before upgrading to media3, there are some challenges I cannot solve while migrating to media3 due to time reason). Widevine L1 now works like charm.

I'm working in iOS side using Swift, already playing clear content, now I will start go for DRM using FairPlay.

I followed you.

TDUser91 commented 7 months ago

@pastorrmelendez great thanks, feel free to add me to the project, I'm available to work on the Android part, as from my side I've already made a working version (that I was working on) of Media3 with DRM L1.

kxgcayh commented 5 months ago

@os5633 BetterPlayer doesn't work with Widevine L1/L2 because of textures. BetterPlayer uses VideoPlayer and the way VideoPlayer processes video is using textures in software level.

I need too a player with DRM L1 and I've been working some weeks building my custom plugin using hybrid composition for Widevine L1 support and it works good. Now I'm trying to migrate the cool stuff from Better Player to my plugin or changing textures to Hybrid Composition in VideoPlayer for DRM L1 support. I hope to finish soon but I have no so much time to work with it. If you want to join efforts, it would be great :)

have you published the package?

gokulkalagara commented 4 months ago

Hi @TDUser91 sure. The Android side is 90% migrated, but using ExoPlayer lastest version (I want to finish it before upgrading to media3, there are some challenges I cannot solve while migrating to media3 due to time reason). Widevine L1 now works like charm.

I'm working in iOS side using Swift, already playing clear content, now I will start go for DRM using FairPlay.

I followed you.

@pastorrmelendez @TDUser91 Have you published any packages related to DRM L1?