• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Sound, Mp3, Android, Chrome and Microsoft Edge

Participant ,
Oct 06, 2019 Oct 06, 2019

Copy link to clipboard

Copied

createjs.Sound.on("fileload", handleFileLoad);
createjs.Sound.registerSound("music1.mp3", "MySound");

function handleFileLoad()
{
    createjs.Sound.play("MySound");
}

This code above works in the Microsoft Edge browser but not in Android and the Chrome browser. I'm using Animate CC 2018. I want to be able to play mp3 songs.

Views

281

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 11, 2019 Oct 11, 2019

Copy link to clipboard

Copied

createjs.Sound.alternateExtensions = ["mp3"];
createjs.Sound.on("fileload", handleFileLoad);
createjs.Sound.registerSound("music1.mp3", "MySound");

function handleFileLoad()
{
    createjs.Sound.play("MySound");
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 11, 2019 Oct 11, 2019

Copy link to clipboard

Copied

LATEST
This code above has worked in Chrome, but no longer. What can it depend on. I get these notes in the Chrome console "A cookie associated with a cross-site resource at http://createjs.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032. createjs-2015.11.26.min.js:17 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. c._isFileXHRSupported @ createjs-2015.11.26.min.js:17 createjs-2015.11.26.min.js:17 Access to XMLHttpRequest at 'file:///C:/Users/%C3%84garen/Documents/Homepage/Jag/WebAudioPluginTest.fail' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. c._isFileXHRSupported @ createjs-2015.11.26.min.js:17 createjs-2015.11.26.min.js:17 Uncaught (in promise) DOMException" Can anyone help me answer.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines