During review @Tgr pointed out that two functions might be better served in different ways:
https://gerrit.wikimedia.org/r/#/c/187735/12/MultimediaViewerHooks.php
I think that @Tgr is probably right, but implementor should check if there are any objections before going about making this change.