سؤال

On Firefox, Desktop Chrome, Safari browsers, this snippet works fine:

snd1 = new Audio("sound1.mp3");
snd1.play();

snd2 = new Audio("sound2.mp3");
snd2.play();

But on the Chromecast, snd2 will not play. After some experimenting, it seemed Chromecast would not allow to load more than one audio file.

Is this behavior by design?

هل كانت مفيدة؟

المحلول

You cannot use more than one audio unless you use Web Audio APIs, See also this post.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top