
// http://www.chipwreck.de/blog/2010/03/02/html-5-video-mootools/

Element.NativeEvents = $merge(Element.NativeEvents, {
    loadstart: 2,
    progress: 2,
    suspend: 2,
    abort: 2,
    error: 2,
    emptied: 2,
    stalled: 2,
    play: 2,
    pause: 2,
    loadedmetadata: 2,
    loadeddata: 2,
    waiting: 2,
    playing: 2,
    canplay: 2,
    canplaythrough: 2,
    seeking: 2,
    seeked: 2,
    timeupdate: 2,
    ended: 2,
    ratechange: 2,
    durationchange: 2,
    volumechange: 2
});


var media_properties = [
    'ended',
    'autoplay',
    'controls',
    'duration',
    'paused',
    'videoWidth',
    'videoHeight',
    'readyState',
    'autobuffer',
    'error',
    'networkState',
    'currentTime',
    'seeking',
    'loop',
    'volume',
    'muted',
    'startTime',
    'buffered',
    'defaultPlaybackRate',
    'playbackRate',
    'played',
    'seekable'
];

media_properties.each(function(prop){
    Element.Properties.set(prop, {
        set: function(value){
            this[prop] = value;
        },
        get: function(){
            return this[prop];
        }
    })
});


