Preload/Cache Video File

I am preloading several assets for a game via JavaScript. I house the files in a JSON document. The majority of the files download correctly when I monitor the network activity from Developer Tools. However, the two .mp4 files I have listed in my JSON file do not download in their entirety. I’ve tried the preload/prefetch links in the head tag, but the result is the same.

I’ve read articles that explain how modern browsers are partially downloading video files to “reduce the bandwidth load”. Is there any reliable way to preload/cache an .mp4 in it’s entirety for later use?

Here is my code:

Preload Code

$.html5Loader({
            filesToLoad:'common/js/files.json',
            onComplete: function () {
                console.log("All the assets are loaded!");
                $("#loading_screen").hide();
                $("#menu_screen").show();
            },
        });

JSON Snippet:

  	 }, {
		"type": "VIDEO",
		"sources": {
			"h264": {
			"source": "common/mp4/closing_mission1.mp4",
			"size": 8385232
			}
		}
	  }, {
		"type": "VIDEO",
		"sources": {
			"h264": {
			"source": "common/mp4/opening_mission1.mp4",
			"size":   18781317
			}
		}
	  }, {

This method is based of the following example:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.