1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
    tapengine is on a distinguished road

      0  

    Default how to make sound play when scene start?

    how to make sound play when scene start?


    i make some web application using buzz.js. it's work great when use with "on click" action.
    but now I want to play sound when scene start up
    sound played when I open in safari on my mac but nothing in my iPhone app? Why?

    here is my script.

    start>Custom Javascript>soundTitle.play();

  2. #2
    Sencha - Architect Dev Team arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    417
    Vote Rating
    5
    arnebech is on a distinguished road

      0  

    Default


    Typically on the iOS, sound events have to be started by the user. This is a restriction Apple has put on their devices (probably to restrict autoplay).

  3. #3
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
    tapengine is on a distinguished road

      0  

    Default


    Thanks for your reply

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    3
    Vote Rating
    0
    tapengine is on a distinguished road

      0  

    Default I found solution!!

    I found solution!!


    I found solution to fix this problem.

    just add this property to web-view

    webView.mediaPlaybackRequiresUserAction = NO;


    hope it helpful to you

  5. #5
    Sencha - Architect Dev Team arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    417
    Vote Rating
    5
    arnebech is on a distinguished road

      0  

    Default


    That is a good point!

    Just to clarify for other readers, if you are embedding your own webview in an iOS application (in xcode) you have more control, and you can enable playback without user interaction.
    mediaPlaybackRequiresUserAction

Tags for this Thread