Modify mediamanger.js to support new type of media handler