freethlua / individualogist-whats-your-archetype

http://archetype.individualogist.com
0 stars 1 forks source link

10. slow loading speeds #9

Closed freethlua closed 7 years ago

freethlua commented 7 years ago
  1. We are encountering an issue with slow loading speeds, will compressing or minifying the mp3 file sizes resolve this? If not, how can we optimise this?
freethlua commented 7 years ago

Is this related to #7?

freethlua commented 7 years ago

Is it also slow on github's server? https://freethlua.github.io/individualogist-whats-your-archetype/?dev&report=free

zhixinlin commented 7 years ago

The actual issue is that the audio stream pauses every now and then (this is present in desktop). But on mobile (using our actual phones) it takes a little over 10 seconds for the entire thing to load. I'm not sure if it's the same issue. But if a smaller mp3 file will do the trick, we can look into that. It seems fine on both github and our own servers. If it the issue can be avoided and our users can enjoy a guaranteed pleasant user experience, that would be preferrable.

freethlua commented 7 years ago

I can't seem to reproduce this. I'm using the standard browser <audio> tag which is supposed to manage the buffering smartly, and it does on my end. I have a slow internet and it still plays in quick enough for me from the server both from individualogist and github server. Even locally I've tested with artificial speed throttling and it still loads quick enough.

I think this might be related to this: HTML5 audio can't automatically play (on chrome Android and possibly other devices) unless the playback is triggered by the user.

Although it still doesn't explain why in your case it works after 10 secs, and the intermittent play/pause thereafter. Could you still just test to see if playback begins immediately if you tap on the screen instead of waiting?

If this is true then maybe the first screen should just be "play" button.

(edit: later I tried on a phone and it does seem to be the case)

Could intermittent play/pause just be due to you tapping on the screen? (the area for tapping to trigger play/pause is the entire width/height of the slider ("above-the-fold"))

I have another idea in the meanwhile, using Audio API more directly than <audio> tag, I'll update you if that works.

Let me also try something different, please upload all audio files to Youtube and provide me the links.

zhixinlin commented 7 years ago

Hi Freeth, thank you for the update. I'm open to having a play button on the first screen for mobile devices, but we can keep it on autoplay for desktop instead. Let me know how this goes. Thanks a lot!

freethlua commented 7 years ago

It now starts out with the play button.

I've also reduced the mp3 file sizes substantially (~50-80% reduction by encoding at 64kbps with jointstereo which is ok for voice, I didn't hear much difference in quality).