HTML5 Audio limitations on iOS 4? Playlist, background, etc.

I evaluate HTML5 sound on iOS 4 and try to understand its limitations. From what I can say ...

  • Audio playback in the background is possible
  • javascript events can not be fired in the background after track completion
  • You can trigger JavaScript events while the screen is off, but Safari should be in the foreground (before turning off the screen)

My goal for this current project is to create a dynamic playlist that will continue to fire events and move on to the next track, even if Safari is not in the foreground. Is this possible with the current way of working with audio on HTML5 in iOS?

I am wondering how the JavaScript event chain works on iOS, if anyone has more information. It seems that you are allowed to queue back, but this should happen shortly after the "human" function (for example, clicking on an element) occurs. Everything that tries to queue sound beyond this human function is deprived of the opportunity to play.

Also...

Is it even possible to have events that fire to transfer a real iOS application to the next track? It seems that the application is only allowed to end the current audio stream, and then it goes into an idle state. Just trying to figure out all the angles here!

+3
source share
1 answer

This is a pretty old question, so I'm not sure if you have already found the answer or not.


, , , JavaScript Safari.

iPad HTML5

- . 3.x, 4.x . , Apple , webapp 3g- , .

, (), . .load() ( ). iOS , ( ).

+2

Source: https://habr.com/ru/post/1793325/


All Articles