{"action":"created","issue":{"url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/506","labels_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/506/labels{/name}","comments_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/506/comments","events_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/506/events","html_url":"https://github.com/katspaugh/wavesurfer.js/issues/506","id":102825482,"number":506,"title":"How do i get current duration to increase as i play","user":{"login":"interwap","id":8534089,"avatar_url":"https://avatars.githubusercontent.com/u/8534089?v=3","gravatar_id":"","url":"https://api.github.com/users/interwap","html_url":"https://github.com/interwap","followers_url":"https://api.github.com/users/interwap/followers","following_url":"https://api.github.com/users/interwap/following{/other_user}","gists_url":"https://api.github.com/users/interwap/gists{/gist_id}","starred_url":"https://api.github.com/users/interwap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interwap/subscriptions","organizations_url":"https://api.github.com/users/interwap/orgs","repos_url":"https://api.github.com/users/interwap/repos","events_url":"https://api.github.com/users/interwap/events{/privacy}","received_events_url":"https://api.github.com/users/interwap/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/katspaugh/wavesurfer.js/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-24T15:54:04Z","updated_at":"2015-08-25T12:26:47Z","closed_at":"2015-08-25T08:12:42Z","body":"Hi, ive been able to get the actual duration of the audio file, via this code\r\nfunction addZero(i) {\r\n\t\t\t\t\t  \t\r\n\t\t\t\t\t\t    if (i < 10) {\r\n\t\t\t\t\t\t        i = \"0\" + i;\r\n\t\t\t\t\t\t    }\r\n\t\t\t\t\t\t    return i;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Gets the duration of the music file from seconds to minutes\r\n\t\t\t\t\t\t//Elapsed and actual duration;\r\n\t\t\t\t\tfunction getduration(){\t\r\n\r\n\t\t\t\t\t  var duration = wavesurfer.getDuration();\r\n\t\t\t\t\t  var minutes = addZero(Math.floor(duration/60));\r\n\t\t\t\t\t  var seconds = addZero(Math.floor(duration - (minutes * 60)));\r\n\t\t\t\t\t  var durationplaceholder = document.getElementById('duration');\r\n\t\t\t\t\t  durationplaceholder.innerHTML = minutes + \":\" + seconds;\r\nMy dilemma is getting the current time to increase for 00:00 as i play using the getcurrentime function. it should also update as i drag the seekbar either left or right. Thank you"},"comment":{"url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/comments/134569733","html_url":"https://github.com/katspaugh/wavesurfer.js/issues/506#issuecomment-134569733","issue_url":"https://api.github.com/repos/katspaugh/wavesurfer.js/issues/506","id":134569733,"user":{"login":"interwap","id":8534089,"avatar_url":"https://avatars.githubusercontent.com/u/8534089?v=3","gravatar_id":"","url":"https://api.github.com/users/interwap","html_url":"https://github.com/interwap","followers_url":"https://api.github.com/users/interwap/followers","following_url":"https://api.github.com/users/interwap/following{/other_user}","gists_url":"https://api.github.com/users/interwap/gists{/gist_id}","starred_url":"https://api.github.com/users/interwap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interwap/subscriptions","organizations_url":"https://api.github.com/users/interwap/orgs","repos_url":"https://api.github.com/users/interwap/repos","events_url":"https://api.github.com/users/interwap/events{/privacy}","received_events_url":"https://api.github.com/users/interwap/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T12:26:47Z","updated_at":"2015-08-25T12:26:47Z","body":"Thank you katspaugh, worked like magic. The audioprocess was not in the readme file. If we could get a full list of update events and functions. That will come in handy too"}}