src: moved media handling to new class