investigating Cacheing media file in player.

alt=
DannyA
@dannya
9 years ago
584 posts
It seems that when we change pages and the media player re-loads, it's re-requesting the file instead of playing the locally cached file that was already requested. How can we avoid this? This would result in tremendous use of BW as a person navigates the site; especially if you have large files.
updated by @dannya: 06/29/15 04:46:26PM
alt=
DannyA
@dannya
9 years ago
584 posts
Bumping this
michael
@michael
9 years ago
7,717 posts
Don't understand what you are trying to convey, try adding more info.
alt=
DannyA
@dannya
9 years ago
584 posts
Not sure what else to say. When you load a stream in the player, you are making a request to the server.As the file plays, the entire file is downloaded by the player. So If you have a 10MB file, it's stored in the local file system.

If I go to another page, the player reloads. Instead of playing the locally cached file, it requests the same 10MB file again. Obviously, making a 10MB request from the server every time you change pages is not ideal. You would consume a lot of BW very quickly.

What I'm trying to figure out is if there is a way for the player to check the local cache and play from there if it's already there.
brian
@brian
9 years ago
10,148 posts
This is not something we have much control over - this is a function of the browser and is mostly "automatic". I will check that our headers are all there though to make sure the browser has the best chance of doing that though - I know we're all setup on images, but no so sure about the media streaming.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
9 years ago
584 posts
Additionally, is there any way to ignore the media loading in the page load time?
michael
@michael
9 years ago
7,717 posts
DannyA:Additionally, is there any way to ignore the media loading in the page load time?

I can't help with this. It requires too much knowledge of how your system currently works that I don't have. Not sure if its better to not answer or post this answer.

Tags