I just created an EJS version for the same simulation.

VIEW or DOWNLOAD ejs xml source
then click to translate strings for selected locale.

Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop.

The speed of the electromagnetic wave depend on the Electric field E and magnetic field B.
For the same material, the ratio should be fixed.
If only one of them is changed, it mean wave traveling in different material (index of refraction is shown in the simulation).