-
Notifications
You must be signed in to change notification settings - Fork 34
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
Turn-by-Turn Voice Navigation in the Browser #279
Open
karussell
wants to merge
374
commits into
master
Choose a base branch
from
navi
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
374 commits
Select commit
Hold shift + click to select a range
3d78f71
try sth different
karussell 2f7a6bb
alert to see what is going on
karussell 02c3315
wtf now it is working without a change
karussell 5d3f76c
do proper navigation.stop
karussell 4f9f2cd
format
karussell 17d346b
minor css fix
karussell 80c85eb
merged master
karussell 84e6471
reroute: against react, but for now it seems to work ;)
karussell 2890ece
try enableHighAccuracy: true
karussell 91a1a3d
format
karussell d9669f3
fix this
karussell 146ad4a
merged master
karussell 5ca34e5
skip warning if already accepted
karussell 963e732
simplify
karussell 8f94c8b
mini refactoring
karussell 750e4f7
cancel previously spoken words to avoid queuing for rerouting
karussell f7bfe44
move navigation center to the bottom
karussell d70c8bb
useEffect is the proper way and should avoid unnecessary updates
karussell 503fe1a
much better state concept that also works for rerouting
karussell a3a518c
use correct profile for rerouting request
karussell 20d6082
ZoomMapToPoint should allow undefined heading (as this comes like thi…
karussell d56a158
format
karussell 784d865
include heading
karussell 5e07506
fix fake param
karussell 3db8391
proper TNSettingsState merge
karussell f789da2
use navi icon on map; keep instruction index and active path synced
karussell 20f6339
minor simplify
karussell c6659bd
fix test
karussell accb54e
simplify settings back to master
karussell 0f6cb2a
avoid multiple API requests at the same time
karussell d171e92
warn if rerouting was skipped
karussell 147034b
no need for extra end_turn_navigation.png
karussell bc8ffb0
current location -> better displacement
karussell 93f1608
format
karussell 9ac8b1e
skip rerouting if not yet enabled (initial path already wrong -> dela…
karussell 4aad5a9
style
karussell c42e470
use heading if 0
karussell 9a68dce
fix heading
karussell 1d87ecb
add test for TurnNavigationStore and nextWaypointIndex
karussell d27aac5
more tests
karussell 2bac2b8
more robust waypoint skipping
karussell d6ee634
better rerouting and tests with via points
karussell 2ad3c41
use filled navigation icon
karussell bbb9fb3
merged master
karussell 8c2d459
put a number in the turn instruction marker
karussell 5583749
avoid path usage in TurnNavigation.tsx
karussell 6c8e5d7
reset instruction and path detail object on SetSelectedPath action
karussell 03babfc
merged master
karussell 530861b
tweak panel with accept
karussell e1c6169
merged master
karussell c56f9e0
make clicking volume easier
karussell 80fb4fe
critical order change to make context menu working again when navi wa…
karussell c566f5b
less fluctuation in fake mode
karussell 2fb5d6b
merged master
karussell 1720fae
Merge branch 'master' into navi
karussell c44b2d1
make end navigation icon larger
karussell 664e4f3
Merge branch 'master' into navi
karussell c2d2f93
translate start navi button
karussell 5b1ab86
cleanup and switch layer to vector tiles when starting navigation
karussell 57622d3
show intermediate UI if waiting for GPS
karussell 0aab99a
do fullscreen only for small screens
karussell b0910d1
set default layer to TNStore
karussell 5bebfe2
remove duplicate calcDist method
karussell fa60efe
more space for route result buttons
karussell b878a7b
merged master
karussell 1b6a439
fix css (why is important necessary?); allow zoom but remove while na…
karussell cdef54c
Merge branch 'master' into navi
karussell 35270d3
include custom model in rerouting request
karussell 4c78626
show the moving arrow on map
karussell 29b1564
much simpler and working solution (no dup arrows and view is automati…
karussell add737a
ugly: the always busy rendering (1sec animation vs. every 1sec a loc …
karussell ce270ae
try increase
karussell 3503651
use estimated speed from path details instead of imprecise path.dist/…
karussell c138da1
avoid frequent rerouting if current location is more than 50m away
karussell 44ff73c
Revert "avoid frequent rerouting if current location is more than 50m…
karussell 2673a6a
avoid too frequent rerouting
karussell d90575f
initialize profile
karussell 75fa966
cleanup SpeechSynthesizer
karussell 72e8526
new nice mouse-controlled GPS injection for testing
karussell aa44860
avoid that jest has to parse index.d.ts from ol
karussell a4bbad8
create NoSleep only once
karussell 63bb24d
test nosleep w/o fullscreen
karussell 2d4d102
move NoSleep into TN state
karussell 2fa622b
remove nosleep text
karussell 82da4da
proper arrow animation that requires other features in same layer
karussell 3b72423
Merge branch 'master' into navi
karussell 9f87784
move back to simpler view-animation-synchronization, see https://stac…
karussell b7988b5
use linear easing to make transition smoother
karussell a063590
show real speed and ignore mouse out of map
karussell 10479bc
optimize for smaller screen
karussell 4d3f155
workaround for Safari
karussell 4c8c09c
more recent NoSleep.js (include directly)
karussell 2adedac
nosleep: try init after fullscreen
karussell 8f38369
duration of 950ms is in practise too long and rerender can take too l…
karussell 793ef09
package-lock.json: revert to master
karussell e54906a
merged master
karussell 78bffc0
improve rendering via reducing animation duration
karussell 96767ee
make nosleep working in firefox. also create video element again on-d…
karussell 7276619
nosleep: avoid mute and loop for recent iOS
karussell 7674b16
minor fix
karussell a5d0a04
converter: revert to 1 fraction digit
karussell e19cea7
for now do not optimize response speed and always use all via points
karussell 9630c75
i18n
karussell 841247d
don't allow finger gesture rotation on mobile but still allow program…
karussell 61c9947
formatting
karussell da44c3a
use noun
karussell a022d6f
comment
karussell 3775c58
include arrow in canvas, use tip from https://stackoverflow.com/a/753…
karussell b9c20d6
until bugs appear let's revert the previous commit as it uses ~15% mo…
karussell cd259fb
merged master
karussell 50662c1
Merge branch 'master' into navi
karussell 38816f0
i18n update
karussell db27a33
merged master
karussell 9d24b10
wording
karussell 0ee0abd
i18n fix
karussell f705dbf
merged master
karussell c6318b5
option to avoid using vector tiles for navigation
karussell 26228fb
merge master
karussell 11477b6
minor i18n
karussell e97e5ef
include full screen as option too
karussell 642a7e9
merged master
karussell 37818e5
highlight arrow with transparent white background
karussell 47e116e
merged master
karussell 6f42702
Revert b9c20d65df834bef4382245e2192c460827eab9f because we want to dr…
karussell a06ec3f
allow zoom and pan while navigation via disabling synchronized view
karussell 3cfe5aa
for now zooming will not disable synced view as it is not easy to dif…
karussell 52fcae7
bind to this for locationUpdate
karussell 01f39ea
increase zoom
karussell 3c44397
optimize css and make buttons a bit bigger
karussell 487c9ed
sync view if 2nd navigation
karussell 3e1fe9d
currentLocationLayer can somehow get empty (for longer zoom durations…
karussell 2419a04
minor cleanup
karussell 55b5e58
make max speed 'sign' look fine for >= 100
karussell 5c5f927
merged master
karussell f502868
init customModelStr for TurnNavigationStore too
karussell ec6aae6
test for custom model navigation
karussell cb6f329
Merge branch 'master' into navi
karussell 690032b
formatting
karussell 59212fa
make it less likely that rm+add background layer causes empty layers …
karussell 0bed7d9
remove less common .info
karussell 1dda087
fix background layer switching for navigation
karussell 31b3e53
better simulation with fake=<gps_delta> parameter
karussell a957cc7
formatting
karussell b313b6d
ignore heavy rotation when nearly standstill e.g. often happens at a …
karussell c87b0f8
do not say reroute if waypoint is just skipped
karussell dbcea70
add missing steps in simulation to better know when turn is announced
karussell 1d8620b
tweak turn announcements
karussell e338c26
earlier instruction text and factor=8 only for selected road classes
karussell c993d9b
less random rotation at standstill
karussell a8c7042
announce earlier for slower speeds
karussell 46015e8
reduce 'ignore'-speed to 1m/s and ignore without big angle change if …
karussell b7cf225
for walking it is still too fast
karussell 16ba678
heading only for motor vehicles
karussell 852c077
i18n: updated
karussell f09123a
i18n: reroute
karussell 14be001
hide context menu
karussell 5badb0f
formatting
karussell 668a363
fix problem with mobile safari and ending navigation; improve css
karussell 471b9b7
avoid context menu from being created
karussell c1ec6e2
make expression more clear
karussell 341856e
use Math.floor as we are moving and it is better to use smaller value
karussell 67171c0
one log
karussell dbf0202
bug fix and tests for announcements; store announcementsToDo in state
karussell 98258e7
move animation: set rotation only when changed
karussell 4feb52f
merged
karussell c5422cf
more compact navigation bar
karussell 4c792db
close context menu before going to navi, separate useEffect
easbar 29934f1
bigger maxSpeed circle necessary and minor increase height of bar
karussell df39629
css tuning
karussell b4366b9
merged master
karussell 934f6ee
move turn sign to top left
karussell 0ec6127
minor padding
karussell 753b482
support for miles and mph
karussell 1feeafe
bug fix
karussell 0ff5ff4
formatting
karussell a473eb0
make two fonts and the arrow a bit larger
karussell c8ebfcf
more padding
karussell 97742c4
show debug info on click
karussell c9e3265
i18n update
karussell f0eb1c1
show 'then' instruction sign
karussell 5b37d70
formatting
karussell 10c3312
current speed: minor css tweak
karussell 387bb1f
larger font for next turn text
karussell 6523238
thenInstr: minor bug fix
karussell 12e88dd
added eruda
karussell c6bf7d9
added maplibre for faster vector tiles
karussell 80dfe20
smoother location update now possible
karussell 822c886
try speed-dependent zoom to get closer to roads for e.g. walking
karussell 63ad885
formatting
karussell 55aeafc
merged master
karussell ce7d27f
less zooming
karussell c23958e
fix rotate when navigation ends
karussell 4ba63a5
zoom in earlier
karussell d9a79e4
separate favicon plugin to avoid calling it for fdroid
karussell 694d0da
minor fix
karussell e8aa7ee
a few more comments
karussell 8bbdcb4
use root for navi branch
karussell d886f24
formatting
karussell 150c372
do early announcement more frequent
karussell a156f70
description
karussell 967f43b
added copy link
karussell 845ffe6
merged master
karussell 1adebf1
formatting
karussell bbe6051
update package-lock
karussell 088c474
smaller white halo
karussell 5de7af3
smaller screens possible
karussell 6785cf7
move center a bit up if landscape
karussell cd31f04
Merge branch 'master' into navi
karussell e17dce4
Merge branch 'master' into navi
karussell e319686
use explicit domain if localhost
karussell 510cf90
use showSaveFilePicker for chrome and capacitorJS case
karussell c405ed4
formatting
karussell d568ef2
don't use showSaveFilePicker and just own global ghSaveFile
karussell b1cc913
remove unused map tile services
karussell 3039c9f
getCurrentDetails: reduce complexity and duplication
karussell 10a79dd
pick instruction and additionally consider the heading
karussell 62cc97f
fix incorrect zoom out when navigation stops
karussell b90f2aa
one more zoom out if faster for speeds above 23m/s
karussell 2d60c3d
navigation stop should properly position the map
karussell cba1be3
Merge branch 'master' into navi
karussell aca7bcb
block long routing requests with custom_model for re-routing too
karussell 3f6b897
Merge branch 'master' into navi
karussell d424fa2
merged master
karussell 8e93318
safari: intrinsic width of svg too large in navigation view
karussell 4a71eaa
merged master
karussell b27bc01
minor i18n fix
karussell bbbec85
Merge branch 'master' into navi
karussell 76ae682
minor fix
karussell 67a81b9
formatting
karussell cac184f
Merge branch 'master' into navi
karussell ceae37a
Merge branch 'master' into navi
karussell 177c392
merged master
karussell 9d51ee3
i18n: update
karussell 344d0e3
merged master
karussell 3def33e
ignore non-existent path details
karussell 3ad5ba7
show motorway_junction if no street_name
karussell 8b5bfac
Merge branch 'master' into navi
karussell dc49eb0
merged master
karussell 36a5fa9
merged master
karussell 2c205c0
fix package-lock
karussell 843bc93
minor fix
karussell b0674fc
add missing 'center to map' handling
karussell fe63cba
fdroid build failed: try sem ver
karussell 4363c5e
merged master
karussell 5f079b1
add zoom to route action to context menu
karussell 8a2f497
move item and fix padding
karussell 1ff1f33
Merge branch 'master' into navi
karussell a601adf
merged master
karussell 0174133
merged master
karussell 674a473
formatting
karussell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export interface SpeechSynthesizer { | ||
synthesize(text: string): void | ||
} | ||
|
||
export class SpeechSynthesizerImpl implements SpeechSynthesizer { | ||
private readonly locale: string | ||
private readonly speechSynthesisAPIAvailable: boolean | ||
|
||
constructor(locale: string) { | ||
this.locale = locale | ||
this.speechSynthesisAPIAvailable = 'speechSynthesis' in window | ||
} | ||
|
||
synthesize(text: string) { | ||
if (this.speechSynthesisAPIAvailable) { | ||
let utterance = new SpeechSynthesisUtterance(text) | ||
utterance.lang = this.locale | ||
if (speechSynthesis.pending) speechSynthesis.cancel() | ||
speechSynthesis.speak(utterance) | ||
} else { | ||
console.log('no speechSynthesis API available') | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karussell I have a doubt, the good formula is rather : meterToFt => value * 3,28084 ?
same for meterToMiles (value * 1609.34) or I'm wrong ?