You shouldn't have to define these here.  In Aurora, MediaError.MEDIA_ERR_ABORTED is defined.  Maybe it isn't in b2g18?  If not, I'd just use the constants in the switch statement and add a comment // MediaError.MEDIA_ERR_* after each one.