[mirotalk] - fix file sharing
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
# ====================================================
|
||||
# MiroTalk P2P v.1.6.49 - Environment Configuration
|
||||
# MiroTalk P2P v.1.6.50 - Environment Configuration
|
||||
# ====================================================
|
||||
|
||||
# App environment
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* ==============================================
|
||||
* MiroTalk P2P v.1.6.49 - Configuration File
|
||||
* MiroTalk P2P v.1.6.50 - Configuration File
|
||||
* ==============================================
|
||||
*
|
||||
* Branding and customizations require a license:
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ dependencies: {
|
||||
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.6.49
|
||||
* @version 1.6.50
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.6.49",
|
||||
"version": "1.6.50",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mirotalk",
|
||||
"version": "1.6.49",
|
||||
"version": "1.6.50",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"@mattermost/client": "11.1.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.6.49",
|
||||
"version": "1.6.50",
|
||||
"description": "A free WebRTC browser-based video call",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ let brand = {
|
||||
},
|
||||
about: {
|
||||
imageUrl: '../images/mirotalk-logo.gif',
|
||||
title: 'WebRTC P2P v1.6.49',
|
||||
title: 'WebRTC P2P v1.6.50',
|
||||
html: `
|
||||
<button
|
||||
id="support-button"
|
||||
|
||||
+13
-3
@@ -15,7 +15,7 @@
|
||||
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.6.49
|
||||
* @version 1.6.50
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1222,6 +1222,8 @@ function initClientPeer() {
|
||||
signalingSocket.on('cmd', handleCmd);
|
||||
signalingSocket.on('message', handleMessage);
|
||||
signalingSocket.on('fileInfo', handleFileInfo);
|
||||
signalingSocket.on('fileAbort', handleFileAbort);
|
||||
signalingSocket.on('fileReceiveAbort', abortFileTransfer);
|
||||
signalingSocket.on('disconnect', handleDisconnect);
|
||||
signalingSocket.on('removePeer', handleRemovePeer);
|
||||
} // end [initClientPeer]
|
||||
@@ -9540,6 +9542,14 @@ function isImageURL(input) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Image File
|
||||
* @return boolean
|
||||
*/
|
||||
function isImageFile(filename) {
|
||||
return /(\.jpg|\.jpeg|\.png|\.gif|\.webp|\.bmp|\.tiff|\.svg)$/i.test(filename);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image
|
||||
* @param {string} text
|
||||
@@ -11976,7 +11986,7 @@ function endDownload() {
|
||||
incomingFileData = [];
|
||||
|
||||
// if file is image, show the preview
|
||||
if (isImageURL(incomingFileInfo.file.fileName)) {
|
||||
if (isImageFile(incomingFileInfo.file.fileName)) {
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
Swal.fire({
|
||||
@@ -12384,7 +12394,7 @@ function showAbout() {
|
||||
Swal.fire({
|
||||
background: swBg,
|
||||
position: 'center',
|
||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.49',
|
||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.6.50',
|
||||
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
|
||||
customClass: { image: 'img-about' },
|
||||
html: `
|
||||
|
||||
Reference in New Issue
Block a user