When the user installs a missing gstreamer codec,
This TBH might be more work than is worth the effort. It's required to run the plugin scanner in a child of the UI process, for one. Also, any approach that doesn't involve restarting the web process will require changes in gstreamer.
For discussion of this issue, see:
When the user installs a missing gstreamer codec, it should then be possible to play the media with the codec. Currently this should work fine (sans the current crasher bugs ;), but seccomp filters will break this.