# License persistent state

**URL:** <https://forum.webostv.developer.lge.com/t/license-persistent-state/3249>\
**Category:** Web App Development\
**Created:** [June 28, 2023, 11:53am UTC](https://forum.webostv.developer.lge.com/t/license-persistent-state/3249 "2023-06-28T11:53:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liavontsi](https://avatars.discourse-cdn.com/v4/letter/l/53a042/32.png) [@liavontsi](https://forum.webostv.developer.lge.com/u/liavontsi)\
**Post date:** [June 28, 2023, 11:53am UTC](https://forum.webostv.developer.lge.com/t/license-persistent-state/3249/1 "2023-06-28T11:53:43Z")

</div>

Hello, there.

I’m working on a web-based application which uses DRM playback (DASH/PlayReady and DASH/Widevine) with Shaka-Player.

My application logic requires DRM device id to identify a device across multiple launches. I used this code to check whether license persistent state is supported:

```auto
    try {
      const basicConfig = {
        initDataTypes: ['cenc'],
        persistentState: 'required',
        videoCapabilities: basicVideoCapabilities,
      };

      const access = await navigator.requestMediaKeySystemAccess(
        keySystem, [basicConfig as MediaKeySystemConfiguration]
      );

      return access.getConfiguration().persistentState === 'required';
    } catch (e) {
      return false;
    }

```

It shows that PlayReady supports persistent state but Widevine no.

And here I see quite strange behavior since real results are directly opposite. (with PlayReady I see new device ID on every app start, but with Widevine device ID is the same across multiple launches).

I found this article in webOS documentation: [DRM Content Playback | webOS TV Developer](https://webostv.developer.lge.com/develop/guides/drm-content-playback)

As I understand it describes some webOS specific way of setting up DRM playback and getting license, but Shaka-Player already does it for me on its own.

Is it necessary to rework license getting flow in order to fix the device ID issue?

---

<div class="post-metadata">

**Author:** ![narae0.kim](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@narae0.kim](https://forum.webostv.developer.lge.com/u/narae0.kim)\
**Post date:** [June 29, 2023, 12:04am UTC](https://forum.webostv.developer.lge.com/t/license-persistent-state/3249/2 "2023-06-29T00:04:24Z")

</div>

DRM Content Playback guide is for the native player. For questions about Shaka Player, please contact Shaka Player support. Thank you.
