Media Access Point (MAP) Player Client - JavaScript code for clients (web and PhoneGap)