Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-3391
in
a recent build.
-
Sencha User
Ext.Media "preload" configuration variable ignored
REQUIRED INFORMATION
Ext version tested:
Browser versions tested against:
- Safari 6
- Chrome 21.0.1180.89
DOCTYPE tested against:
Description:
- Setting the "preload" variable on a media element such as Video does not actually have any effect.
Steps to reproduce the problem:
- Create an Ext.Video
- Use "preload" config attribute (which defaults to "true")
- Note how nothing actually happens in the DOM with the preload attribute and the video will preload no matter what (default handling by browser)
The result that was expected:
- Setting preload to false should prevent preloading and add an attribute to video element 'preload="none"'
- Otherwise, preload should be 'preload="auto"' or just non-existant (this works because of default behavior)
The result that occurs instead:
- The preload attribute has no bearing on the DOM or the preloading of the video
Test Case:
Code:
Ext.create('Ext.Video', config:{preload: false, url: '<VIDEO URL HERE>'});
HELPFUL INFORMATION
Debugging already done:
- Preload just simply has no bearing on anything once set
Possible fix:
Code:
Ext.define('YourProject.Media', {
override: 'Ext.Media',
applyPreload: function(preload)
{
if (preload === true)
{
preload = 'auto';
}
else if (preload === false)
{
preload = 'none';
}
else if (Ext.isString(preload) == false)
{
preload = 'auto';
}
return preload;
},
updatePreload: function(newPreload, oldPreload)
{
var media = this.media,
dom = media.dom,
el = Ext.get(dom);
el.set({preload: newPreload});
}
});
-
Thanks for the report! I have opened a bug in our bug tracker.
-
Should make it into 2.1.0 b3. You can pass true or false but also the strings 'auto', 'metadata' and 'none'.
-
Sencha User
Did this make it into the 2.1.0 final release? I still see this bug on our site and looking at the Sencha source it seems nothing is done with the preload attribute.