{"id":643,"date":"2025-10-14T16:02:49","date_gmt":"2025-10-14T07:02:49","guid":{"rendered":"https:\/\/aquaguide.cdnetworks.com\/?page_id=643"},"modified":"2025-10-14T16:03:36","modified_gmt":"2025-10-14T07:03:36","slug":"playnplay-jsp-%ec%98%88%ec%8b%9c-%ec%bd%94%eb%93%9c","status":"publish","type":"page","link":"https:\/\/aquaguide.cdnetworks.com\/?page_id=643","title":{"rendered":"PlayNPlay JSP \uc608\uc2dc \ucf54\ub4dc"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"643\" class=\"elementor elementor-643\">\n\t\t\t\t<div class=\"elementor-element elementor-element-76117b37 e-flex e-con-boxed e-con e-parent\" data-id=\"76117b37\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2f838f80 elementor-widget elementor-widget-text-editor\" data-id=\"2f838f80\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t\n<p>playnplay \uac1d\uccb4\ub97c \ud1b5\ud574 \uc601\uc0c1\uc744 \uc7ac\uc0dd or \ub2e4\uc6b4\ub85c\ub4dc\ud558\uae30 \uc704\ud574\uc11c \uc7ac\uc0dd url\uacfc \uc778\uc99d \uc815\ubcf4 \ub4f1 \ud544\uc694\ud55c \uac1d\uccb4\ub97c \uc0dd\uc131\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. Streaming \ucc98\ub9ac \ubd80\ubd84<\/h2>\n\n\n\n<p>\uc544\ub798\ub294 \uc2a4\ud2b8\ub9ac\ubc0d \uc601\uc0c1\uc744 \uc7ac\uc0dd\ud558\uae30 \uc704\ud55c JSON \uac1d\uccb4\ub97c \uc0dd\uc131\ud558\ub294 JSP \ucf54\ub4dc \uc608\uc2dc\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774 \ucf54\ub4dc\ub294&nbsp;<strong>Java SE 7 \uc774\uc0c1<\/strong>(8 \uc774\uc0c1 \uad8c\uc7a5)\uc5d0\uc11c \uc9c0\uc6d0\ud558\ub294 JSONObject\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;%@ page import=\"java.util.HashMap, java.util.Map\" %&gt;\n&lt;%@ page import=\"org.json.JSONObject\" %&gt; &lt;%-- JSONObject\ub97c \uc784\ud3ec\ud2b8 --%&gt;\n&lt;%!\n    \/\/ Streaming \ucc98\ub9ac \ubd80\ubd84\n    Map&lt;String, Object&gt; makeItem() {\n        Map&lt;String, Object&gt; drmMap = new HashMap&lt;&gt;();\n        drmMap.put(\"appId\", \"APP ID\ub97c \ub123\uc5b4\uc8fc\uc138\uc694\");\n        drmMap.put(\"userId\", \"USER ID\ub97c \ub123\uc5b4\uc8fc\uc138\uc694\");\n\n        Map&lt;String, Object&gt; mediaItem = new HashMap&lt;&gt;();\n        mediaItem.put(\"url\", \"http:\/\/example.com\/sample\/sample.mp4.drm\");\n        mediaItem.put(\"drm\", drmMap);\n\n        \/\/ \ubaa8\ubc14\uc77c \ud50c\ub808\uc774\uc5b4 \ud30c\uc77c \uba85 \ucd94\uac00 (option)\n        Map&lt;String, Object&gt; metadata = new HashMap&lt;&gt;();\n        metadata.put(\"title\", \"\ud30c\uc77c\uba85\");\n        mediaItem.put(\"metadata\", metadata);\n\n        return mediaItem;\n    }\n%&gt;\n&lt;%\n    \/\/ \ubbf8\ub514\uc5b4 \uc544\uc774\ud15c \uc0dd\uc131\n    Map&lt;String, Object&gt; mediaItem = makeItem();\n\n    \/\/ \ubbf8\ub514\uc5b4 \uc544\uc774\ud15c\uc744 JSON\uc73c\ub85c \ubcc0\ud658\n    JSONObject jsonObject = new JSONObject(mediaItem);\n    String jsonData = jsonObject.toString();\n\n    \/\/ JSON \ud615\uc2dd\uc73c\ub85c \uc751\ub2f5 \ubc18\ud658\n    response.setContentType(\"application\/json\");\n    out.print(jsonData);\n%&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. Download \ucc98\ub9ac \ubd80\ubd84<\/h2>\n\n\n\n<p>\uc544\ub798\ub294 \ub2e4\uc6b4\ub85c\ub4dc \uc601\uc0c1\uc744 \uc7ac\uc0dd\ud558\uae30 \uc704\ud55c JSON \uac1d\uccb4\ub97c \uc0dd\uc131\ud558\ub294 JSP \ucf54\ub4dc \uc608\uc2dc\uc785\ub2c8\ub2e4.<\/p>\n\n\n\n<p>\uc774 \ucf54\ub4dc\ub294&nbsp;<strong>Java SE 7 \uc774\uc0c1<\/strong>(8 \uc774\uc0c1 \uad8c\uc7a5)\uc5d0\uc11c \uc9c0\uc6d0\ud558\ub294 JSONObject\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;%@ page import=\"java.util.HashMap, java.util.Map\" %&gt;\n&lt;%@ page import=\"org.json.JSONObject\" %&gt;\n&lt;%!\n    \/\/ Download \ucc98\ub9ac \ubd80\ubd84\n    Map&lt;String, Object&gt; makeItem() {\n        Map&lt;String, Object&gt; drmMap = new HashMap&lt;&gt;();\n        drmMap.put(\"appId\", \"APP ID\ub97c \ub123\uc5b4\uc8fc\uc138\uc694\");\n        drmMap.put(\"userId\", \"USER ID\ub97c \ub123\uc5b4\uc8fc\uc138\uc694\");\n        drmMap.put(\"offlineAccessPeriod\", 86400); \/\/ Download\ud55c \ud30c\uc77c offline \uc7ac\uc0dd \ud5c8\uc6a9 \uae30\uac04(\ucd08), undefined: \uc81c\ud55c \uc5c6\uc74c, 0: offline \uc7ac\uc0dd \ubd88\uac00\n\n        Map&lt;String, Object&gt; mediaItem = new HashMap&lt;&gt;();\n        mediaItem.put(\"url\", \"http:\/\/example.com\/sample\/sample.mp4.drm\" );\n        mediaItem.put(\"drm\", drmMap);\n\n        \/\/ \ub2e4\uc6b4\ub85c\ub4dc \uacbd\ub85c \ucd94\uac00\n        Map&lt;String, Object&gt; metadata = new HashMap&lt;&gt;();\n        metadata.put(\"downloadPath\", \"\/\ud0c0\uc774\ud2c0\/\uacbd\ub85c1\/\uacbd\ub85c2\");\n        mediaItem.put(\"metadata\", metadata);\n\n        return mediaItem;\n    }\n%&gt;\n&lt;%\n    \/\/ \ubbf8\ub514\uc5b4 \uc544\uc774\ud15c \uc0dd\uc131\n    Map&lt;String, Object&gt; mediaItem = makeItem();\n\n    \/\/ \ubbf8\ub514\uc5b4 \uc544\uc774\ud15c\uc744 JSON\uc73c\ub85c \ubcc0\ud658\n    JSONObject jsonObject = new JSONObject(mediaItem);\n    String jsonData = jsonObject.toString();\n\n    \/\/ JSON \ud615\uc2dd\uc73c\ub85c \uc751\ub2f5 \ubc18\ud658\n    response.setContentType(\"application\/json\");\n    out.print(jsonData);\n%&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-7260975 e-flex e-con-boxed e-con e-parent\" data-id=\"7260975\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-94571d5 elementor-button-info elementor-widget elementor-widget-button\" data-id=\"94571d5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/aquaguide.cdnetworks.com\/?page_id=536\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">\ub4a4\ub85c \uac00\uae30<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>playnplay \uac1d\uccb4\ub97c \ud1b5\ud574 \uc601\uc0c1\uc744 \uc7ac\uc0dd or \ub2e4\uc6b4\ub85c\ub4dc\ud558\uae30 \uc704\ud574\uc11c \uc7ac\uc0dd url\uacfc \uc778\uc99d \uc815\ubcf4 \ub4f1 \ud544\uc694\ud55c \uac1d\uccb4\ub97c \uc0dd\uc131\ud574\uc57c \ud569\ub2c8\ub2e4. 1. Streaming \ucc98\ub9ac [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-643","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=\/wp\/v2\/pages\/643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=643"}],"version-history":[{"count":10,"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=\/wp\/v2\/pages\/643\/revisions"}],"predecessor-version":[{"id":653,"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=\/wp\/v2\/pages\/643\/revisions\/653"}],"wp:attachment":[{"href":"https:\/\/aquaguide.cdnetworks.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}