Added media api

fixed #3 issue.