thanks to the suggestions below we have EmbedVideo working on MW version 1.3.1
Deprecated: Premature access to service container [Called from EmbedVideoHooks::onExtension in /var/www/mediawiki-1.36.1/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in /var/www/mediawiki-1.36.1/includes/debug/MWDebug.php on line 376
[Sat Jan 08 22:03:11.725945 2022] [php7:info] [pid ] [client ] PHP Deprecated: Premature access to service container [Called from EmbedVideoHooks::onExtension in ...mediawiki/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in ...mediawiki/includes/debug/MWDebug.php on line 375, referer: wiki/Special:SpecialPages
The git still seems to contain version from 2020-10-15 13.18. Let me know if you need more info.
My mistake, tested the wrong archive, the latest one from the git from 2022-01-08 does not produce the PHP Deprecated message under 1.37.1. Sorry and thanks.
No need to update the top post. Luck just had it I upgraded from 1.29-2 to 1.37.1 two days ago and downloaded extension version just before the fix. When I tested the fix I uploaded again the old version to production by mistake. People usually put the right files to the right places on second attempt.
On MediaWiki 1.35.2, I have error reporting on, and on every page that contains an embedded audio clip, there is an error message reading as such:
Notice: Undefined variable: class in /var/www/html/extensions/EmbedVideo/classes/media/AudioTransformOutput.php on line 102
Looking online, quite a few other wikis with EmbedAudio seem to be having error messages (if they have left the error reporting on), though, as with mine, functionality seems intact. Any ideas as to what's going on?
in file extensions\EmbedVideo\classes\media\AudioTransformOutput.php
before
if (!empty($options['img-class'])) {
The same error is in extensions\EmbedVideo\classes\media\VideoTransformOutput.php.
The reason is simple: the function returns the media class at the end of the file. If this class does not exist, the function does not create an empty class variable, but still tries to return it: D
Moreover, I think this line, at the end of the function in above files is not correct too:
This error was fixed in the merge request 139, but it is only in the branch master: for now no official version was issued containing this patch, so you have to apply yourself the patch or use Git to follow the master branch.
So according to the description, using "<youtube>..." should also work, but it doesn't anymore. Now stuck with thousands of inactive embeds. Do I have to manually enable that somewhere?
@OP: You sure your extension isn't broken/outdated or it's an issue with YT video you try to embed?
I use EmbedVideo on a 1.35.x MediaWiki with the 1.35 master extension files currently and the <youtube width=450px></youtube> embed code still work for me.
Mine went funky as well and can be viewed at www.liberty.wiki . Getting this error:
Deprecated: EmbedVideo's extension.json or skin.json does not have manifest_version, this is deprecated since MediaWiki 1.29 in /home2/liberwf9/public_html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service container [Called from ConfigFactory::getDefaultInstance in /home2/liberwf9/public_html/includes/config/ConfigFactory.php at line 52] in /home2/liberwf9/public_html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /home2/liberwf9/public_html/includes/MediaWikiServices.php at line 252] in /home2/liberwf9/public_html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /home2/liberwf9/public_html/includes/ServiceWiring.php at line 535] in /home2/liberwf9/public_html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'ConfigFactory' [Called from ConfigFactory::getDefaultInstance in /home2/liberwf9/public_html/includes/config/ConfigFactory.php at line 52] in /home2/liberwf9/public_html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /home2/liberwf9/public_html/includes/ServiceWiring.php at line 277] in /home2/liberwf9/public_html/includes/debug/MWDebug.php on line 376
what bugs me also is that their gitlab thing is dead as disco, i mean hardly any issues get answers at all... and that even though it has evolved into a quasi monopoly extension for this use case
C-SPAN has thousands of United States related videos. As of today, they are claiming 252,938,057 total video views of items in their Video Library. Would it be possible to add it as one of the Extension:EmbedVideo#Supported services?
Could it be that this extension to 1.36 is not yet running? I always have the following error:
Deprecated: Premature access to service container [Called from EmbedVideoHooks::onExtension in /var/www/html/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in /var/www/html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'HookContainer' [Called from MediaWiki\MediaWikiServices::getInstance in /var/www/html/includes/MediaWikiServices.php at line 252] in /var/www/html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'ObjectFactory' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/includes/ServiceWiring.php at line 535] in /var/www/html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'ConfigFactory' [Called from EmbedVideoHooks::onExtension in /var/www/html/extensions/EmbedVideo/EmbedVideo.hooks.php at line 77] in /var/www/html/includes/debug/MWDebug.php on line 376
Deprecated: Premature access to service 'BootstrapConfig' [Called from Wikimedia\Services\ServiceContainer::{closure} in /var/www/html/includes/ServiceWiring.php at line 277] in /var/www/html/includes/debug/MWDebug.php on line 376
The GitLab repo hasn't been updated since 8 months.
I've heard that after the gamepedia + fandom merge they are taking every extension in-house, so stuff like embed video won't be maintained anymore
@Octfx Fandom just activated EmbedVideo across all of Fandom today, so they're bound to continue maintaining this. With Fandom on 1.33, I wouldn't expect them to work on this extension until they start working on their next MW upgrade.
Honestly, these days I think I would recommend using Extension:Widgets instead of this extension, unless you really need some functionality that it has but that Ext:Widgets can't replicate.
Dinoguy100: does Extension:Widgets allow for playing local videos? I did not see that capability mentioned at Extension:Widgets . Perhaps there is another option?
we use EmbedVideo just for local iphone generate videos and not for youtube etc.
EmbedVideos works great for our users in MW ver 1.34 ..
I think for that you'd want to use Widget:Video, though I've never used it myself and can't offer any help with it. That being said, if Ext:EmbedVideo is working fine on your wiki and you have no strong reasons to migrate away from it, you should probably just keep using it for the present, and keep Ext:Widgets as a backup for if EmbedVideo stops working for you one day.
I agree with you. We have EV working on 1.34 and 1.36 now [ at the start of my questions I did not know about StarCitizenWiki's extension ].
So continued the thread to learn about possible options later on.
In any case we will be using 1.34 until the awful T212428 bug is fixed.
Again thank you for the help.
Due to GDPR, websites are required to use privacy enhanced embedding for YouTube videos. The extension currently doesn't seem able to parse the privacy enhanced urls which are hosted on a different urls (youtube-nocookie dot com/embed/[YouTubeVideoID]) instead https://www.youtube.com/watch?v=[YouTubeVideoID].
This is what the iframe embed code from YouTube looks like <iframe width="560" height="315" src="https://www.youtube-nocookie dot com/embed/[YouTubeVideoID]" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
(Please note: due to spam filter here I had to change .com to dot com in the URls)