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

Stream audio track to amplitude with GridFSBucket #314

Closed
2 tasks done
Shaiwal opened this issue Jan 18, 2019 · 4 comments
Closed
2 tasks done

Stream audio track to amplitude with GridFSBucket #314

Shaiwal opened this issue Jan 18, 2019 · 4 comments

Comments

@Shaiwal
Copy link

Shaiwal commented Jan 18, 2019

I am trying to stream audio content via NodeJS and MongoDB(GridFS) with amplitude for audio player and I also face similar Problem for chrome and safari while trying to attempt timing scrubbing everytime the Amplitude.setSongPlayedPercentage gets called the player resets and starts from 0. Can you help with this?

@danpastori
Copy link
Contributor

@Shaiwal Is your server set up to partially stream? What this means is you need to return byte range headers: https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests. If these aren't returned, then the Amplitude won't scrub the song correctly. You can check the header on the network request it should say "Accept-Ranges: Bytes". See attached.
screen shot 2019-01-27 at 7 14 18 pm

@Shaiwal
Copy link
Author

Shaiwal commented Jan 28, 2019

Thanks @danpastori for replying back, so yes we are streaming but the stream ends, I am using GridFSBucket with node js, something like this , can you please help, I am facing issue while sending the header, even though I tried with header still no luck, the track resets to 00:00.

@danpastori
Copy link
Contributor

@Shaiwal Do you have an example for this? I still believe it has something to do with the byte headers or it could be with CORS which can block that as well. You would have to do origin * or whatever you need for your specific project. It can be a real challenge. If you have a public facing URL I can help out.

@danpastori
Copy link
Contributor

Closed due to inactivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants