var MediaPlayer = (function (document, clearTimeout, screen, localStorage, _V_, $, setInterval) { var testableAudioElement = document.createElement('audio'); var testableVideoElement = document.createElement('video'); var currentMediaElement; var currentProgressInterval; function playAudio(items, params) { var item = items[0]; var baseParams = { audioChannels: 2, audioBitrate: 128000 }; $.extend(baseParams, params); var mp3Url = ApiClient.getUrl('Audio/' + item.Id + '/stream.mp3', $.extend({}, baseParams, { audioCodec: 'mp3' })); var aacUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.aac', $.extend({}, baseParams, { audioCodec: 'aac' })); var webmUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.webm', $.extend({}, baseParams, { audioCodec: 'Vorbis' })); /* ffmpeg always says the ogg stream is corrupt after conversion var oggUrl = ApiClient.getUrl('Audio/' + item.Id + '/stream.oga', $.extend({}, baseParams, { audioCodec: 'Vorbis' })); */ var html = ''; html += '