How to understand "Preload"?


(Alex) #1

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


(Mark Hunte) #2

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.


(Jonathan Deutsch) #3

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.


(Alex) #4

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.


(Jonathan Deutsch) #5

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).