Support screen capture functionality in wrt js 33/315633/1
authorzhaosy <shiyusy.zhao@samsung.com>
Wed, 4 Dec 2024 01:32:25 +0000 (09:32 +0800)
committerzhaosy <shiyusy.zhao@samsung.com>
Wed, 4 Dec 2024 01:32:25 +0000 (09:32 +0800)
Handle permission request for `display-capture`

Bug: https://jira-eu.sec.samsung.net/browse/VDGAME-561

Refer to:
https://archive.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/318109/

Change-Id: Id4ab20c5bd33c949449acaa566226233f4ceeb86
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
wrt_app/src/web_application.ts

index 3c8d7991bae4ed09f546d96ab24feb48c791af28..6d35a7a2d0bd57eb1d4880db3b4894dd33539f7e 100644 (file)
@@ -105,6 +105,11 @@ export class WebApplication {
           console.log(`Raising a media permission request with id: ${id}`);
           this.pendingCallbacks.set(id, callback);
           wrt.handleMediaPermissionRequest(id, webContents);
+        } else if (permission === 'display-capture') {
+          const id = ++this.pendingID;
+          console.log(`Raising a display-capture permission request with id: ${id}`);
+          this.pendingCallbacks.set(id, callback);
+          wrt.handleDisplayCapturePermissionRequest(id, webContents);
         } else if (permission === 'geolocation') {
           const id = ++this.pendingID;
           console.log(`Raising a geolocation permission request with id: ${id}`);