Skip to content

Commit

Permalink
Fix audio load error on TaoBao-MiniGame platform (cocos#17921)
Browse files Browse the repository at this point in the history
  • Loading branch information
bofeng-song authored and qiuguohua committed Nov 28, 2024
1 parent 8f8ce14 commit f8439cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions templates/taobao-mini-game/game.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
globalThis.window = globalThis;

if (!globalThis.window) {
globalThis.window = globalThis;
}
globalThis.self = $global;

globalThis.__taobaoRequire = (urlNoSchema) => {
Expand Down Expand Up @@ -71,7 +74,6 @@ function loadCC() {

function onApplicationCreated(application) {
return System.import('cc').then((cc) => {
globalThis.cc = cc;
require('./engine-adapter');
return application.init(cc);
}).then(() => { return application.start(); });
Expand Down

0 comments on commit f8439cb

Please sign in to comment.