This seems right: just perform the conversion in the browser and play the output in a <video> tag. The alternative would be to draw frame-by-frame in a canvas which would be very difficult.
I'm mostly guessing.
I wonder how heavy different encodings/formats will be to decode in JS. Haven't worked with video on that level of detail, but I imagine that there a plenty of optimizations that can be done in low-level languages to get solid performance that JS might not deliver.