vendor/assets/javascripts/webshims/shims/mediaelement-debug.js in webshims-rails-1.14.5 vs vendor/assets/javascripts/webshims/shims/mediaelement-debug.js in webshims-rails-1.14.6
- old
+ new
@@ -470,11 +470,12 @@
var $element = $('<div />').css({width: 320, height: 120, float: 'left'});
var $media = $(document.createElement(infos.nodeName))
.attr({
src: src.src,
'data-type': container,
- 'controls': 'controls'
+ 'controls': 'controls',
+ preload: 'none'
})
;
var resolvePromise = function(){
$media.pause();
setTimeout(function(){
@@ -515,10 +516,12 @@
if(!src.decode[provider] || $.isEmptyObject(src.decode[provider])){
src.decode[provider] = {
duration: $media.prop('duration'),
height: $media.prop('videoHeight'),
width: $media.prop('videoWidth')
+ //todo at test for seekable
+ //,seekable: ($media.prop('seekable') || []).length
};
}
src.decode[provider].success = true;
} else {
src.decode[provider] = {
@@ -552,9 +555,14 @@
$media
.on('mediaerror loadedmetadata', resolve)
.appendTo($element)
;
+
+ if(provider == 'native'){
+ $media.on('error', resolve);
+ }
+
$element.appendTo($container);
timeoutTimer = setTimeout(resolve, 40000);
playTimer = setTimeout(function(){
$media.prop('muted', true);
$media.play();