Skip to content

Instantly share code, notes, and snippets.

@pa4080
Last active May 16, 2020 09:13
Show Gist options
  • Save pa4080/fedee0832b0528955be836c772d62105 to your computer and use it in GitHub Desktop.
Save pa4080/fedee0832b0528955be836c772d62105 to your computer and use it in GitHub Desktop.
Patch for MediaWiki Extension:TimedMediaHandler REL1_34 - allow the new Video Player for ALL users including anonymous
--- includes/TimedMediaHandlerHooks.php 2020-05-16 11:33:18.722588117 +0300
+++ includes/TimedMediaHandlerHooks.patch.php 11:32:52.290407251 +0300
@@ -592,7 +592,8 @@
) {
return 'videojs';
} else {
- return self::defaultPlayerMode();
+ return 'videojs';
+ //return self::defaultPlayerMode();
}
}
@pa4080
Copy link
Author

pa4080 commented May 16, 2020

This patch allows the usage of the new Video Player (provided as beta feature by Extension:TimedMediaHandler, on MW REL1_34) for ALL users including anonymous ones. Here is how to apply the patch:

cd $IP/extensions/TimedMediaHandler/includes      # $IP is the MediaWiki Document Root directory
sudo patch < <(sudo curl -s https://gist.githubusercontent.com/pa4080/fedee0832b0528955be836c772d62105/raw/3b3f9589dd3dc9835a4063319e476d613e812207/TimedMediaHandlerHooks.patch)

In order to revert the change before update use:

sudo patch -R < <(sudo curl -s https://gist.githubusercontent.com/pa4080/fedee0832b0528955be836c772d62105/raw/3b3f9589dd3dc9835a4063319e476d613e812207/TimedMediaHandlerHooks.patch)

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment