9a0e422a6b
Depending on the encoder we want to use a different container format and therefore a different file extension. Right now this file extension is forced to be webm, so shuffle things around a bit to make that more dynamic. Note that this also introduces removing for the old file created by the recorder, otherwise it would create an empty "mp4" file every time it falls back from "mp4" to "webm". To be nice to external (ie. not gnome-shell) consumers of the screencastService, let's not break the API completely, and detect the ".webm" suffix a little longer to not end up with weird file.webm.webm filenames. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3211>