Hi, I’m a bit confused about what the preload checkbox actually does…
If I have a video asset that is set to preload, I presume it gets downloaded in the initial download…BUT, if I have it NOT set to preload, at what point will it be downloaded…when the video plays?
Does not having the preload checkbox ticked actually prevent the download from the server files when the page initially runs?
Just to add to the above, the way we typically use videos in projects is a special case since it’s being used in a HTML DOM element.
Preload should be unticked and the video DOM element will handle the streaming (if it’s encoded correctly) bit by bit for you. You don’t have to use the assets.load function in this special case
Ok. So according t the developer manual if untick my video asset wont download at start, but instead will start downloading as soon as the entity that references it becomes active.?
In my case its a button entity with the following attribute:
PlayVideoButton_Div.attributes.add(‘video’, { type: ‘asset’});
Just to clarify, the video should start to download as soon as the button entity becomes active?
Yes, or you can manually load the asset before it is used which is recommended otherwise you can get a pop of models/textures/etc appearing in the world.
PlayVideoButton_Div.prototype.initialize = function() {
// Create the video DOM
var video = document.createElement('video');
var videoContainer = document.createElement('div');
videoContainer.appendChild(video);
...
So does this mean the video will start loading in as soon as this entity is initialized ?