Comparing version 1.1.1 to 1.1.2
50
index.js
@@ -1,9 +0,9 @@ | ||
let LVRTCEngineNativePath = ""; | ||
let xFuturePath = ""; | ||
let os = require("os"); | ||
var isMac = true; | ||
if (os.platform() === "win32") { | ||
LVRTCEngineNativePath = "./package/win/xFuture"; | ||
xFuturePath = "./package/win/xFuture"; | ||
isMac = false; | ||
} else if (os.platform() === "darwin") { | ||
LVRTCEngineNativePath = "./package/mac/xFuture" | ||
xFuturePath = "./package/mac/xFuture" | ||
} else { | ||
@@ -13,17 +13,47 @@ throw ("Platform not supported") | ||
const RTC = require(LVRTCEngineNativePath); | ||
const ff = require(xFuturePath); | ||
class xFuture { | ||
SetupURL(url){ | ||
return RTC.SetupURL(url); | ||
StartTunnel(url){ | ||
return ff.StartTunnel(url); | ||
} | ||
Install(shell_path, helper_path){ | ||
return RTC.Install(shell_path, helper_path); | ||
StopTunnel(){ | ||
ff.StopTunnel(); | ||
} | ||
Close() { | ||
return RTC.Close(); | ||
ChangeURL(url){ | ||
ff.ChangeURL(url); | ||
} | ||
SetGlobalMode(isGlobalMode){ | ||
ff.SetGlobalMode(isGlobalMode); | ||
} | ||
InstallDriver(shell_path, helper_path){ | ||
return ff.InstallDriver(shell_path, helper_path); | ||
} | ||
GetCurrentStatus(){ | ||
return ff.GetCurrentStatus(); | ||
} | ||
GetCurrentURI(){ | ||
return ff.GetCurrentURI(); | ||
} | ||
/** | ||
* | ||
* @param {事件名称} name | ||
* @param {函数回调} func | ||
* | ||
* K_IDEL = 0; K_Connecting = 1;K_Connected = 2; K_Disconnected = 3; | ||
* connectionStatusDidChange: function(status) {} | ||
* | ||
* | ||
*/ | ||
SetEventCallback(name, func){ | ||
ff.SetEventCallback(name, func); | ||
} | ||
} | ||
@@ -30,0 +60,0 @@ |
{ | ||
"name": "xfuture", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "electron vpn sdk", | ||
@@ -26,3 +26,4 @@ "main": "index.js", | ||
"index.js", | ||
"package.json" | ||
"package.json", | ||
"xFuture.framework" | ||
], | ||
@@ -35,4 +36,3 @@ "build": { | ||
"NSMicrophoneUsageDescription": "I need access to your microphone to send your voice to others in the session room.", | ||
"NSCameraUsageDescription": "I need access to your camera so that others can see you in the session room.", | ||
"logToStdErr": true | ||
"NSCameraUsageDescription": "I need access to your camera so that others can see you in the session room." | ||
} | ||
@@ -39,0 +39,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
49
406889