cc.audioEngine.play file path with md5 cache

Hi,

I built web desktop with md5 cache enable then I found out there is no sound anymore. As I suspected, cc.audioEngine.play expect a file path but file name changed due to md5 cache enabled.
Is there any work around for this issue?

@slackmoehrle could you help me check with engineer team

@jare can you review this?

Which version you are using?

I use Cocos Creator 1.9.0

You can do this for now:

let url = cc.url.raw(path);

if (cc.loader.md5Pipe) {
    url = cc.loader.md5Pipe.transformURL(url);
}
1 Like

I tested the 1.9.0, there is no problem, can you show me how to use it?(Best to give me a demo project)