How to play audio in background with firefox os?

后端 未结 2 1677
长情又很酷
长情又很酷 2021-01-18 07:27

In my manifest file I\'ve add the audio-channel-content in permissions:

\"permissions\": {
    \"audio-channel-content\":{\"description\":\"Use the audio cha         


        
相关标签:
2条回答
  • 2021-01-18 08:12

    The code and permission block you have are correct and I can confirm it is working in Firefox OS 1.1. You can also do the whole thing in Javascript:

    audio = new Audio();
    audio.preload = 'none';
    audio.mozAudioChannelType = 'content';
    
    0 讨论(0)
  • 2021-01-18 08:16

    It's because the wifi is closed after screen shutdown (auto-lock)?

    Are you using the dev version of gaia? Wifi is set to always connect in product version.

    0 讨论(0)
提交回复
热议问题