--- title: "Applying DRM" slug: "vpe-umd-drm" updated: 2026-09-17T09:22:36Z published: 2026-09-17T09:22:36Z canonical: "guide.ncloud-docs.com/vpe-umd-drm" stale: true --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Applying DRM Available in Classic and VPC It describes the 2 integration methods: One Click Multi DRM and PallyCon DRM. ## Integrate with One Click Multi DRM With NAVER Cloud Platform's One Click Multi DRM, you can configure Widevine, PlayReady, and FairPlay all at once. The following example demonstrates how to inject options by calling the DRM test API. ### Integrate with the DRM test API Call the `https://vpe-api.sgrsoft.com/api/drmTest` endpoint to retrieve the DRM information, and then pass it to the player as options. Note When you play DRM-protected content in UMD, use the `ncplayerDRM()` asynchronous function. Use instead of general `new ncplayer()` so the SDK can automatically load the DRM library. ```
``` ### Install Ncloud DRM Helper ``` npm i vpe-drm-helper ``` - Ncloud DRM Helper is used to generate DRM playback sources. - Use an Ncloud API key. - Create and use a dedicated API key for DRM with an Ncloud Sub Account. - Always generate playback sources on the backend. ### Implement Ncloud DRM Server ``` const express = require("express"); const vpeDrmHelper = require("vpe-drm-helper"); const app = express(); const port = 3000; // Configure the DRM Helper const NDRM = new vpeDrmHelper(); NDRM.isGov = false; // Set whether to use the government cloud (default: false) NDRM.setUserId("test-user"); // viewer ID NDRM.setSiteId("{SITEID}"); // One Click Multi DRM Site ID Setting NDRM.setApiKey("{Ncloud API accessKey}", "{Ncloud API secretKey}"); // API endpoint for generating DRM playback sources app.get("/drm-source", function(req, res) { const drmSource = NDRM.drmSourceHelper( { dash: "{DASH playback source}", hls: "{HLS playback source}", }, "{contentId}" // contentId required ); res.json(drmSource); }); app.listen(port, function() { console.log("Server is running on http://localhost:" + port); }); ``` - This code uses Express.js to create a simple server and provides an API that generates and returns a DRM playback source at the `/drm-source` path. - `accessKey`, `secretKey`, `SITEID`, DASH playback source, HLS playback source, and `contentId` should be replaced with your actual values. Caution - You need `{SITEID}` and `{contentId}` to generate DRM license tokens. Do not expose it externally. - Use an API key that includes only DRM permissions. Never use the master API key. ### Integrate with the UMD client Retrieve the DRM playback source from the backend API and pass it to the player. ``` ``` ### Response JSON structure The DRM Helper generates the playback source JSON. Each DRM type includes a playback source URL, a license URL, and authentication headers. ``` { "playlist": [ { "drm": { "com.widevine.alpha": { "src": "https://example.edge.naverncp.com/dash/.../manifest.mpd", "licenseUri": "https://multi-drm.apigw.ntruss.com/api/v1/license", "licenseRequestHeader": { "x-ncp-region_code": "KR", "x-ncp-iam-access-key": "...", "x-ncp-apigw-timestamp": 1770471614859, "x-ncp-apigw-signature-v2": "...", "x-drm-token": "..." } }, "com.microsoft.playready": { "src": "https://example.edge.naverncp.com/dash/.../manifest.mpd", "licenseUri": "https://multi-drm.apigw.ntruss.com/api/v1/license", "licenseRequestHeader": { ... } }, "com.apple.fps": { "src": "https://example.edge.naverncp.com/hls/.../index.m3u8", "certificateUri": "https://multi-drm.apigw.ntruss.com/api/v1/license/fairPlay", "certificateRequestHeader": { ... }, "licenseUri": "https://multi-drm.apigw.ntruss.com/api/v1/license", "licenseRequestHeader": { ... } } }, "poster": "https://example.com/poster.jpg" } ], "aspectRatio": "16/9", "autostart": true, "muted": true } ``` ### Full HTML example (backend Integration) ```