This project was generated with Angular CLI version 1.2.1.
Check out the demo site routed to an example room. To create your own room...
- Go to https://limitless-journey-63484.herokuapp.com/
[RoomName]
where[RoomName]
is the desired name for your room/channel. - Send link to another device
- Get an ETA
This uses google directions to determine the eta and html5 geolocation to determine the client's location.
- A user enters site at
/:room
- If they are the first in the room, they become the
host
otherwise they are aguest
- only allowed two users per room
host
is to send it's location- the assumption is that the
guest
is mostly stationary
- the assumption is that the
guest
calculates the duration fromguest
tohost
guest
displays durations and sends the duration information tohost
to display on their screen
The assumption is that guest
does not care as much about the eta accuracy at longer distances. They'll only care about distances that are much shorter.
This means we can quickly fetch GPS coordinates without giving it time to provide us an accurate reading
Since predicting time is easy, we can take advantage of it and reduce the amount of data sent
We'll need to self sign a certificate.
-
Run below at the root of project to generate a
key
andcert
on windows... (remove the extra slash for-subj
on other OS)openssl req -nodes -new -x509 -keyout server.key -out server.crt -reqexts SAN -extensions SAN -subj "//CN=localhost"
where
XXX
is number of days certificate will be valid for -
Trust the certificate on your machine (google
trust self signed ssl certificate
) -
Make sure to fully restart your browser.