fulcrumapp/fulcrum-js

Support fetching spatial video/audio tracks

bmcbride opened this issue · 4 comments

Support fetching spatial video/audio tracks

This is implemented now but is undocumented, and only supports the default (Fulcrum spec) format.

client.videos.track('abc-123')
  .then(track => console.log(track))
  .catch(err => console.log(err));

returns:

[ { track: 
     [ [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array],
       [Array] ] } ]

Would we like to support the other available formats? gpx, kml, and geojson?

client.videos.track('ccf931bd-4e0f-4562-8c00-3a57f8a62589', 'geojson')
  .then(track => console.log(track))
  .catch(err => console.log(err));

would return:

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"id":"ccf931bd-4e0f-4562-8c00-3a57f8a62589","timestamp":"2017-10-25T19:17:49Z"},"geometry":{"type":"LineString","coordinates":[[-80.86455426186403,35.59410360645092,261.8389587402344],[-80.86455426186403,35.59410360645092,262.0450134277344],[-80.86455426186403,35.59410360645092,262.0747985839844]]}}]}
oeon commented

I know that @patdevinwilson often gets requests for video tracks as .gpx, which we've been using the Python library for, so maybe a +1 for that format at least.

@JasonSanford looks like both fulcrum-python and fulcrum-ruby support all the API formats: json (default), geojson, gpx, and kml. If we could add these to fulcrum-js, it would be excellent. Thanks!

https://github.com/fulcrumapp/fulcrum-python#track-method
https://github.com/fulcrumapp/fulcrum-ruby#clientvideostrackid-formatjson

Ready to go in 2.4.0