Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an optional iOS "Tap to Play" interstitial button to Loader to accommodate interaction requirements for playing sounds #262

Closed
eonarheim opened this issue Apr 18, 2014 · 9 comments
Assignees
Labels
feature Label applied to new feature requests
Milestone

Comments

@eonarheim
Copy link
Member

eonarheim commented Apr 18, 2014

Add an interstitial step to Loader that is optional (and extensible) to have user interact with a UI element to allow iOS to play sounds immediately after loading.


This is for the HTML5 Audio Fallback.

Created a test case here: http://kamranicus.com/wp81-ie11-audio-bug/

Issues:

  • iOS will not play audio unless there's user interaction
  • Mobile devices have a long initial load time causing a significant delay in playback

Related posts:

I think the plan will be to implement the app cache storage with the audio tag fallback for browers that support it. Then in WinJS environment, use Windows Runtime API for sound.

@eonarheim eonarheim added this to the 0.3 Release milestone Apr 18, 2014
@eonarheim eonarheim added the bug label Apr 18, 2014
@kamranayub kamranayub changed the title Sound appears to be delayed when playing from Windows Phone 8.1 Sound appears to be delayed on mobile devices May 16, 2014
@kamranayub kamranayub changed the title Sound appears to be delayed on mobile devices Sound is delayed on mobile devices May 16, 2014
@eonarheim
Copy link
Member Author

Is this fixed?

@kamranayub
Copy link
Member

Nope. Will need to add local data/appcache enhancement to audio tag provider.

@jedeen jedeen modified the milestones: 0.3 Release, 0.4 Release Nov 8, 2014
@jedeen
Copy link
Member

jedeen commented May 10, 2015

@kamranayub Has any work been done to resolve this issue?

@kamranayub
Copy link
Member

I don't remember doing anything for this, no.

On Sun, May 10, 2015, 18:13 Josh Edeen notifications@github.com wrote:

@kamranayub https://github.com/kamranayub Has any work been done to
resolve this issue?


Reply to this email directly or view it on GitHub
#262 (comment)
.

@jedeen jedeen modified the milestones: 0.6 Release, 0.5 Release May 10, 2015
@jedeen jedeen modified the milestones: 0.7 Release, 0.6 Release Jun 14, 2015
@jedeen jedeen added the on-deck label Jul 12, 2015
@jedeen jedeen modified the milestones: 0.7 Release, vNext Jul 12, 2015
@jedeen jedeen removed the on-deck label Jul 21, 2015
@eonarheim
Copy link
Member Author

We should confirm this is still bug

@eonarheim
Copy link
Member Author

We could use the Xamarin test cloud to help test this
https://www.xamarin.com/test-cloud

@kamranayub kamranayub removed their assignment May 1, 2016
@kamranayub
Copy link
Member

kamranayub commented May 13, 2016

Tested with Sweepstacks:

  • Galaxy S6, Chrome -- No delay, works.
  • iPhone 6S - Starts audio after engaging drag

For Web Audio on iOS, you still need to trigger via user interaction:

https://developer.apple.com/library/safari/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/PlayingandSynthesizingSounds/PlayingandSynthesizingSounds.html#//apple_ref/doc/uid/TP40009523-CH6-SW1

I don't know if we can "fix" this--we may just need to warn people in the docs/tutorials.

One idea we had was to implement a flag on Loader where it will pause after loading all assets and say "tap to play" or something. On iOS, this would address the issue as a workaround.

@eonarheim
Copy link
Member Author

@kamranayub I like the "tap to play" workaround in the Loader to get around this iOS limitation

Also this article was pretty good https://www.ibm.com/developerworks/library/wa-ioshtml5/ it suggest a similar workaround

@kamranayub
Copy link
Member

Lets make this issue about implementing an optional loader function to do
this (with overridable draw/update). Just need to figure out how to detect
iOS... browser detection sucks, better if we can detect feature or test if
user interaction is required.

On Sat, May 14, 2016, 09:14 Erik Onarheim notifications@github.com wrote:

@kamranayub https://github.com/kamranayub I like the "tap to play"
workaround in the Loader to get around this iOS limitation

Also this article was pretty good
https://www.ibm.com/developerworks/library/wa-ioshtml5/ it suggest a
similar workaround


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#262 (comment)

@kamranayub kamranayub self-assigned this May 15, 2016
@kamranayub kamranayub changed the title Sound is delayed on mobile devices Add an optional iOS "Tap to Play" interstitial button to Loader to accommodate interaction requirements for playing sounds May 15, 2016
@kamranayub kamranayub added feature Label applied to new feature requests and removed bug This issue describes undesirable, incorrect, or unexpected behavior labels May 15, 2016
eonarheim pushed a commit that referenced this issue May 26, 2016
…Loader

BREAKING: start(ILoader) vs start(ILoadable) change

* Refactor loader to handle draw/update, add ILoader interface, extend Class

* Add ILoader

* Organize resources into folder

* Organize resources into folder

* Prevent loader from calling onprogress twice at 100%

* Add PausedAfterLoader support, docs, and visual tests including iOS

* Compile dists

* Switch to HTML element instead for iOS to work

* Compile dists

* Fix tslint and update docs

* Compile dists

* Recompile dists

* Try non-programmatic DOM element

* Compile dists

* Add webaudio unlocker for iOS and call it after triggering play

* Compile dists

* Fix indentation

* Update docs

* Compile dists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Label applied to new feature requests
Projects
None yet
Development

No branches or pull requests

3 participants