soundscape-community / soundscape

An iOS application/service that aids navigation through spatialized audio
https://openscape.io
MIT License
18 stars 17 forks source link

Soundscape in the browser #75

Open steinbro opened 9 months ago

steinbro commented 9 months ago

One avenue to get Soundscape on more platforms is to turn it into a web app, rather than a native app. There have been a slew of Web APIs that have been added over the years that can do lots of things that weren't possible in a browser before.

This is an appealing approach, because we would have a single codebase for all platforms, in a language (JavaScript) that's familiar to more developers. However, there are a few major hurdles that need to be overcome:

  1. Spatial speech. You can generate text-to-speech audio, and also generate positional audio, but these are separate Web APIs. If the API works by just telling an underlying OS service to emit some speech, it might not be possible to apply the appropriate 3D effects on the resulting audio. Some discussion on the lack of integration of these two services: https://github.com/WebAudio/web-audio-api/issues/1764
  2. Location tracking. For privacy reasons, Apple blocks location services for web sites when the device is locked. This would interfere with a main usage mode for Soundscape, running with the device in your pocket.

I'm still inclined to have us start a minimal prototype, that can at least get a user's location while the app is active, fetch the appropriate map tiles, and announce nearby places (even if in non-spatial audio).

jchudge commented 9 months ago

I think that's a great idea - as you say, it will help us understand what is do-able, versus the constraints, and see how that balances out. Also, it flags the question that the current models of apps we're familiar with...may not necessarily be what emerges or evolves in the future...

steinbro commented 8 months ago

I have some core functionality working in a browser, namely basic callouts based on user position and direction, with sound effects positioned spatially. There's also a testing page that replays a given GPX file. Tested on desktop and iPhone. Links to the live demo here: https://github.com/soundscape-community/soundscape-web-client

Collaborations and contributions welcome, no Xcode required :)

steinbro commented 7 months ago

In the past few weeks, I've added some support for intersections, beacons, and a presentable UI. Some screenshots are now in the readme, same link as above: https://github.com/soundscape-community/soundscape-web-client