Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions adapter/InnerAudioContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ class InnerAudioContext {
_map.get(_this)["_cbManager"].onFunctionCallback(cbArray);
}

if (_this.autoplay === true && audioEngine.getState(_map.get(_this)['_audioId']) !== _map.get(_this)['_PLAYING']) {
var audioId = _map.get(_this)['_audioId'];
if (audioId === undefined) {
return;
}
if (_this.autoplay === true && audioEngine.getState(audioId) !== _map.get(_this)['_PLAYING']) {
_this.play();
}

_map.get(_this)["_preloaded"] = true;
if (_map.get(_this)['_audioId'] !== undefined && audioEngine.getState(_map.get(_this)['_audioId']) === _map.get(_this)['_PLAYING']) {
if (audioEngine.getState(audioId) === _map.get(_this)['_PLAYING']) {
var cbArray = _map.get(_this)["_cbManager"].getFunctionCallbackArray("onPlay");
if (cbArray !== undefined) {
_map.get(_this)["_cbManager"].onFunctionCallback(cbArray);
Expand Down
8 changes: 6 additions & 2 deletions test/assets/Adapter/rt-wx-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,16 @@ var InnerAudioContext = function () {
_map.get(_this)["_cbManager"].onFunctionCallback(cbArray);
}

if (_this.autoplay === true && audioEngine.getState(_map.get(_this)['_audioId']) !== _map.get(_this)['_PLAYING']) {
var audioId = _map.get(_this)['_audioId'];
if (audioId === undefined) {
return;
}
if (_this.autoplay === true && audioEngine.getState(audioId) !== _map.get(_this)['_PLAYING']) {
_this.play();
}

_map.get(_this)["_preloaded"] = true;
if (_map.get(_this)['_audioId'] !== undefined && audioEngine.getState(_map.get(_this)['_audioId']) === _map.get(_this)['_PLAYING']) {
if (audioEngine.getState(audioId) === _map.get(_this)['_PLAYING']) {
var cbArray = _map.get(_this)["_cbManager"].getFunctionCallbackArray("onPlay");
if (cbArray !== undefined) {
_map.get(_this)["_cbManager"].onFunctionCallback(cbArray);
Expand Down
2 changes: 1 addition & 1 deletion test/assets/Scene/main.fire.meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.0.0",
"ver": "1.0.1",
"uuid": "2d2f792f-a40c-49bb-a189-ed176a246e49",
"asyncLoadAssets": false,
"autoReleaseAssets": false,
Expand Down
3 changes: 1 addition & 2 deletions test/assets/resources/prefab/ui_media.prefab.meta
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"ver": "1.0.0",
"ver": "1.0.1",
"uuid": "91d8e1e2-192a-4871-abfa-13b3255a295c",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
23 changes: 16 additions & 7 deletions test/settings/builder.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"appKey": "",
"appSecret": "",
"encryptJs": false,
"excludeScenes": [],
"fb-instant-games": {},
"includeAnySDK": false,
"includeSDKBox": false,
"inlineSpriteFrames": true,
"inlineSpriteFrames_native": true,
"jailbreakPlatform": false,
"md5Cache": false,
"mergeStartScene": false,
"oauthLoginServer": "",
"optimizeHotUpdate": false,
"orientation": {
"landscapeLeft": true,
Expand All @@ -20,7 +15,6 @@
"upsideDown": false
},
"packageName": "org.cocos2d.helloworld",
"privateKey": "",
"qqplay": {
"REMOTE_SERVER_ROOT": "",
"orientation": "portrait"
Expand All @@ -33,5 +27,20 @@
"orientation": "portrait"
},
"xxteaKey": "c2bc529e-e890-4e",
"zipCompressJs": true
"zipCompressJs": true,
"baidugame": {
"appid": "testappid",
"orientation": "portrait",
"REMOTE_SERVER_ROOT": "",
"subContext": ""
},
"android-instant": {
"REMOTE_SERVER_ROOT": "",
"pathPattern": "",
"scheme": "https",
"host": "",
"skipRecord": false,
"recordPath": ""
},
"appBundle": false
}
23 changes: 14 additions & 9 deletions test/settings/project.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
{
"cocos-analytics": {
"appID": "13798",
"appSecret": "959b3ac0037d0f3c2fdce94f8421a9b2",
"channel": "",
"enable": false,
"version": ""
},
"assets-sort-type": "name",
"collision-matrix": [
[
true
Expand Down Expand Up @@ -34,17 +28,28 @@
"Intersection",
"Native NetWork"
],
"facebook": {
"appID": "",
"audience": {
"enable": false
},
"enable": false,
"live": {
"enable": false
}
},
"fit-height": true,
"fit-width": false,
"group-list": [
"default"
],
"last-module-event-record-time": 1557209333574,
"simulator-orientation": false,
"simulator-resolution": {
"height": 640,
"width": 960
},
"start-scene": "current",
"use-customize-simulator": false,
"use-project-simulator-setting": false,
"start-scene": "current"
"use-project-simulator-setting": false
}
146 changes: 146 additions & 0 deletions test/settings/services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
{
"services": [
{
"service_id": "235",
"service_name": "Cocos Analytics",
"service_desc": "提供最核心最基本的数据、标准化界面功能简洁易用、数据准确性最好",
"service_title": "精准了解游戏的新增、活跃、留存、付费等数据",
"service_icon": "https://account.cocos.com/client/3f8f31ccf66995e183044f167c092395.png",
"service_guide_url": "https://n-analytics.cocos.com/docs/",
"service_sample_url": "https://github.com/cocos-creator/tutorial-dark-slash/tree/analytics",
"service_dev_url": "http://analytics.cocos.com/realtime/jump_to/<app_id>",
"service_type": "3",
"service_type_zh": "公司和个人游戏",
"support_platform": [
"Android",
"iOS",
"HTML5"
],
"package_download_url": "http://download.cocos.com/CocosServices/plugins/service-analytics/1.1.7_2.0.3.zip",
"package_version_desc": "1、 更新 H5 SDK 版本至 2.0.3。<br>2、 SDK 优化更新,删除 init 接口字段 'channel' ,改为 login 接口输入。<br>3、 如有相关问题咨询或者需求, 可以联系我们技术支持邮箱 <a href=' '>support-cocos@cocos.com</a>",
"service_component_name": "service-analytics",
"package_versions": [
"1.0.0_1.0.5",
"1.1.2_2.0.0",
"1.1.3_2.0.1",
"1.1.4_2.0.1",
"1.1.5_2.0.1",
"1.1.6_2.0.1_2.0.2",
"1.1.7_2.0.3"
],
"build_platform": [
"web-mobile",
"web-desktop",
"fb-instant-games",
"wechatgame",
"wechatgame-subcontext",
"qqplay",
"android",
"android-instant",
"ios",
"mac",
"quickgame",
"qgame",
"huawei"
]
},
{
"service_id": "241",
"service_name": "Matchvs",
"service_desc": "通过SDK接入快速实现联网功能、帧同步、国内外多节点、服务器独立部署、gameServer自定义游戏服务端逻辑。\n技术支持群QQ群:822523258",
"service_title": "专业成熟的移动游戏联网与服务端解决方案",
"service_icon": "https://account.cocos.com/client/14406719a07eb3d714d36e5edc6e06fa.png",
"service_guide_url": "http://doc.matchvs.com/QuickStart/QuickStart-CocosCreator",
"service_sample_url": "http://www.matchvs.com/serviceCourse",
"service_dev_url": "http://www.matchvs.com/cocosLogin",
"service_type": "2",
"service_type_zh": "仅支持公司游戏",
"support_platform": [
"Android",
"iOS",
"HTML5"
],
"package_download_url": "http://download.cocos.com/CocosServices/plugins/service-matchvs/1.0.6_3.7.9.2.zip",
"package_version_desc": "更新日期:2019-03-20<br>更新内容:<br>1、添加多节点相关接口 <br>2、优化独立部署wss和ws切换<br>3、优化login参数容错<br>4、添加组队中踢人和消息发送接口<br>5、添加取消组队匹配接口",
"service_component_name": "service-matchvs",
"package_versions": [
"1.0.3_3.7.6.4",
"1.0.5_3.7.7.3",
"1.0.6_3.7.9.2"
],
"build_platform": [
"web-mobile",
"web-desktop",
"fb-instant-games",
"wechatgame",
"wechatgame-subcontext",
"qqplay",
"android",
"android-instant",
"ios",
"mac",
"quickgame",
"qgame",
"huawei"
]
},
{
"service_id": "242",
"service_name": "Agora Voice",
"service_desc": "稳定、低耗、76ms超低延时、全球200+数据中心覆盖;变声器、超高音质、听声辩位等丰富玩法极速接入;全平台支持:Android、iOS、Web。\n技术支持群QQ群:799099183",
"service_title": "游戏内置实时语音SDK",
"service_icon": "https://account.cocos.com/uploads/client_icon/date(\"Y-m-d\")/50fe52b789c2fc1e1fff9eec161c1bb3.png",
"service_guide_url": "https://docs.agora.io/cn/Interactive Gaming/game_c",
"service_sample_url": " https://github.com/AgoraIO/Voice-Call-for-Mobile-Gaming/tree/master/Basic-Voice-Call-for-Gaming/Hello-Cocos-Creator-Voice-Agora",
"service_dev_url": "https://sso.agora.io/api/oauth/cocos/login",
"service_type": "3",
"service_type_zh": "公司和个人游戏",
"support_platform": [
"Android",
"iOS",
"HTML5"
],
"package_download_url": "http://download.cocos.com/CocosServices/plugins/service-agora/1.0.1_2.2.3.20_2.5.2.zip",
"package_version_desc": "first release.",
"service_component_name": "service-agora",
"package_versions": [
"1.0.1_2.2.3.20_2.5.2"
],
"build_platform": [
"web-mobile",
"web-desktop",
"android",
"ios"
]
},
{
"service_id": "7",
"service_name": "AnySDK",
"service_desc": "800+渠道、支持多平台多引擎、安全稳定的本地打包工具。技术支持:https://forum.cocos.com/c/anysdk",
"service_title": "游戏快速接入第三方SDK的解决方案",
"service_icon": "https://account.cocos.com/client/3ba1fcf9029140cf08d95813e387d04a.png",
"service_guide_url": "http://docs.anysdk.com",
"service_sample_url": "http://github.com/AnySDK",
"service_dev_url": "http://dev.anysdk.com",
"service_type": "0",
"service_type_zh": "不支持游戏",
"support_platform": [
"Android",
"iOS",
"HTML5"
],
"package_download_url": "http://download.cocos.com/CocosServices/plugins/service-anysdk/1.0.1_2.2.5.zip",
"package_version_desc": "修复 Creator 2.0.x 系列版本 2.0.7 以上因调用 cc.game.restart(); 而导致的 AnySDK 调用失败的错误",
"service_component_name": "service-anysdk",
"package_versions": [
"1.0.1_2.2.5"
],
"build_platform": [
"web-mobile",
"web-desktop",
"android",
"ios"
]
}
]
}