mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-12 19:25:55 +08:00
Auto-publish.
This commit is contained in:
parent
39e40b33bf
commit
85ff913660
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: DytLvSj8UC9CKob0XUy9Y3usKDmX8US1YgxYmBxa1iAZ/I8JbM5wZwE=
|
||||
guid: cccbd1d680cfe34fa1fef9e4875e5a12
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: XSwesi78AS28ymfR2HEhHpEBAC2DHupI1hIKP7HApjHRaZgGw+DTwWI=
|
||||
guid: cccbd1d680cfe34fa1fef9e3375e5a12
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
Binary file not shown.
@ -2,26 +2,21 @@ mergeInto(LibraryManager.library, {
|
||||
// 定义供 C/C++ 调用的 JS 函数
|
||||
js_batchRender_malloc: function(data, size, isSync) {
|
||||
// 直接从 WASM 内存创建视图(零拷贝)
|
||||
const binaryData = new Uint8Array(Module.HEAPU8.buffer, data, size);
|
||||
// 转换为标准 ArrayBuffer(如果需要复制)
|
||||
const targetBuffer =
|
||||
binaryData.buffer.slice(binaryData.byteOffset, binaryData.byteOffset + binaryData.byteLength);
|
||||
const targetBuffer = new Uint8Array(Module.HEAPU8.buffer, data, size);
|
||||
//console.log("processBinaryData invoke");
|
||||
const extBuffer = new ArrayBuffer(1);
|
||||
const headerBuffer = new ArrayBuffer(8);
|
||||
const headerBufferView = new DataView(headerBuffer);
|
||||
headerBufferView.setUint32(0, 0xDEC0DE, true);
|
||||
headerBufferView.setUint32(4, mtl.ctx.__uid(), true);
|
||||
const merged = new Uint8Array(headerBuffer.byteLength + targetBuffer.byteLength);
|
||||
merged.set(new Uint8Array(headerBuffer), 0);
|
||||
merged.set(new Uint8Array(targetBuffer), headerBuffer.byteLength);
|
||||
|
||||
if(!isSync){
|
||||
mtl.batchRenderAsync(merged.buffer, extBuffer);
|
||||
mtl.batchRenderAsync(targetBuffer, extBuffer);
|
||||
return null;
|
||||
}
|
||||
const result = mtl.batchRender(merged.buffer, extBuffer).buffer;
|
||||
if(result.byteLength == 0){
|
||||
return null;;
|
||||
const response = mtl.batchRender(targetBuffer, extBuffer);
|
||||
if (!response) {
|
||||
return null;
|
||||
}
|
||||
const result = response.buffer;
|
||||
if(!result || result.byteLength == 0){
|
||||
return null;
|
||||
}
|
||||
// 申请内存空间,后续在cpp wasm部分使用,记得释放
|
||||
const ptr = Module._malloc(result.byteLength);
|
||||
|
||||
@ -107,6 +107,14 @@ namespace WeChatWASM
|
||||
return config.CompileOptions.enableiOSMetal;
|
||||
}
|
||||
}
|
||||
// 用于replaceRules判断是否需要注入相关的修改
|
||||
public static bool UseEmscriptenGLX
|
||||
{
|
||||
get
|
||||
{
|
||||
return config.CompileOptions.enableEmscriptenGLX;
|
||||
}
|
||||
}
|
||||
// public static void SetPlayableEnabled(bool enabled)
|
||||
// {
|
||||
// isPlayableBuild = enabled;
|
||||
@ -126,6 +134,8 @@ namespace WeChatWASM
|
||||
}
|
||||
// iOS metal 的相关特性
|
||||
ProcessWxiOSMetalBinaries();
|
||||
// emscriptenglx的相关特性
|
||||
ProcessWxEmscriptenGLXBinaries();
|
||||
MakeEnvForLuaAdaptor();
|
||||
// JSLib
|
||||
SettingWXTextureMinJSLib();
|
||||
@ -371,6 +381,59 @@ namespace WeChatWASM
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
private static void ProcessWxEmscriptenGLXBinaries()
|
||||
{
|
||||
string[] glLibs;
|
||||
string DS = WXAssetsTextTools.DS;
|
||||
if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package)
|
||||
{
|
||||
glLibs = new string[]
|
||||
{
|
||||
$"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}libemscriptenglx.a",
|
||||
$"Packages{DS}com.qq.weixin.minigame{DS}Runtime{DS}Plugins{DS}libemscriptenglx_2021.a",
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
string glLibRootDir = $"Assets{DS}WX-WASM-SDK-V2{DS}Runtime{DS}Plugins{DS}";
|
||||
|
||||
// 下方顺序不要变动
|
||||
glLibs = new string[]
|
||||
{
|
||||
$"{glLibRootDir}libemscriptenglx.a",
|
||||
$"{glLibRootDir}libemscriptenglx_2021.a",
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
// unity2022, tuanjie lib引入
|
||||
bool showEnableGLX2022Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202203OrNewer();
|
||||
|
||||
var glx2022Importer = AssetImporter.GetAtPath(glLibs[0]) as PluginImporter;
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2022Plugin);
|
||||
#else
|
||||
glx2022Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2022Plugin);
|
||||
#endif
|
||||
SetPluginCompatibilityByModifyingMetadataFile(glLibs[0], showEnableGLX2022Plugin);
|
||||
}
|
||||
|
||||
{
|
||||
// unity2021 lib引入
|
||||
bool showEnableGLX2021Plugin = config.CompileOptions.enableEmscriptenGLX && IsCompatibleWithUnity202102To202203();
|
||||
|
||||
var glx2021Importer = AssetImporter.GetAtPath(glLibs[1]) as PluginImporter;
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, showEnableGLX2021Plugin);
|
||||
#else
|
||||
glx2021Importer.SetCompatibleWithPlatform(BuildTarget.WebGL, showEnableGLX2021Plugin);
|
||||
#endif
|
||||
SetPluginCompatibilityByModifyingMetadataFile(glLibs[1], showEnableGLX2021Plugin);
|
||||
}
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lua Adaptor Settings.
|
||||
*/
|
||||
@ -1395,8 +1458,7 @@ namespace WeChatWASM
|
||||
var buildTemplate = new BuildTemplate(
|
||||
Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir),
|
||||
Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Editor", "template"),
|
||||
Path.Combine(config.ProjectConf.DST, miniGameDir),
|
||||
true
|
||||
Path.Combine(config.ProjectConf.DST, miniGameDir)
|
||||
);
|
||||
buildTemplate.start();
|
||||
// FIX: 2021.2版本生成symbol有bug,导出时生成symbol报错,有symbol才copy
|
||||
@ -1983,7 +2045,7 @@ namespace WeChatWASM
|
||||
config.ProjectConf.bundleHashLength.ToString(),
|
||||
bundlePathIdentifierStr,
|
||||
excludeFileExtensionsStr,
|
||||
config.CompileOptions.enableiOSMetal ? "5" : (config.CompileOptions.Webgl2 ? "2" : "1"),
|
||||
config.CompileOptions.Webgl2 ? "2" : "1",
|
||||
Application.unityVersion,
|
||||
WXExtEnvDef.pluginVersion,
|
||||
config.ProjectConf.dataFileSubPrefix,
|
||||
@ -2032,7 +2094,9 @@ namespace WeChatWASM
|
||||
config.ProjectConf.MemorySize.ToString(),
|
||||
config.SDKOptions.disableMultiTouch ? "true" : "false",
|
||||
// Perfstream,暂时设为false
|
||||
"false"
|
||||
"false",
|
||||
config.CompileOptions.enableEmscriptenGLX ? "true" : "false",
|
||||
config.CompileOptions.enableiOSMetal ? "true" : "false"
|
||||
});
|
||||
|
||||
List<Rule> replaceList = new List<Rule>(replaceArrayList);
|
||||
|
||||
@ -185,6 +185,7 @@ namespace WeChatWASM
|
||||
this.formCheckbox("profilingMemory", "Profiling Memory");
|
||||
this.formCheckbox("webgl2", "WebGL2.0");
|
||||
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存");
|
||||
this.formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案");
|
||||
// this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案,需要开启iOS高性能+模式,有助于提升运行性能,降低iOS功耗");
|
||||
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
|
||||
this.formCheckbox("cleanBuild", "Clean WebGL Build");
|
||||
@ -449,6 +450,7 @@ namespace WeChatWASM
|
||||
this.setData("webgl2", config.CompileOptions.Webgl2);
|
||||
this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus);
|
||||
this.setData("iOSMetal", config.CompileOptions.enableiOSMetal);
|
||||
this.setData("EmscriptenGLX", config.CompileOptions.enableEmscriptenGLX);
|
||||
this.setData("fbslim", config.CompileOptions.fbslim);
|
||||
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
|
||||
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
|
||||
@ -528,6 +530,7 @@ namespace WeChatWASM
|
||||
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
|
||||
config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus");
|
||||
config.CompileOptions.enableiOSMetal = this.getDataCheckbox("iOSMetal");
|
||||
config.CompileOptions.enableEmscriptenGLX = this.getDataCheckbox("EmscriptenGLX");
|
||||
config.CompileOptions.fbslim = this.getDataCheckbox("fbslim");
|
||||
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
|
||||
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");
|
||||
|
||||
@ -129,6 +129,10 @@ namespace WeChatWASM
|
||||
{
|
||||
return WXConvertCore.UseiOSMetal;
|
||||
});
|
||||
WXExtEnvDef.RegisterAction("WXConvertCore.UseEmscriptenGLX", (args) =>
|
||||
{
|
||||
return WXConvertCore.UseEmscriptenGLX;
|
||||
});
|
||||
WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) =>
|
||||
{
|
||||
#if UNITY_2018
|
||||
|
||||
@ -2,7 +2,7 @@ namespace WeChatWASM
|
||||
{
|
||||
public class WXPluginVersion
|
||||
{
|
||||
public static string pluginVersion = "202508190736"; // 这一行不要改他,导出的时候会自动替换
|
||||
public static string pluginVersion = "202509010306"; // 这一行不要改他,导出的时候会自动替换
|
||||
}
|
||||
|
||||
public class WXPluginConf
|
||||
|
||||
Binary file not shown.
@ -653,6 +653,7 @@
|
||||
是否使用iOS metal指令流
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.CompileOptions.enableEmscriptenGLX" -->
|
||||
<member name="F:WeChatWASM.CompileOptions.brotliMT">
|
||||
<summary>
|
||||
是否使用brotli多线程压缩
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4e2a80fab2cbe76fc8f8a9443ecab609
|
||||
guid: 3c89eae4734717e0e91248465802fe7d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -419,8 +419,8 @@ mergeInto(LibraryManager.library, {
|
||||
WXVideoAddListener: function(id, key) {
|
||||
window.WXWASMSDK.WXVideoAddListener(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(key));
|
||||
},
|
||||
WXVideoDestroy: function(id) {
|
||||
window.WXWASMSDK.WXVideoDestroy(_WXPointer_stringify_adaptor(id));
|
||||
WXVideoDestroy: function(id, isLast) {
|
||||
window.WXWASMSDK.WXVideoDestroy(_WXPointer_stringify_adaptor(id), isLast);
|
||||
},
|
||||
WXVideoExitFullScreen: function(id) {
|
||||
window.WXWASMSDK.WXVideoExitFullScreen(_WXPointer_stringify_adaptor(id));
|
||||
@ -627,6 +627,9 @@ mergeInto(LibraryManager.library, {
|
||||
stringToUTF8(returnStr, buffer, bufferSize);
|
||||
return buffer;
|
||||
},
|
||||
WXSetSyncReadCacheEnabled: function(enabled) {
|
||||
window.WXWASMSDK.WXSetSyncReadCacheEnabled(enabled);
|
||||
},
|
||||
WXGetPluginCachePath: function() {
|
||||
var returnStr = window.WXWASMSDK.WXGetPluginCachePath();
|
||||
var bufferSize = lengthBytesUTF8(returnStr || '') + 1;
|
||||
|
||||
@ -98,18 +98,19 @@ var WXAssetBundleLibrary = {
|
||||
value: function get(key) {
|
||||
var temp = this.hash.get(key);
|
||||
if (temp !== undefined) {
|
||||
if(temp.cleanable && unityNamespace.isAndroid && temp.time + this.ttl * 1000 < Date.now()){
|
||||
try {
|
||||
var check_path = WXFS.fd2wxStream.get(key).path
|
||||
if(!GameGlobal.manager.getCachePath(check_path)){
|
||||
throw new Error("No such file in the wx cache system")
|
||||
}
|
||||
WXFS.fs.statSync(check_path)
|
||||
} catch (e) {
|
||||
GameGlobal.manager.reporter.wxAssetBundle.reportEmptyContent({stage: WXFS.WXABErrorSteps['kCacheGet'], path: check_path, error: !!e ? e.toString() : 'unknown'});
|
||||
GameGlobal.manager.Logger.pluginLog('[WXAssetBundle]Android statSync path: ' + check_path + ' error: ' + (!!e ? e.toString() : 'unknown'));
|
||||
}
|
||||
}
|
||||
// 忽略permission denied,屏蔽上报
|
||||
// if(temp.cleanable && unityNamespace.isAndroid && temp.time + this.ttl * 1000 < Date.now()){
|
||||
// try {
|
||||
// var check_path = WXFS.fd2wxStream.get(key).path
|
||||
// if(!GameGlobal.manager.getCachePath(check_path)){
|
||||
// throw new Error("No such file in the wx cache system")
|
||||
// }
|
||||
// WXFS.fs.statSync(check_path)
|
||||
// } catch (e) {
|
||||
// GameGlobal.manager.reporter.wxAssetBundle.reportEmptyContent({stage: WXFS.WXABErrorSteps['kCacheGet'], path: check_path, error: !!e ? e.toString() : 'unknown'});
|
||||
// GameGlobal.manager.Logger.pluginLog('[WXAssetBundle]Android statSync path: ' + check_path + ' error: ' + (!!e ? e.toString() : 'unknown'));
|
||||
// }
|
||||
// }
|
||||
this.hash.delete(key);
|
||||
temp.time = Date.now();
|
||||
this.hash.set(key, temp);
|
||||
|
||||
BIN
Runtime/Plugins/libemscriptenglx.a
Normal file
BIN
Runtime/Plugins/libemscriptenglx.a
Normal file
Binary file not shown.
69
Runtime/Plugins/libemscriptenglx.a.meta
Normal file
69
Runtime/Plugins/libemscriptenglx.a.meta
Normal file
@ -0,0 +1,69 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cccbd1d680cfe34fa1fef9e4875e5f23
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 0
|
||||
Exclude Linux64: 0
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude WeixinMiniGame: 0
|
||||
Exclude Win: 0
|
||||
Exclude Win64: 0
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
WeixinMiniGame: WeixinMiniGame
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Runtime/Plugins/libemscriptenglx_2021.a
Normal file
BIN
Runtime/Plugins/libemscriptenglx_2021.a
Normal file
Binary file not shown.
93
Runtime/Plugins/libemscriptenglx_2021.a.meta
Normal file
93
Runtime/Plugins/libemscriptenglx_2021.a.meta
Normal file
@ -0,0 +1,93 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89ccba97a8e2991dc502c741bc8cd6c6
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 1
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude WebGL: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude WindowsStoreApps: 1
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
AndroidSharedLibraryType: Executable
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
WebGL: WebGL
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
WeixinMiniGame: WeixinMiniGame
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Windows Store Apps: WindowsStoreApps
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DontProcess: false
|
||||
PlaceholderPath:
|
||||
SDK: AnySDK
|
||||
ScriptingBackend: AnyScriptingBackend
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 744bf12ecf3dfaa699dd812a15f33b22
|
||||
guid: 4e40b39a0f6bb8990e8562e86f2b2761
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00bce541fac34af9181e2dc507ef6680
|
||||
guid: 758ab031318c7562cd0ea8d26d28faba
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
259
Runtime/WX.cs
259
Runtime/WX.cs
@ -276,6 +276,16 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.CreateBLEPeripheralServer(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.exitChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.exitChatTool.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 退出聊天工具模式
|
||||
/// </summary>
|
||||
public static void ExitChatTool(ExitChatToolOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ExitChatTool(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.exitMiniProgram(Object object)](https://developers.weixin.qq.com/minigame/dev/api/navigate/wx.exitMiniProgram.html)
|
||||
/// 需要基础库: `2.17.3`
|
||||
@ -511,6 +521,45 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.GetChannelsLiveNoticeInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getChatToolInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.getChatToolInfo.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 获取聊天工具模式下的群聊信息。
|
||||
/// 需要注意的是,单聊群和多聊群下返回的群唯一标识是不同的。
|
||||
/// 1. 多聊群下返回 opengid
|
||||
/// 2. 单聊群下返回 open_single_roomid
|
||||
/// 同时将返回用户在群(含单聊)下的唯一标识 group_openid。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.getChatToolInfo({
|
||||
/// success(res) {
|
||||
/// // res
|
||||
/// {
|
||||
/// errMsg: 'getChatToolInfo:ok',
|
||||
/// encryptedData: '',
|
||||
/// iv: ''
|
||||
/// }
|
||||
/// },
|
||||
/// fail() {
|
||||
/// }
|
||||
/// })
|
||||
/// ```
|
||||
/// 敏感数据有两种获取方式,一是使用 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。
|
||||
/// 获取得到的开放数据为以下 json 结构(其中 opengid 为当前群的唯一标识):
|
||||
/// ```json
|
||||
/// {
|
||||
/// "opengid": "OPENGID", // 多聊群下返回的群唯一标识
|
||||
/// "open_single_roomid": "", // 单聊群下返回的群唯一标识
|
||||
/// "group_openid": "", // 用户在当前群的唯一标识
|
||||
/// "chat_type": 3, // 聊天室类型
|
||||
/// }
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void GetChatToolInfo(GetChatToolInfoOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.GetChatToolInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getClipboardData(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/clipboard/wx.getClipboardData.html)
|
||||
/// 需要基础库: `1.1.0`
|
||||
@ -641,6 +690,16 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.GetGameClubData(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getGameExptInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.getGameExptInfo.html)
|
||||
/// 需要基础库: `3.8.8`
|
||||
/// 给定实验参数数组,获取对应的实验参数值
|
||||
/// </summary>
|
||||
public static void GetGameExptInfo(GetGameExptInfoOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.GetGameExptInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getGroupEnterInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html)
|
||||
/// 需要基础库: `2.10.4`
|
||||
@ -683,6 +742,16 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.GetGroupEnterInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getGroupMembersInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupMembersInfo.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 获取所选群成员的头像、昵称,自行在开放数据域中渲染
|
||||
/// </summary>
|
||||
public static void GetGroupMembersInfo(GetGroupMembersInfoOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.GetGroupMembersInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getInferenceEnvInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ai/inference/wx.getInferenceEnvInfo.html)
|
||||
/// 需要基础库: `2.30.1`
|
||||
@ -847,27 +916,6 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.GetSetting(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getShareInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.getShareInfo.html)
|
||||
/// 需要基础库: `1.1.0`
|
||||
/// 获取转发详细信息(主要是获取群ID)。 从群聊内的小程序消息卡片打开小程序时,调用此接口才有效。从基础库 v2.17.3 开始,推荐用 [wx.getGroupEnterInfo](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 替代此接口。
|
||||
/// **示例代码**
|
||||
/// 敏感数据获取方式 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。
|
||||
/// 获取得到的开放数据为以下 json 结构(其中 openGId 为当前群的唯一标识):
|
||||
/// ```json
|
||||
/// {
|
||||
/// "openGId": "OPENGID"
|
||||
/// }
|
||||
/// ```
|
||||
/// **Tips**
|
||||
/// - 如需要展示群名称,小程序可以使用 [开放数据组件](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/open-data.html)
|
||||
/// - 小游戏可以通过 [`wx.getGroupInfo`](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupInfo.html) 接口获取群名称
|
||||
/// </summary>
|
||||
public static void GetShareInfo(GetShareInfoOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.GetShareInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getShowSplashAdStatus(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ad/wx.getShowSplashAdStatus.html)
|
||||
/// 需要基础库: `3.7.8`
|
||||
@ -1272,6 +1320,16 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.NotifyBLECharacteristicValueChange(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.notifyGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.notifyGroupMembers.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 提醒用户完成任务,标题长度不超过 30 个字符,支持中英文和数字,中文算2个字符。
|
||||
/// </summary>
|
||||
public static void NotifyGroupMembers(NotifyGroupMembersOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.NotifyGroupMembers(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.openAppAuthorizeSetting(Object object)](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.openAppAuthorizeSetting.html)
|
||||
/// 需要基础库: `2.25.3`
|
||||
@ -1383,6 +1441,19 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.OpenChannelsUserProfile(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.openChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.openChatTool.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 进入聊天工具模式。
|
||||
/// 1. 不传入聊天室id时,微信会拉起聊天列表让用户选择,用户选择后绑定聊天室进入聊天工具模式。
|
||||
/// 2. 传入聊天室id时(群聊为opengid,单聊为open_single_roomid),会直接绑定该聊天室进入,此时必须传入对应的 chatType。
|
||||
/// 3. 聊天室类型可从 [[getGroupEnterInfo]](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 返回值中获取。
|
||||
/// </summary>
|
||||
public static void OpenChatTool(OpenChatToolOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OpenChatTool(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.openCustomerServiceChat(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/service-chat/wx.openCustomerServiceChat.html)
|
||||
/// 需要基础库: `2.30.4`
|
||||
@ -1906,6 +1977,25 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.ScanCode(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.selectGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.selectGroupMembers.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 选择聊天室的成员,并返回选择成员的 group_openid。若当前为群聊,则会拉起成员选择器;若当前为单聊,则直接返回双方的 group_openid。
|
||||
/// ****
|
||||
/// ```js
|
||||
/// wx.selectGroupMembers({
|
||||
/// maxSelectCount: 3,
|
||||
/// success(res) {
|
||||
/// // res.members
|
||||
/// }
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void SelectGroupMembers(SelectGroupMembersOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.SelectGroupMembers(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.setBLEMTU(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.setBLEMTU.html)
|
||||
/// 需要基础库: `2.11.0`
|
||||
@ -2068,6 +2158,56 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.SetVisualEffectOnCapture(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.shareAppMessageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareAppMessageToGroup.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 转发小程序卡片到聊天
|
||||
/// </summary>
|
||||
public static void ShareAppMessageToGroup(ShareAppMessageToGroupOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ShareAppMessageToGroup(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.shareEmojiToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareEmojiToGroup.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 转发表情到聊天
|
||||
/// </summary>
|
||||
public static void ShareEmojiToGroup(ShareEmojiToGroupOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ShareEmojiToGroup(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.shareImageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareImageToGroup.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 转发图片到聊天
|
||||
/// </summary>
|
||||
public static void ShareImageToGroup(ShareImageToGroupOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ShareImageToGroup(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.shareTextToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareTextToGroup.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 转发文本到聊天
|
||||
/// </summary>
|
||||
public static void ShareTextToGroup(ShareTextToGroupOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ShareTextToGroup(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.shareVideoToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareVideoToGroup.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 转发视频到聊天
|
||||
/// </summary>
|
||||
public static void ShareVideoToGroup(ShareVideoToGroupOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ShareVideoToGroup(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.showActionSheet(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ui/interaction/wx.showActionSheet.html)
|
||||
/// 显示操作菜单
|
||||
@ -2578,6 +2718,16 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.ExitPointerLock();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.isChatTool()](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.isChatTool.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 是否处于聊天工具模式
|
||||
/// </summary>
|
||||
public static void IsChatTool()
|
||||
{
|
||||
WXSDKManagerHandler.Instance.IsChatTool();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.removeStorageSync(string key)](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorageSync.html)
|
||||
/// [wx.removeStorage](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorage.html) 的同步版本
|
||||
@ -2992,12 +3142,12 @@ namespace WeChatWASM
|
||||
/// [wx.onError(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/app/app-event/wx.onError.html)
|
||||
/// 监听全局错误事件
|
||||
/// </summary>
|
||||
public static void OnError(Action<Error> error)
|
||||
public static void OnError(Action<ListenerError> error)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OnError(error);
|
||||
}
|
||||
|
||||
public static void OffError(Action<Error> error)
|
||||
public static void OffError(Action<ListenerError> error)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OffError(error);
|
||||
}
|
||||
@ -3274,6 +3424,28 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.OffNetworkWeakChange(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onOfficialComponentsInfoChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.onOfficialComponentsInfoChange.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 监听官方组件信息变化事件
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const callback = res => console.log('officialComponentsInfoChange', res)
|
||||
/// wx.onOfficialComponentsInfoChange(callback)
|
||||
/// // 取消监听
|
||||
/// wx.offOfficialComponentsInfoChange(callback)
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void OnOfficialComponentsInfoChange(Action<OnOfficialComponentsInfoChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OnOfficialComponentsInfoChange(result);
|
||||
}
|
||||
|
||||
public static void OffOfficialComponentsInfoChange(Action<OnOfficialComponentsInfoChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OffOfficialComponentsInfoChange(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onScreenRecordingStateChanged(function listener)](https://developers.weixin.qq.com/minigame/dev/api/device/screen/wx.onScreenRecordingStateChanged.html)
|
||||
/// 需要基础库: `3.1.4`
|
||||
@ -3455,10 +3627,25 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.OffWindowResize(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onWindowStateChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/window/wx.onWindowStateChange.html)
|
||||
/// 需要基础库: `3.8.8`
|
||||
/// 监听小程序窗口状态变化事件。仅适用于 PC 平台
|
||||
/// </summary>
|
||||
public static void OnWindowStateChange(Action<OnWindowStateChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OnWindowStateChange(result);
|
||||
}
|
||||
|
||||
public static void OffWindowStateChange(Action<OnWindowStateChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OffWindowStateChange(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onAddToFavorites(function listener)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.onAddToFavorites.html)
|
||||
/// 需要基础库: `2.10.3`
|
||||
/// 监听用户点击菜单「收藏」按钮时触发的事件(安卓7.0.15起支持,iOS 暂不支持)
|
||||
/// 监听用户点击菜单「收藏」按钮时触发的事件
|
||||
/// </summary>
|
||||
public static void OnAddToFavorites(Action<Action<OnAddToFavoritesListenerResult>> callback)
|
||||
{
|
||||
@ -3769,6 +3956,30 @@ namespace WeChatWASM
|
||||
return WXSDKManagerHandler.GetMenuButtonBoundingClientRect();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [Object wx.getOfficialComponentsInfo()](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.getOfficialComponentsInfo.html)
|
||||
/// 需要基础库: `3.7.12`
|
||||
/// 获取所有官方组件的相关信息
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const componentsInfo = wx.getOfficialComponentsInfo();
|
||||
/// const { notificationComponentInfo } = componentsInfo;
|
||||
/// if (notificationComponentInfo.isShow) {
|
||||
/// console.log(notificationComponentInfo.boundingClientRect.width);
|
||||
/// console.log(notificationComponentInfo.boundingClientRect.height);
|
||||
/// console.log(notificationComponentInfo.boundingClientRect.top);
|
||||
/// console.log(notificationComponentInfo.boundingClientRect.left);
|
||||
/// console.log(notificationComponentInfo.boundingClientRect.bottom);
|
||||
/// console.log(notificationComponentInfo.boundingClientRect.right);
|
||||
/// }
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static OfficialComponentsInfo GetOfficialComponentsInfo()
|
||||
{
|
||||
return WXSDKManagerHandler.GetOfficialComponentsInfo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [Object wx.getStorageInfoSync()](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfoSync.html)
|
||||
/// [wx.getStorageInfo](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfo.html) 的同步版本
|
||||
|
||||
@ -535,7 +535,7 @@ namespace WeChatWASM
|
||||
/// </summary>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
public static WXVideo CreateVideo(WXCreateVideoParam param)
|
||||
public static WXVideo CreateVideo(CreateVideoOption param)
|
||||
{
|
||||
return WXSDKManagerHandler.Instance.CreateVideo(param);
|
||||
}
|
||||
@ -766,6 +766,16 @@ namespace WeChatWASM
|
||||
return WXSDKManagerHandler.Instance.GetCachePath(url);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 临时修复安卓在主线程繁忙时,异步读缓存耗时高,但需关注同步读文件可能导致掉帧
|
||||
/// 仅在有需要的情况下主动开启,需要同步读的场景完成后再主动关闭
|
||||
/// </summary>
|
||||
/// <param name="enabled"></param>
|
||||
public static void SetSyncReadCacheEnabled(bool enabled)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.SetSyncReadCacheEnabled(enabled);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
@ -1127,6 +1137,15 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option);
|
||||
}
|
||||
#endregion
|
||||
#region 虚拟支付
|
||||
/// <summary>
|
||||
/// 请求虚拟支付
|
||||
/// </summary>
|
||||
public static void RequestVirtualPayment(RequestVirtualPaymentOption option)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.RequestVirtualPayment(option);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// [[PageManager](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.html) wx.createPageManager()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html)
|
||||
@ -1153,6 +1172,12 @@ namespace WeChatWASM
|
||||
{
|
||||
return WXSDKManagerHandler.Instance.CreatePageManager();
|
||||
}
|
||||
|
||||
/// <returns></returns>
|
||||
public static WXMiniReportManager GetMiniReportManager(GetMiniReportManagerParam param)
|
||||
{
|
||||
return WXSDKManagerHandler.Instance.GetMiniReportManager(param);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72b139033b80b9d6b99085dfc8bc2a49
|
||||
guid: 6a7f49141c293b031d3896531e763c04
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a997306c2732066bba544aa059476b08
|
||||
guid: 2e08b7f6166de2463bf5feb19764571d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ebbc2640a5b6186f28f1b7605fbabab7
|
||||
guid: 13b9fc617a476a83ef30baeee06f7d11
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd42866e6c5266b7e4359f2543a1fec8
|
||||
guid: 2aed4dd6dbf8ff0c57a30a0161c10664
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9cd04a9e88b74649448d33f0cd13031e
|
||||
guid: a9bab0836eed63c7bc3be5f80551ed43
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c611738fcc7802f4d0a2c44863e28ee8
|
||||
guid: 02dd610c2a053661566ee8e25679aef5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 434a16c5ea815113890c5d6f58c6c7ca
|
||||
guid: 1ffa41520f541390c5255e5d4a234f18
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0cc3b7ca12186d2d446018c3ddf214d
|
||||
guid: d099dff717b7b3bea1dfcb3cf32a8af3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac4244e6a18805d144af9149f834e0a1
|
||||
guid: c6c8aa73eeb2e19f775300b9b517154b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2bf22c2d04a9e7d9f297501c1323ac4d
|
||||
guid: d226549bc4cd24c8654d67fd0eba19f7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8570e6b4206b6d7d341446244a6c4da7
|
||||
guid: 932c852451b359546fa0d7ab636276e1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eaa133708b8be10e36a5ebe9452e572
|
||||
guid: de20c01e993b1cdfa042a78010cc279f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d03bc8e8d87086243a0a65794f51bd6
|
||||
guid: 86f2ddfc291828a637475837d495e7cd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5b36e6b6d042ee0548fa62635223b58
|
||||
guid: 82e7718ef67f7ab18934f9ec65bd877b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 140fee18982d4e45623dd3a1e66ac75e
|
||||
guid: 55498fcaaadc2910ba0bf7bfcd0b7050
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 659e2b43f55112843ee9c6407128bac6
|
||||
guid: 66bcc1c13704f16f5f9c7c229071fa20
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1c372ff8f4195bc75114c9554eaff6f
|
||||
guid: 889887790d734dbfd42adcdb1c2b2025
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2fa6a51b71803dc08b295c766489b9ea
|
||||
guid: 9d8c5bdd37ac3bb41b1b544a75164ab7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1484f1e87b79ffa93541f61a84b1893f
|
||||
guid: b12a7cbaed0233b0893d48d4a8a3bf30
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 345eb4b995090af85b5e5ba6a3a0515a
|
||||
guid: dc31ef9f26d39802700d905370f55ca6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b38adae15bfe35672bce4821ca5930db
|
||||
guid: 2657af516f7ab016dcef2454dba2338c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a775d3ea945670380658bc11adcc9728
|
||||
guid: acb8028520990f644373bca5385ab06c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 163cfa54d38fa37b54e9b08c88273927
|
||||
guid: b591164990bd4fe4dcfa32a54ec4e141
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1018,6 +1018,9 @@ export default {
|
||||
if (WEBAudio.audioWebSupport === 0 || WEBAudio.audioWebEnabled === 0) {
|
||||
return;
|
||||
}
|
||||
if (WEBAudio.audioContext && WEBAudio.audioContext.state !== 'suspended') {
|
||||
return;
|
||||
}
|
||||
resumeWebAudio();
|
||||
},
|
||||
_JS_Sound_Set3D(channelInstance, threeD) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a77aeffdf1e4e4cae8e2605672c55550
|
||||
guid: 9848347f8713b5ec4f956927d311be8e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2941757369859aeba3d7e6ebd831fa2
|
||||
guid: fc2fd2579994779d36d7f7cc0a832186
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 73b593c254c758a6cea0d1c1d60fc3e7
|
||||
guid: f3b4fc423cc011c858fa78c2242b308f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ea8a010da6162ea8ea52fb1f569e671
|
||||
guid: 4ac55184dcb2ef21c355c770605fa69f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ba51385d798e8f725194b8f0044ee13
|
||||
guid: 69c255bd0de26abc015589aa370182d8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 320dac1f684fc429e72cdca93fe1f0c8
|
||||
guid: 22afa485e6881f734145705343f98868
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24dad2d7efe34e93f6a63a48016423ae
|
||||
guid: e7198cb3b8ecaaf1dc2ba6579d2cdd53
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8367c4606f2866b4e651d631280b4ac0
|
||||
guid: 718dd8d8c3b797f642e49b93b377c963
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c30c8164896ec58e547faa1c28b542c3
|
||||
guid: d3eede88cac18634fe2cee41df6e634c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3682b97797acb1af66d14874ecb5ef66
|
||||
guid: a80f0e84fd340491b169387456b0745d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bdb08ac45c3e02d1cca0bc6baaa7cff9
|
||||
guid: 0f51c768593a470c6f9cf8aac1e9db3c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4748760dc46a32255e35634543f34af
|
||||
guid: 0bddf1481fcc0a701c5e852b199b2cc3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c37db65e214cfc4b0653da8ad7410b4
|
||||
guid: 7d2f6576e0aedf85a947ce1823e675b0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95757d8548b999bde6d0b6787c0ae1d9
|
||||
guid: e3f0438ee53faf3ba1fc9357ca155e4d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -93,6 +93,14 @@ export const ResType = {
|
||||
top: 'number',
|
||||
width: 'number',
|
||||
},
|
||||
OfficialComponentsInfo: {
|
||||
notificationComponentInfo: 'OfficialComponentInfo',
|
||||
},
|
||||
OfficialComponentInfo: {
|
||||
boundingClientRect: 'ClientRect',
|
||||
isVisible: 'bool',
|
||||
name: 'string',
|
||||
},
|
||||
GetStorageInfoSyncOption: {
|
||||
currentSize: 'number',
|
||||
keys: 'string[]',
|
||||
@ -180,10 +188,15 @@ export const ResType = {
|
||||
downstreamThroughputKbpsEstimate: 'number',
|
||||
estimate_nettype: 'number',
|
||||
fetchStart: 'number',
|
||||
httpDNSDomainLookUpEnd: 'number',
|
||||
httpDNSDomainLookUpStart: 'number',
|
||||
httpRttEstimate: 'number',
|
||||
invokeStart: 'number',
|
||||
peerIP: 'string',
|
||||
port: 'number',
|
||||
protocol: 'string',
|
||||
queueEnd: 'number',
|
||||
queueStart: 'number',
|
||||
receivedBytedCount: 'number',
|
||||
redirectEnd: 'number',
|
||||
redirectStart: 'number',
|
||||
@ -518,6 +531,12 @@ export const ResType = {
|
||||
status: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetChatToolInfoSuccessCallbackResult: {
|
||||
cloudID: 'string',
|
||||
encryptedData: 'string',
|
||||
errMsg: 'string',
|
||||
iv: 'string',
|
||||
},
|
||||
GetClipboardDataSuccessCallbackOption: {
|
||||
data: 'string',
|
||||
errMsg: 'string',
|
||||
@ -555,6 +574,10 @@ export const ResType = {
|
||||
signature: 'string',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetGameExptInfoSuccessCallbackResult: {
|
||||
list: 'object',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetGroupEnterInfoError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
@ -565,6 +588,20 @@ export const ResType = {
|
||||
errMsg: 'string',
|
||||
iv: 'string',
|
||||
},
|
||||
GetGroupMembersInfoSuccessCallbackResult: {
|
||||
membersInfo: 'ResultOpenDataContextUserInfo[]',
|
||||
errMsg: 'string',
|
||||
},
|
||||
ResultOpenDataContextUserInfo: {
|
||||
avatarUrl: 'string',
|
||||
city: 'string',
|
||||
country: 'string',
|
||||
gender: 'number',
|
||||
language: 'string',
|
||||
nickName: 'string',
|
||||
openId: 'string',
|
||||
province: 'string',
|
||||
},
|
||||
GetInferenceEnvInfoSuccessCallbackResult: {
|
||||
ver: 'string',
|
||||
errMsg: 'string',
|
||||
@ -667,7 +704,7 @@ export const ResType = {
|
||||
errMsg: 'string',
|
||||
openIdList: 'string[]',
|
||||
},
|
||||
RequestFailCallbackErr: {
|
||||
LoginFailCallbackErr: {
|
||||
errMsg: 'string',
|
||||
errno: 'number',
|
||||
},
|
||||
@ -736,9 +773,8 @@ export const ResType = {
|
||||
OnDeviceOrientationChangeListenerResult: {
|
||||
value: 'string',
|
||||
},
|
||||
Error: {
|
||||
ListenerError: {
|
||||
message: 'string',
|
||||
stack: 'string',
|
||||
},
|
||||
OnGamepadConnectedListenerResult: {
|
||||
gamepad: 'string',
|
||||
@ -784,6 +820,9 @@ export const ResType = {
|
||||
networkType: 'string',
|
||||
weakNet: 'bool',
|
||||
},
|
||||
OnOfficialComponentsInfoChangeListenerResult: {
|
||||
OfficialComponentsInfo: 'OfficialComponentsInfo',
|
||||
},
|
||||
OnScreenRecordingStateChangedListenerResult: {
|
||||
state: 'string',
|
||||
},
|
||||
@ -846,6 +885,9 @@ export const ResType = {
|
||||
windowHeight: 'number',
|
||||
windowWidth: 'number',
|
||||
},
|
||||
OnWindowStateChangeListenerResult: {
|
||||
state: 'string',
|
||||
},
|
||||
OpenCardRequestInfo: {
|
||||
cardId: 'string',
|
||||
code: 'string',
|
||||
@ -889,12 +931,6 @@ export const ResType = {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
},
|
||||
RequestMidasFriendPaymentSuccessCallbackResult: {
|
||||
cloudID: 'string',
|
||||
encryptedData: 'string',
|
||||
errMsg: 'string',
|
||||
iv: 'string',
|
||||
},
|
||||
MidasPaymentError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
@ -940,6 +976,10 @@ export const ResType = {
|
||||
scanType: 'string',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GroupMemberInfo: {
|
||||
members: 'string[]',
|
||||
errMsg: 'string',
|
||||
},
|
||||
SetBLEMTUFailCallbackResult: {
|
||||
mtu: 'number',
|
||||
},
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecf2513c35b8072a06c821bd5737fadf
|
||||
guid: cebc3f1de407499f7f0bb5395b110826
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -86,4 +86,12 @@ export const ResTypeOther = {
|
||||
status: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
LoadOption: {
|
||||
openlink: 'string',
|
||||
query: 'object',
|
||||
},
|
||||
ShowOption: {
|
||||
openlink: 'string',
|
||||
query: 'object',
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f418650d2052e382b5c4facc7970625
|
||||
guid: 65f9fd08cd8a4b08f18d099cd088db8b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ca2e677b7926336eed382fbb4ae7c866
|
||||
guid: 0e47f58780dc909887befd8af3d13c98
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -27,10 +27,12 @@ function WX_OneWayNoFunction(functionName, ...params) {
|
||||
}
|
||||
|
||||
|
||||
const onlyReadyResponse = [
|
||||
const onlyReadResponse = [
|
||||
'getSystemSetting',
|
||||
'getAppAuthorizeSetting',
|
||||
];
|
||||
|
||||
const needParseJson = ['WXMiniReportManagerReport'];
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
function WX_SyncFunction(functionName, ...params) {
|
||||
return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params);
|
||||
@ -72,6 +74,10 @@ export default {
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse(successType, res);
|
||||
|
||||
if (lowerFunctionName === 'getGameExptInfo') {
|
||||
res.list = JSON.stringify(res.list);
|
||||
}
|
||||
moduleHelper.send(`${functionName}Callback`, JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
@ -234,7 +240,7 @@ export default {
|
||||
},
|
||||
WX_SyncFunction_t(functionName, returnType) {
|
||||
const res = WX_SyncFunction(functionName);
|
||||
if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) {
|
||||
if (onlyReadResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) {
|
||||
formatResponse(returnType, JSON.parse(JSON.stringify(res)));
|
||||
return JSON.stringify(res);
|
||||
}
|
||||
@ -391,6 +397,10 @@ export default {
|
||||
WX_ClassOneWayNoFunction(className, functionName, id);
|
||||
},
|
||||
WX_ClassOneWayNoFunction_vs(className, functionName, id, param1) {
|
||||
if (needParseJson.includes(className + functionName)) {
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
param1 = JSON.parse(param1);
|
||||
}
|
||||
WX_ClassOneWayNoFunction(className, functionName, id, param1);
|
||||
},
|
||||
WX_ClassOneWayNoFunction_t(className, functionName, returnType, id) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7f2df765fb49ed9c7a770ba4ea740bc1
|
||||
guid: ce7585cf8141ece2fc6386f2f290bf1d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8b714053feed532ca6f7d0491c47b557
|
||||
guid: 8474ea620066403f1b47862fee434c97
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aafe1f1425bb63fb2a8a1f2c952f6547
|
||||
guid: 6fa8492f619a1f05dece840e2281260f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81b0595187bd2e72660b4a973fb371db
|
||||
guid: 8072cc095be634317857438cfc1676e2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ff4a02d27c350c57c91f7658eb1581b
|
||||
guid: bc2e40ef479c1ecd330d75f59e5bb125
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df87d731e861a442062d81f9deea71d7
|
||||
guid: 7726a3c7f160c5dddd88496ab29f3860
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c16e081ef5eb96f146e80079e9c7b83
|
||||
guid: d3cf8a77fa9073023db4a4fc30af178a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -18,32 +18,27 @@ export default {
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
if (key === 'x' || key === 'y' || key === 'width' || key === 'height') {
|
||||
if (key === 'x' || key === 'y' || key === 'width' || key === 'height' || key === 'initialTime' || key === 'playbackRate') {
|
||||
obj[key] = +value;
|
||||
}
|
||||
else if (key === 'src' || key === 'poster') {
|
||||
else if (key === 'src' || key === 'poster' || key === 'objectFit' || key === 'backgroundColor') {
|
||||
obj[key] = value;
|
||||
}
|
||||
},
|
||||
WXVideoPlay(id) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
else if (key === 'live' || key === 'controls' || key === 'showProgress' || key === 'showProgressInControlMode'
|
||||
|| key === 'autoplay' || key === 'loop' || key === 'muted' || key === 'obeyMuteSwitch'
|
||||
|| key === 'enableProgressGesture' || key === 'enablePlayGesture' || key === 'showCenterPlayBtn') {
|
||||
obj[key] = value === 'True';
|
||||
}
|
||||
obj.play();
|
||||
},
|
||||
WXVideoAddListener(id, key) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj[key]((e) => {
|
||||
getObject(id)?.[key]((e) => {
|
||||
moduleHelper.send('OnVideoCallback', JSON.stringify({
|
||||
callbackId: id,
|
||||
errMsg: key,
|
||||
position: e && e.position,
|
||||
buffered: e && e.buffered,
|
||||
duration: e && e.duration,
|
||||
type: key,
|
||||
position: e?.position,
|
||||
buffered: e?.buffered ? Number(e.buffered) : undefined,
|
||||
duration: e?.duration,
|
||||
errMsg: e?.errMsg,
|
||||
}));
|
||||
if (key === 'onError') {
|
||||
GameGlobal.enableTransparentCanvas = false;
|
||||
@ -51,54 +46,31 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
WXVideoDestroy(id) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj.destroy();
|
||||
GameGlobal.enableTransparentCanvas = false;
|
||||
WXVideoRemoveListener(id, key) {
|
||||
getObject(id)?.[key]();
|
||||
},
|
||||
WXVideoExitFullScreen(id) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
WXVideoDestroy(id, isLast) {
|
||||
getObject(id)?.destroy();
|
||||
if (isLast) {
|
||||
GameGlobal.enableTransparentCanvas = false;
|
||||
}
|
||||
obj.exitFullScreen();
|
||||
},
|
||||
WXVideoPlay(id) {
|
||||
getObject(id)?.play();
|
||||
},
|
||||
WXVideoPause(id) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj.pause();
|
||||
},
|
||||
WXVideoRequestFullScreen(id, direction) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj.requestFullScreen(direction);
|
||||
},
|
||||
WXVideoSeek(id, time) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj.seek(time);
|
||||
getObject(id)?.pause();
|
||||
},
|
||||
WXVideoStop(id) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj.stop();
|
||||
getObject(id)?.stop();
|
||||
},
|
||||
WXVideoRemoveListener(id, key) {
|
||||
const obj = getObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj[key]();
|
||||
WXVideoSeek(id, time) {
|
||||
getObject(id)?.seek(time);
|
||||
},
|
||||
WXVideoRequestFullScreen(id, direction) {
|
||||
getObject(id)?.requestFullScreen(direction);
|
||||
},
|
||||
WXVideoExitFullScreen(id) {
|
||||
getObject(id)?.exitFullScreen();
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbba2afedf7de369f6616a2737e6584e
|
||||
guid: b48d46cd553f0b3c795e791c75d627cb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 425bb6592b83479f021f4ac580380f95
|
||||
guid: 27a3365aab45899d0da053eaacae6f8c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -171,6 +171,12 @@ function _JS_Video_Create(url) {
|
||||
function _JS_Video_Destroy(video) {
|
||||
debugLog('_JS_Video_Destroy', video);
|
||||
videoInstances[video].destroy();
|
||||
const Module = GameGlobal.manager.gameInstance.Module;
|
||||
const { GL } = Module;
|
||||
const gl = GL.currentContext.GLctx;
|
||||
if (!isWebVideo && gl.emscriptenGLX && Module._glxVideoDestroy) {
|
||||
Module._glxVideoDestroy(video);
|
||||
}
|
||||
delete videoInstances[video];
|
||||
}
|
||||
function _JS_Video_Duration(video) {
|
||||
@ -375,7 +381,29 @@ function _JS_Video_UpdateToTexture(video, tex) {
|
||||
if (!FrameworkData) {
|
||||
return false;
|
||||
}
|
||||
const Module = GameGlobal.manager.gameInstance.Module;
|
||||
const { GL, GLctx } = FrameworkData;
|
||||
const gl = GL.currentContext.GLctx;
|
||||
|
||||
if (!isWebVideo && Module._glxVideoUpdateToTexture && gl.emscriptenGLX) {
|
||||
const data = v.frameData?.data;
|
||||
const source = supportVideoFrame ? data : new Uint8ClampedArray(data);
|
||||
const byteLength = supportVideoFrame ? 0 : source.byteLength;
|
||||
let sourceIdOrPtr;
|
||||
if (supportVideoFrame) {
|
||||
sourceIdOrPtr = source.__uid;
|
||||
}
|
||||
else {
|
||||
sourceIdOrPtr = Module._glxGetVideoTempBuffer(video, byteLength);
|
||||
if (sourceIdOrPtr) {
|
||||
Module.HEAPU8.set(source, sourceIdOrPtr);
|
||||
}
|
||||
}
|
||||
|
||||
Module._glxVideoUpdateToTexture(v, supportVideoFrame, tex, v.videoWidth, v.videoHeight, sourceIdOrPtr);
|
||||
return true;
|
||||
}
|
||||
|
||||
GLctx.pixelStorei(GLctx.UNPACK_FLIP_Y_WEBGL, true);
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bd6bf06ecfb1617fb7b6603427825f15
|
||||
guid: 86ac23cb26b3342279683f9218bdb8b0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d8052d59bb07606065585cf08b0253d
|
||||
guid: 799e64e5fdad2dcb36776264b00a006f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 11f12368f26a118555972961efe907fd
|
||||
guid: 9c67b73785934901a2ced23c68f6e051
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1c65667ff7aa0db7dd760e09e48d235
|
||||
guid: 4b89c79ee457cda586fa349ecca29363
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b359eabcdef1919195de839fb78762b2
|
||||
guid: a4aa4c2409a4cc4081c44fd1266d91b8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b4020b540b9a7aa06d2d8136e952572
|
||||
guid: ce280a4d64a6a325887543dfe933c43b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1cea326b818f8026ffe01ca8bbd6c7a
|
||||
guid: 6fda40d56e11c02d795a3c5e9b6e89e1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82e623a803146806f2646ef54be62f88
|
||||
guid: d56e5755851768aee40fdd97cd56191e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -27,7 +27,11 @@ const managerConfig = {
|
||||
'$PRELOAD_LIST',
|
||||
],
|
||||
contextConfig: {
|
||||
contextType: $WEBGL_VERSION, // 1: webgl1 2: webgl2
|
||||
contextType: $WEBGL_VERSION,
|
||||
contextExt: {
|
||||
enableGLX: $ENABLE_GLX,
|
||||
enableMetal: $ENABLE_METAL,
|
||||
}
|
||||
},
|
||||
PROFILER_UPLOAD_URL: '',
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfb3621b99c16fe5918bd0f61cabef6d
|
||||
guid: faa09e5f3f8787d2ccf7f3c79bf14834
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
],
|
||||
"plugins": {
|
||||
"UnityPlugin": {
|
||||
"version": "1.2.79",
|
||||
"version": "1.2.81",
|
||||
"provider": "wxe5a48f1ed5f544b7",
|
||||
"contexts": [
|
||||
{
|
||||
@ -32,7 +32,7 @@
|
||||
]
|
||||
},
|
||||
"Layout": {
|
||||
"version": "1.0.15",
|
||||
"version": "1.0.16",
|
||||
"provider": "wx7a727ff7d940bb3f",
|
||||
"contexts": [
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 43a58900cd1f2cceeebe71cd0da6e9ea
|
||||
guid: 29e097b4a412b938f09d2f0e1c7d0851
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b1d832e9cee1c57b74a2fded945106ca
|
||||
guid: 5b0dc17e03feb0dd2fdb1c8e423ebe2f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4fbb60bb57bfbc6477067e849d4c899a
|
||||
guid: a2f9801f17437db75b4a57763f8a4671
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 62d3610273924692d8a468a7612ca4ba
|
||||
guid: 8c14303e22a4ea689a243356037b60f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dce8b79ef90a5f0785efa79abc051250
|
||||
guid: 37e3c5ff502308106e7363b0bfcd7c87
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e4435258531c885590de46de0a68372
|
||||
guid: 597622e11ca2a1d69d1ebda71a3d7cb6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 83a12c74827ac659f16b70e632b0a36b
|
||||
guid: 8346c2f2cde3e4228d6211db50bfafa1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d16ea1b19da3cbb0776441ccf58afbf5
|
||||
guid: d1f9339fa41cf4925ef2cfe33698283b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user