Update media API to use new callbacks and support other backends