How to understand "Preload"?

Hello,

There is a “Preload” setting in Hype:

and I know it is also from Html5, like:

<html>
<body>

<video controls="controls" preload="auto">
  <source src="/i/movie.ogg" type="video/ogg" />
  <source src="/i/movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

</body>
</html>

But it is still confused, there might be two meanings:

1# Only after the media is loaded, the scene or page will be show up.
2# After the scene or page were loaded, the media will be initially preloaded.

Which one is right please?

Alternatively, the question might be:
“The preload in Hype is same with the one in Html5”?

Anyone would like to discuss?

Alex

Can I suggest you read the documentation

Controlling Preloading#

By default, Tumult Hype documents preload all image resources before beginning any animation. This is done to ensure viewers always see the document as it appears in Tumult Hype, with no missing images. This behavior can be disabled on a per-image basis by first choosing an image from the resource list and then deselecting the Preload checkbox. Videos are not preloaded so there is no control for this behavior. To turn off preloading for multiple images, select the ‘images’ filter at the top of the resources library, and select the first image, hold shift, and click the last image. You may then uncheck ‘preload’ at the bottom of the resource library.

Note that video files do not have this option in Hype. They are not preloaded by hype.

1 Like

The documentation needs to be amended to include audio, as Hype will attempt to preload audio as well. Hype has three different playback methods (automatically chosen based on browser/environment) that preload differently:

  1. Web Audio: will download the entire file first
  2. HTML5 <audio> tag: will wait for the canplaythrough event
  3. Quicktime Plugin: does not attempt to preload

Hype does nothing for video. I think we did some testing a while ago and found that canplaythrough for video was an unreliable metric due for a real “preload” to be considered and flakey network conditions coupled with large video sizes could hold up showing the Hype document to the point of users effectively never seeing it.

Thanks @jonathan @MarkHunte

If so, that means the scene will start only after the image/audio is loaded, right?

Actually, I think it is just ok if the video is not preloaded, Otherwise, the preload setting on medias will caused serious delay, since the webpage will be shown up only after the video is loaded.

I am just trying to improve the speed, the similar concern is about “autobuffer”, does it will cause delay?
To achieve fast speed, what is your suggestion upon “autobuffer” setting please?

Thanks.

To be more accurate, the document will not start, including showing the first scene. This is why Preload is an option in the Resource Library.

I assume you are referring to the attribute for the HTML5 <video> tag? Autobuffer is a deprecated form of preload. I don't think you need it unless you care about really old versions of browsers, but you may want to research it more. Hype doesn't use it (and I never have).

So if you have a lot of small-ish audio files - I’ve got 25 - then the smoothest solution would be to uncheck preload audio on most or all of them. Would you agree ? I’m going to try it. Preloading all of them causes some problems - crashing browsers - erratic performance.

Personally, I suggest that you uncheck all of those audio if those audio does not auto play upon scene loaded.

But if you want audio auto play upon page loaded, I suggest that only allow one audio loop play, and set other audio play upon click “play” button.

“Preload” is specifically mean the scene will begin to show up and the animation will begin to play Only after the images and medias loaded in browser from your server. This is specifically useful for animations that you want to show the users exactly from the stat to end of timeline.

1 Like

Thanks Alex - really appreciate your reply.
I am going to try it with all unchecked and see how it performs.

Perfect! I switched off preload on all the audio except one short clip with an animation - and hey presto everything works. Thanks Alex. Sometimes it’s easy to overlook the obvious.

1 Like