laya的那些坑

时间:2021-07-05 12:20:53

游戏运行在chrome里面 听不见声音

游戏运行在chrome里面  听不见声音;其它浏览器可以听见声音
开发者模式提示如下:
 The AudioContext was not allowed to start. It must be resume (or created) after a user gesture on the page
https://ask.layabox.com/question/14526?notification_id=58618&rf=false&item_id=24363,24398#!answer_24398
pc端打开chrome浏览器,新建页签,地址栏输入 chrome://flags/#autoplay-policy 选择 No user gesture is required,之后重启浏览器即可,chrome浏览器更新版本后的新增的安全策略。
 
字体嵌入
https://www.w3cplus.com/content/css3-font-face
http://ask.layabox.com/question/332