7

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

"permissions": {
    "audio-channel-content":{"description":"Use the audio channel for the music player"}
}

In my index.html I've got an audio tag like:

<audio mozaudiochannel="content" preload="none" src="http://my-stream-url"></audio>

I can play my audio stream during 2mn:

  • The first one when the phone is unlock.
  • After 1mn my phone auto-lock the screen and it continue playing for another minute.

Does it possible to play this audio stream more than 1mn after the lock?

Thanks in advance.

ChoiZ
  • 747
  • 1
  • 5
  • 23

2 Answers2

0

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';
Aras
  • 5,878
  • 9
  • 49
  • 76
0

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.

gasolin
  • 2,196
  • 1
  • 18
  • 20