From 60aaaf5daee6da2959c5e7c6dd5f8d0851fc1a6d Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Sat, 2 Nov 2024 17:18:49 +0100 Subject: [PATCH] [mirotalksfu] - Improve Share Media --- app/src/Server.js | 2 +- package.json | 2 +- public/js/Room.js | 4 ++-- public/js/RoomClient.js | 18 ++++++++++++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/app/src/Server.js b/app/src/Server.js index 0908a98b..ce534801 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -55,7 +55,7 @@ dev dependencies: { * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.6.15 + * @version 1.6.16 * */ diff --git a/package.json b/package.json index 47eb67f6..1eab2f4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.6.15", + "version": "1.6.16", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { diff --git a/public/js/Room.js b/public/js/Room.js index 5875813f..05f0a978 100644 --- a/public/js/Room.js +++ b/public/js/Room.js @@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.6.15 + * @version 1.6.16 * */ @@ -4555,7 +4555,7 @@ function showAbout() { imageUrl: image.about, customClass: { image: 'img-about' }, position: 'center', - title: 'WebRTC SFU v1.6.15', + title: 'WebRTC SFU v1.6.16', html: `
diff --git a/public/js/RoomClient.js b/public/js/RoomClient.js index b62cb367..836bcace 100644 --- a/public/js/RoomClient.js +++ b/public/js/RoomClient.js @@ -6017,6 +6017,24 @@ class RoomClient { } } }); + + // Take URL from clipboard ex: + // https://www.youtube.com/watch?v=1ZYbU82GVz4 + + navigator.clipboard + .readText() + .then((clipboardText) => { + if (!clipboardText) return false; + const sanitizedText = filterXSS(clipboardText); + const inputElement = Swal.getInput(); + if (this.isVideoTypeSupported(sanitizedText) && inputElement) { + inputElement.value = sanitizedText; + } + return false; + }) + .catch(() => { + return false; + }); } getVideoType(url) {