Ionic html audio tag does not play full song

I am developing a music streaming app with ionic 2,

I have a server and S3 bucket for mp3 storage. So my server pipes the request of S3 link of mp3 to the app after the request is made from the app. I see android is behaving all well, even chrome developer tool shows OK and plays in ionic serve.

But with iOS, which I am testing with ionic view pro I see it only plays a part of it and restarts from the beginning. When I see the request made by iOS to my server, it looks like it makes several requests to get the same file. And still incomplete audio fetch.

My server api is simple,
router.get(’/playSong/:id’, function(req, res, next) {
var songId =;
dbService.fetchSongID(songId).then(function(result) {
.on(‘response’, function(response) {
res.writeHead(200, { ‘Content-Type’: ‘audio/mpeg3’, ‘Content-Length’: result[0].contentLength });

Ionic 2, fetching audio is
playMedia(audioObject) {;
if ( { = ‘’;
this.playTrackIcon.state = true; = ‘audio/mp3’; = AppSettings.API_ENDPOINT + ‘playSong/’ + audioObject._id;; = audioObject.title; = audioObject.album; = audioObject.artist; = ‘metadata’;

Android seems to fetch audio in one get request, all good. Everything is normal and plays all long way through the song. But iOS plays a part of the song and repeats its self from the start.