Extension talk:EmbedVideo/Archive

Latest comment: 6 years ago by Loizbec in topic Subtitles

Tencent QQ video support

edit

Is it easy to support qq video as it is one of most popular video website in china ?

Why is there no support for Facebook Video

edit

Just wondering why there's no support for Facebook Video. It's one of the most used video platforms globally I'm sure.

Adding support for local video

edit

Got it installed, and most things work great. YouTube redirects play on IOS 4.x (tested iPhone/iPad). Tested with Andriod 2.1, youtube/google video work, but not dailymotion and techertube don't work on anything but a PC/Mac browser. (i believe these are limitations of the device). Great on adding captions. Also MP3 works as well on IOS/Andriod. IMHO, this is better than Extension:MediawikiPlayer This works a lot better.

I'm trying to find "an all in one" which this is heading towards, and i'm needing the ability to do upload a F4V/SWF (Flash) video, or direct link, to my local server and be able to play. Thanks

Based on a previous post, was able to utilize the following to use both EmbedVideo and MediawikiPlayer to "merge" what I was trying to do.
I just added this to the EmbedVideoServices.php at the very end.
       'local' => array(
        'id_pattern'=>'[^A-Za-z0-9\\-.=]%',
        'url'=>'http://domain.com/mywikipedia/extensions/MediawikiPlayer/player.swf?file=$1'
     )
);
But if done, any video that uses {{#ev:file.ext}} loses the ability for specified video to do full screen, and the GUI (because it using MediawikiPlayer) is ugly. It does gain the ability due to the hack image aspect to add text/frame to the video and left/right alignment.
So to clarify "Feature Request" is 1) ability to do local video 2) MOV/MP4 support

Embedding YouTube play lists

edit

Add the youtubeplaylist type ...

   'youtubeplaylist' => array(
       'extern' =>
           '<iframe src="http://www.youtube.com/embed/videoseries?list=$2&modestbranding=1" ' .
               'width="$3" height="$4" ' .
               'frameborder="0" allowfullscreen="true"></iframe>',
       'default_ratio' => 16/9
   ),

to handle YouTube play lists using the new iframe embedding technique

adjustable height?

edit

Is it possible to adjust the height of the video? :-) --Ymmotrojam 20:28, 2 September 2007 (UTC)Reply

Heights are purposefully kept proportional to the widths. To affect the height, just adjust the width to whatever you want and the height will be calculated to keep the proper aspect ratio. --Jimbojw 16:02, 5 September 2007 (UTC)

GodTube?

edit

How would I go about adding GodTube to this? --12.219.103.195 17:57, 16 September 2007 (UTC)Reply

Cant get it to work

edit

Doesnt work for me im usnig 1.10.0 and followed all the directions. Linuxfan 21:40, 28 September 2007 (UTC) please email me at linuxfan@linuxfolk.com if you can help me get this working :DReply

Same here

edit

Putting wfLoadExtension('EmbedVideo'); anywhere in my LocalSettings.php file throws an "HTTP ERROR 500", page doesn't load.

Created an EmbedVideo folder in extensions folder. Added the following code at the bottom of my LocalSettings.php: wfLoadExtension( 'EmbedVideo' );

Nope.

Solution

Rename the addon folder in extension folder to "EmbedVideo" (case sensitive). No idea why developer left such a mistake, never seen any addon to do that.

It says this right in the instructions: Download and place the file(s) in a directory called EmbedVideo in your extensions/ folder.. -- Prod (talk) 18:41, 20 April 2018 (UTC)Reply

Changed code to add another site.

edit

I have changed my copy of EmbedVideo.php to allow me to embed videos hosted on the Brillyunt site.

When viewing the site it now shows the code required below any videos that are suitable for embedding using this extension.

Deliberately not showing a link to my site in here as my intention is not to Spam, but to suggest that you may want to add the code below to the next version of your extension.


The extra code has been added near the end of the file:

    'youtube' => array(
        'url'=>'http://www.youtube.com/v/$1'
    ),
    'brillyunt' => array(
    	'id_pattern'=>'%[^A-Za-z0-9_\\/-]%',
    	'url' => 
            'http://brillyunt.com/wimpy_wasp/wasp.swf"'.
            ' flashvars="theFile=http://www.brillyunt.com$1.flv'.
            '&defaultImage=http://brillyunt.com/wimpy_wasp/paused_old.jpg&startPlayingOnload=no&bufferSeconds=5&videoSmoothing=yes"'
    )
);


MP4 Video local playback

edit

steps to go from a video made with a samsung L200 camera to display in a Mediawiki. Samsung encodes videos following

  • container: avi
  • video: MPEG-4 ASP, xvid
  • audio: msadpcm

Step 1 convert video

edit

Convert Video to

  • container: mp4
  • video: MPEG-4 AVC, H264
  • audio: AAC

with avidemux

Step 2 upload JW Player

edit

take player.swf from http://www.jeroenwijering.com/ and put it into wiki/images of your own site

Step 3 Install EmbedVideo.php

edit

Install EmbedVideo.php and add at the end of file in the section of # Build services list

),
'local' => array(
   'id_pattern'=>'[^A-Za-z0-9\\-.=]%',
   'url'=>'http://www.yourdomain.org/wiki/images/player.swf?file=$1'
)

Step 4 adjust wiki to be able to upload mp4 extensions

edit

Step 5 adjust php to allow uploads of a big size

edit

Step 6 Upload and insert code

edit

Upload file and insert the code

{{#ev:local|test.mp4}}
or
{{#ev:local|test.mp4|200}}
I get the error below. Can anyone help? --PhotographerTom (talk) 15:37, 12 December 2014 (UTC)Reply
EmbedVideo does not recognize the video service "local".

FireFox?

edit

I have it working on Safari fine - no issues, but when I pull up the site in Firefox, is shows a grey box, with YouTube labels, and a spinning circle - as if it is trying to load the video image, but it never loads.

Casey See my site

seems to be working now...

Autoplay

edit

Is there a way to get a video to start when the page is displayed?

Casey See my site

^ NOT WORKING!

stage6 option?

edit

Is stage6 an option going to be included for embedding as well?

The-Client 23:05, 11 January 2008 (UTC)Reply

it works:-)

edit

thanks for this great extension 84.189.78.252 00:01, 28 February 2008 (UTC)Reply

Vimeo

edit

I found this here: http://www.vimeo.com/forums/topic:2933

'vimeo' => array(
'url'=>'http://www.vimeo.com/moogaloop.swf?clip_id=$1&http://server=www.vimeo.com&fullscreen=1&show_title=1&show_byline=1&show_portrait=0&color="'
)

cant publish google video

edit

i know just to play youtube video. can anyone explain me how?

added blip.tv support

edit

I haven't tested this thoroughly, but it works for me. Add the following entry to $wgEmbedVideoServiceList

    'bliptv' => array(
        'url'=>'http://blip.tv/scripts/flash/showplayer.swf?file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F$1'
    )

Usage:

 {{#ev:bliptv|876363}}

The trick is that the id is not the number in the url from the blip.tv site (in the format http://blip.tv/file/869192/). You must dig it out of the embed tag of the legacy player embed code.

Doesn't work with WM v1.9.3/PHP5.2.5 / Mysql 5.0.51a

edit

Just getting a blank screen when adding code to LocalSettings.php.

If i add the code in localsettings.php higher up in the file, i'll get some garbage output in the header of the wiki page. If I place it near the end of the localsettings file, i get no page at all.

Thanks


Enabling full screen mode

edit

As I wanted to enable fullscreen view with Dailymotion, GoogleVideo and Youtube videos for my website Wiki4Games.com, I slighlty modified the EmbedVideo extension. So if anyone is interested, here is the necessary modifications:

You may find an example here.
Thanks Jimbo for your extension :-)
Franck Dernoncourt 14:02, 5 September 2008 (UTC)Reply

This would be a great feature to have in the release version as well. Maybe a parameter fullscreen would be great for this. --Pintman 09:45, 29 August 2011 (UTC)Reply

Edit Button

edit

This Extension works realy great in my Wiki. Such great as I tryed to creat an custom Edit Button for it like this: Manual:Custom edit buttons

mwCustomEditButtons[mwCustomEditButtons.length] = {
"imageFile": "http://localhost/wiki/images/Button_YouTube.png",
"speedTip": "YouTube Video",
"tagOpen": "{{#ev:youtube|",
"tagClose": "}}",
"sampleText": "id|witdh"}

Doesn't work because - I think - "}}" is not able in JavaScript. Any idea how to get an Edit Button? --Mwuser 08:42, 25 September 2008 (UTC)Reply

Adding support for higher resolution feeds from youtube

edit

Youtube can now deliver 480x360. You can add '&fmt=18' to the end of any youtube url to force the higher-res delivery. In order for this to work in embedded code, you have to add '&ap=%2526fmt%3D18' to the end of the urls and fix the width/height ratio. You can modify the EmbedVideo Extension with the following changes to add high-res support for your embedded youtube videos in Mediawiki.

$ratio = 480 / 397;
$width = 480;

...

'url'=>'http://www.youtube.com/v/$1&ap=%2526fmt%3D18'

AlexanderPico 02:51, 14 October 2008 (UTC)Reply

Access Controls?

edit

Is there any way to restrict the addition of embedded video to only Sysops (or some other group)? I tried adding the usual $wgGroupPermissions entries in my LocalSettings.php, but they don't seem to have any effect. I'll continue to dig and post what I find...

Modded version of this extension

edit

Slightly modded version of this extension is avaliable at http://traditio.ru/wiki/EmbedVideo

Rough changelog:

  • Switching to fullscreen is enabled for both YouTube and Google Video
  • YouTube HD video (480×295 player, 16:9 video) and traditional players (425×344 player, 4:3 video) are both supported via different EmbedVideo codewords
  • Russian localisation:
    • RuTube is supported
    • Support for non-Russian video players (other than globally popular YouTube and Google Video) is dropped:
      • Dailymotion
      • FunnyOrDie
      • sevenload
      • Revver
Note: you may still add them back in your LocalSettings, if you wish
  • Added support for some audio providers:
    • muzicons
    • imeem
    • Box.Net/lite
  • Better ratio calculation, taking the fixed video controls height (27px in Google Video, 25px in YouTube) into account, so that only the rest of the video player space matters

Valid XHTML

edit

You can modify the code to produce valid XHTML by replacing

 
           '<object width="$2" height="$3">'.
            '<param name="movie" value="$1"></param>'.
            '<param name="wmode" value="transparent"></param>'.
            '<embed src="$1" type="application/x-shockwave-flash" '.
            'wmode="transparent" width="$2" height="$3">'.
            '</embed></object>'

with

        	'<object type="application/x-shockwave-flash" width="$2" height="$3" data="$1">'.
		'<param name="movie" value="$1"></param>'.
		'<param name="wmode" value="transparent"></param></object>'

(Based on http://mike.brisgeek.com/2006/11/02/valid-xhtml-to-embed-a-youtube-video/)

adding Xfire embed support to EmbedVideo.php

edit

Hey Jimbo,

We from Wiki4games.com have tried to add xfire video embed to the EmbedVideo.php, with success but there is still a problem resisting, the displaying the instance name of the video at the first frame before clicking at the video player.

So my question would be, how can we add it to the player, or should it be extrally written into the {{#ev:xfire|instance}} an extra parameter? or is it not possible to do it?

would be happy for a reply, Viraba

Extension broken on mediawiki trunk (revision 51688)

edit

This extension no longer works for more recent versions of MediaWiki. Not too surprising - a lot of the code looks kludgy. --Alterego 04:52, 11 June 2009 (UTC)Reply

Confirm - does _not_ work on 1.16b3. Shows only "<embedvideo-embed-clause>" string. Sauron 10:28, 23 June 2010 (UTC)Reply

$wgEmbedVideoServiceList: sevenload

edit

Because videos from sevenload could not be embedded, I changed the referring array (starts line 198):

    'sevenload' => array(
 ## adjustment 03.07.2009
 ## videos from Sevenload could not be embedded
 #        'url' => 'http://page.sevenload.com/swf/en_GB/player.swf?id=$1'
        'url' => 'http://sevenload.com/pl/$1/300x258/swf'
    ),

--ThT 05:44, 3 July 2009 (UTC)Reply

$wgEmbedVideoServiceList: slideshare

edit

For the embedding of presentations from Slideshare ([1]) without using Extension:SlideShare I just added the referring array:

## adjustment 30.10.2009
## slideshare
    'slideshare' => array(
        'url' => 'http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=$1'
    ),

--ThT 17:21, 30 October 2009 (UTC)Reply

Not working for me

edit

I don't seem to be able to get it to work either using 1.10 still. It just displays the text as though EmbedVideo was not installed. I checked the pathnames were good and the permissions for the files too. My site is http://www.lightwiki.com and I'm BeeVee on there. Thanks for any help!

Hi. Not working for me too but was working with MW 1.15.3... I looked at the code and RELEASE NOTES and found that Extension:EmbedVideo use "wgMessageCache->addMessage()" that is deprecated and did not work any more with MediaWiki 1.16.0... Have to understand how to manage these messages with 1.16 ?? 110.164.168.179 16:20, 12 August 2010 (UTC)Reply

Problem with PHP 5.1.6

edit

To make it work for me on a Linux system with PHP 5.1.6, I had to change these lines (18 and 19 in EmbedVideo.hooks.php), as follows:

BEFORE:
        EmbedVideo::addMagicWord($prefix, "ev", "EmbedVideo::parserFunction_ev");
        EmbedVideo::addMagicWord($prefix, "evp", "EmbedVideo::parserFunction_evp");
AFTER:
        EmbedVideo::addMagicWord($prefix, "ev", array("EmbedVideo","parserFunction_ev"));
        EmbedVideo::addMagicWord($prefix, "evp", array("EmbedVideo","parserFunction_evp"));

--Ejcaputo 16:42, 3 August 2010 (UTC)Reply

This fixed my v1.16 running PHP 5.1.6 as well. --173.11.163.197 16:49, 5 October 2010 (UTC)Reply
This is how the code used to look, I think, and we changed it because of some other bug. It may be something different in the way different PHP versions handle this code. I'll do some tests to see how it's working in different environments. --Whiteknight 17:14, 22 October 2010 (UTC)Reply

To enable full screen mode in version 1.0

edit

Just modify the EmbedVideo.hooks.php file :

  • line 130 from :
           " wmode=\"transparent\" width=\"{$width}\" height=\"{$height}\">" .
to :
           " wmode=\"transparent\" allowfullscreen=\"true\" width=\"{$width}\" height=\"{$height}\">" .
  • line 158 from :
           " wmode=\"transparent\" width=\"{$width}\" height=\"{$height}\"></embed>" .
to :
           " wmode=\"transparent\" allowfullscreen=\"true\" width=\"{$width}\" height=\"{$height}\"></embed>" .

--Dieudo 18:47, 6 September 2010 (UTC)Reply

Undefined index

edit

A YouTube entry produces the following error message:

Notice: Undefined index: extern in .../EmbedVideo.hooks.php on line 105.

The display looks alright, though. I use MediaWiki 1.16. --Even Thorbergsen 19:40, 26 September 2010 (UTC)Reply

Any update on this issue? (06 October 2010)

It throws the same error to me, I'm using MediWiki 1.16 too, and the video looks fine. I will investigate and if I find anything I'll let you know.Fladei 10:21, 22 October 2010 (UTC)Reply

This issue has been fixed in the git repo master, I believe. There hasn't been a release yet with this fix in place, and the newest versions have not yet been uploaded to the mediawiki SVN repo. --Whiteknight 17:12, 22 October 2010 (UTC)Reply
Thank you very much. I'll keep waiting for the new version. Cheers Fladei 12:50, 25 October 2010 (UTC)Reply

Here is what i did to fix this error. Go to EmbedVideo.hooks.php and replace these two lines

$clause = $entry['extern'];
if (isset($clause)) {

with these lines

//$clause = $entry['extern'];
if (isset($entry['extern'])) {

Not sure if this is the right way, but it works so far for me.

NicoVideo support

edit

It would be nice if you added support for NicoVideo. Here is the code I recently added and tested:

    'nicovideo' => array(
        'extern' => '<script type="text/javascript" src="http://ext.nicovideo.jp/thumb_watch/$2?w=$3&h=$4&njm=1" charset="utf-8"></script>',
        'default_width' => 490,
        'default_ratio' => 490/387,
    ),

75.71.202.125 01:50, 18 December 2010 (UTC)Reply

de.sevenload.com

edit

Sevenload works with locale Subdomains for various countries (e.g. "de" for germany). Maybe is this the problem why it's actually not possible to embed sevenload-videos ? The question is: How to solve this problem? --hollosch 16:23, 7 February 2011 (UTC)Reply

extension broken with IIS

edit

This extension breaks my site. It previously worked for me with MW 1.6.10+PHP 5.2.17+IIS.

Since upgrading to MW 1.16.5 the extension breaks the entire site. When I access it through Firefox I get "The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.". On explorer nothing loads at all.

I should mention that on my local development version with MW 1.16.5+ Apache2.2+PHP 5.2.10 it works! very strange. Any idea what could be wrong? Thank you 85.250.162.123 13:28, 19 August 2011 (UTC)Reply

That PHP error message usually means you have an unwanted character before the <?php in one of your PHP files. Maiden taiwan 19:14, 21 December 2011 (UTC)Reply

Stats about embedded videos?

edit

Have anyone an idea, how to get stats about embedded videos? (how many videos are embedded from which site) Thanx :-) --Houyadda 13:50, 2 November 2011 (UTC)Reply

Questions about Security Risk and Compatibility

edit

Hello:

Has the vulnerability to cross-site scripting attacks been fixed? If so, where do I download the fixed version of the extension?

Is the latest (fixed) version compatible with MediaWiki 1.18.x?

Thanks for your help!

Patricia Barden 19:24, 10 January 2012 (UTC)Reply

The align parameter is not validated, so this extension is still vulnerable to cross site scripting. -- Andreas Jonsson (talk) 10:16, 13 October 2012 (UTC)Reply
The validation of the align parameter have been fixed, so this is no longer an issue. --Andreas Jonsson (talk) 08:48, 20 February 2013 (UTC)Reply

It works great! But how can I remove some tags?

edit

Well I have some video from youtube and insert it like it is given in the example:

{{#ev:youtube|dMH0bHeiRNg|600|center|This is an embedded video!}}

But in HTML it looks like

<p><br />
<iframe src="http://www.youtube.com/embed/dMH0bHeiRNg?showsearch=0... allowfullscreen="true"></iframe>
</p>

How can I remove this tags:

<p><br />

I looked through all php files and could not find this tags!

HD YouTube not selecting 720/1080p by default

edit

Even thought the code already has hd=1 added, the videos only start in 360p. Using the hd=1 tag on YouTube directly will work, just not for embeded videos. Are there any workarounds available?

Instead of using &hd=1, I used &vq=hd720 and it worked.

HTTPS support with embedded youtube

edit

Noticed that when browsing a page using HTTPS, any embedded videos, at least from Youtube, only display as a blank grey box. The videos work great when viewing the page over HTTP, but not HTTPS. Youtube supports HTTPS, is there a way to make these embedded videos work when viewed over HTTPS?

It would be nice if there was a parameter that could be set to force https (our wiki can only be viewed via https, and so this extension always triggeres a warning in IE about trying to view a secure page that contains non-secure content. --205.254.147.8 17:52, 3 October 2013 (UTC)Reply
It's pretty easy : simply modify EmbedVideo.Services.php to replace frame src "http://" by "https://" in youtube* php array.
rémi
I had the devs at userbase.kde.org make the change suggested by remi on that wiki and it did fix the problem.--Ttguy (talk) 22:20, 13 August 2014 (UTC)Reply
This might be fixed when https://github.com/Whiteknight/mediawiki-embedvideo/pull/39 gets into the production stream--Ttguy (talk) 22:40, 13 August 2014 (UTC)Reply

Widescreen

edit

I have a video on the frontpage of my wiki and I'd like to make it fit widescreen - right now it has black bars on the top and bottom. Is there a parameter I can use? --Varkman (talk) 22:46, 22 June 2013 (UTC)Reply

Visual Editor EmbedVideo Button

edit

A hack to put this funtion into the new visual editor would be a great idea.

yes it would - we'd love this --Tansaku

Not working 100% with MediaWiki 1.21.2 / Windows IIS & Php 5.5.3

edit

If you put {{#ev:youtube|dMH0bHeiRNg|200}} it will work

if you put {{#ev:youtube|dMH0bHeiRNg|200|right|This is an embedded video!}} you get a blank page. Extended fuctions seem broken

For me, {{#ev:youtube|oOtjnpOL16I}} does not work at all with 1.21.2 / PHP 5.3.10 / MySQL 5.5.32
Same for me, IIS7.5, MediaWiki, 1.22.0, PHP 5.4.9--Icerat (talk) 01:04, 15 December 2013 (UTC)Reply
fixed by redownloading from github. Despite the files reporting both version 1.0 they have changed. --Icerat (talk) 01:14, 15 December 2013 (UTC)Reply

Not showing anything (blank) with Mediawiki 1.22.0 / LAMP

edit

{{#ev:youtube|ID}} keeps blank.

  • Ubuntu 12.04 LTS
  • Mediawiki 1.22.0

--

This is the same issue I am finding on the userbase.kde.org site. Not sure what version of media wiki they are running.

Ttguy (talk) 14:16, 12 August 2014 (UTC)Reply

I have discovered that - in the case of the userbase.kde.org site - this is caused by the site now delivering https (secure http) instead of http. The embeded youtube content is comming in in http and so firefox blocks it as the page is then a mixed content page. The workaround is to allow mixed content on the page. However, a better solution would be to deliver the embedded content as https. I believe youtube by default now does deliver https content at least when you browse directly to content.

--Ttguy (talk) 21:51, 12 August 2014 (UTC)Reply

The embed extension delivers up this html (note http)

<iframe src="http://www.youtube.com/embed/rRg_i5C8_Hc?showsearch=0&modestbranding=1" width="425" height="319" frameborder="0" allowfullscreen="true"></iframe>

but it should be should be (note https)

<iframe src="https://www.youtube.com/embed/rRg_i5C8_Hc?showsearch=0&modestbranding=1" width="425" height="319" frameborder="0" allowfullscreen="true"></iframe>

--Ttguy (talk) 21:59, 12 August 2014 (UTC)Reply

raised bug 69454 on this. But I note from this page that this extension is not being maintained. Which sucks.

--Ttguy (talk) 02:43, 13 August 2014 (UTC)Reply

I just noticed a report on this page that is a duplicate of my issue - 38 HTTPS support with embedded youtube. And in there someone has offered a solution.

--Ttguy (talk) 03:19, 13 August 2014 (UTC)Reply

There is a new version out now that uses protocol relative URLs were possible.(Some services do not support HTTPS, such as Twitch.) Enjoy! Alexia E. Smith (talk) 00:14, 5 September 2014 (UTC)Reply

Wikitext/markup in description

edit

I'd like to put wikitext ([[links]], mostly) inside the description, but it is not parsed, and is just outputted as if embedded in nowiki-tags.

Fullscreen Vimeo

edit

I have not been able to allow fullscreen mode for Vimeo movies.

This is what I tried: I edited EmbedVideo.Services.php and changed fullscreen=0 to fullscreen=1 under the vimeo entry of the array.

I also made the videos a little wider than the default, otherwise the vimeo player ommits the fullscreen button despite the fullscreen=1 inline parameter. Setting a 600px width, for instance, shows the fullscreen icon, but clicking on it has no effect at all.

Any thoughts?? Rbirmann (talk) 16:05, 22 May 2014 (UTC)Reply

UPDATE: FIXED:

I added this entry to EmbedVideo.Services.php and it worked like a charm:

'vimeo2' => array(
		'extern' =>
			'<iframe src="//player.vimeo.com/video/$2" ' .
				'width="$3" height="$4" ' .
				'frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>',
	)

Notice the "vimeo2" key, so now I use {{#ev:vimeo2|VIDEOID}} instead of {{#ev:vimeo|VIDEOID}} on my wiki.

Hopefully this will be incorporated in the extension, since the embed code being used thus far is deprecated (see: http://developer.vimeo.com/player/embedding for details)

Rbirmann (talk) 23:39, 27 May 2014 (UTC)Reply

There is a new version out with an updated Vimeo embed code. Alexia E. Smith (talk) 00:12, 5 September 2014 (UTC)Reply
I'm having problems with full screen (I use Youtube) I have lost the fullscreen ability, how do I fix the code to get fullscreen options back ? it can be checked here. Mlpearc (open channel) 04:01, 22 November 2015 (UTC)Reply

Width in % instead of px ?

edit

By default, the width are in pixels and its is not possible to enter a percentage. Do you have any idea how we can fix this ?

I modify the terms "px" by "%" in the EmbedVideo.hooks-2.php file... but it doesn't work.

Thanks

This is due to the iframes and objects only taking width and height in pixels. Alexia E. Smith (talk) 00:12, 5 September 2014 (UTC)Reply

Not working

edit

I followed all the instructions and am unable to get the site to load let alone load video. Can someone help?

Taking over as maintainer

edit

The previous maintainer of this extension has not responded to inquiries or pull requests for two years. I have updated the extension, documentation, and will be actively maintaining this extension. Alexia E. Smith (talk) 21:46, 4 September 2014 (UTC)Reply

Thank you! --PhotographerTom (talk) 13:48, 28 October 2014 (UTC)Reply

Gorizontal align

edit

Cannot place some videos in one row. As temporary solution founded:

<div style="display: -webkit-flex; -webkit-flex-direction: row; display: flex; flex-direction: row;">
{{#ev:youtube|https://...||||frame}}
{{#ev:youtube|https://...||||frame}}
</div>

but it is terrible and needs to produce all group of video. Like the way to format with tables.. Is anyone knows more beautiful solution??

Maybe this…
<div style="display: block; white-space:nowrap; overflow:auto;"><!--
  --><div style="display: inline-block; vertical-align:top; margin-right:4px;">{{#ev:youtube|-ASGr4qeXrM|330x240}}</div><!--
  --><div style="display: inline-block; vertical-align:top; margin-right:4px;">{{#ev:youtube|-ASGr4qeXrM|330x240}}</div><!--
  --><div style="display: inline-block; vertical-align:top; margin-right:4px;">{{#ev:youtube|-ASGr4qeXrM|330x240}}</div><!--
  --><div style="display: inline-block; vertical-align:top;">{{#ev:youtube|-ASGr4qeXrM|330x240}}</div><!--
--></div>
the HTML comments avoid spaces between DIVs
Here’s an example. Messerjokke79 (talk) 10:28, 13 November 2014 (UTC)Reply

de.json

edit

hi there, I translated the en.json into german, so here’s the result for

de.json

{
	"@metadata": {
		"authors": []
	},
	"embedvideo_description": "Fügt eine Parserfunktion hinzu, mittels derer Videos populärer Dienste eingebettet werden können.",
	"error_embedvideo_missingparams": "EmbedVideo fehlt ein anzugebender Parameter.",
	"error_embedvideo_service": "EmbedVideo erkennt den Videodienst „$1“ nicht.",
	"error_embedvideo_id": "EmbedVideo erhielt die unbrauchbare ID „$2“ für „$1“.",
	"error_embedvideo_width": "EmbedVideo erhielt den unbrauchbaren width-Parameter „$1“.",
	"error_embedvideo_height": "EmbedVideo erhielt den unbrauchbaren height-Parameter „$1“.",
	"error_embedvideo_alignment": "EmbedVideo erhielt den unbrauchbaren alignment-Parameter „$1“; gültig sind „left“, „center“, „right“ und „none“.",
	"error_embedvideo_urlargs": "EmbedVideo erhielt eine Liste von URL-Argumenten, die unbrauchbare Daten oder leere Argumente aufwiesen.",
	"error_embedvideo_unknown": "EmbedVideo stieß auf einen Fehler während das Video eingebettet werden sollte. ($1)",
	"error_embedvideo_evp_deprecated": "Die Parserfunktion „#evp“ wurde in EmbedVideo 2.0 verworfen; alle Parserfunktionen-Tags sind in „#ev“ zu ändern.",
	"error_embedvideo_container": "Der Wert für „container“ ist ungültig."
}

/* 
	"error_embedvideo_alignment": "EmbedVideo erhielt den unbrauchbaren alignment-Parameter „$1“; gültig sind „left“ und „right“.",
*/

Cheers, Messerjokke79 (talk) 10:33, 12 November 2014 (UTC)Reply

Thanks! I added it to the repository and credited you as the author. Let me know if any changes need to be made. Otherwise I will mark it as a new release(v2.1.7) and push it out. https://github.com/Alexia/mediawiki-embedvideo/commit/61a3e325f98b511494fd9a7ba73f31fd64ee215f Alexia E. Smith (talk) 17:23, 12 November 2014 (UTC)Reply
I found some mistakes and poor wording and changed it. So it could be released. But take a look on the "error_embedvideo_alignment"-line (alignment parameter), it says “Valid values are \"left\", \"center\", \"right\", or \"none\".” but Usage section on Extension:EmbedVideo/Archive says it’s only “left” or “right”!? Messerjokke79 (talk) 09:38, 13 November 2014 (UTC)Reply
I fixed the documentation and pushed your translation updates out. Thanks! Alexia E. Smith (talk) 17:42, 19 November 2014 (UTC)Reply

Youku/Tudou/iQiyi embed services support request

edit
Since Chinese GFW has banned access to video services such as Youtube, Vimeo, etc. Thus, Chinese users can not view those movies, would you please to add service support for youku, tudou and iqiyi, or some video sites that can be viewed in China? Thank you.
I put in an enhancement ticket on the project. I might be able to get to it this week. Alexia E. Smith (talk) 00:43, 20 January 2015 (UTC)Reply
Thank you for doing this in newest version. iQiyi support is not in hurry. Boxsnake (talk) 10:39, 23 January 2015 (UTC)Reply

Problem w/ EmbedVideo.php

edit
MyWiki
MediaWiki 1.24
PHP 5.3.28 (cgi-fcgi)
MySQL 5.5.37-35.1
Lua 5.1.5

I got this error after updating.


Parse error: syntax error, unexpected '[' in /public_html/wikis/w/extensions/EmbedVideo/EmbedVideo.php on line 22

It seems all " [ " should be " ( "

Mlpearc (open channel) 01:04, 25 January 2015 (UTC)Reply

PHP 5.3 is only supported up to EmbedVideo 2.2.1. PHP 5.4 was released almost three years ago now and it is time to update. If you need the old version of EmbedVideo download it from here.Alexia E. Smith (talk) 23:07, 28 January 2015 (UTC)Reply
Had the same problem, just changed all the unexpected '[' back to the old array() and it all worked out.--Wess (talk) 19:16, 8 March 2015 (UTC)Reply
PHP 5.6, the same problem. It needs to be solved.

alignment issue

edit

When using vimeo and positioned beneath a standard image, the video and the image containers do not align when viewed on iphone 5c w/ the MobileFrontend extension. Does anyone have a solution for this annoying little issue?

I have the facilities to test this at work with a mobile device lab. I opened an issue report and will get to investigating it next week. Alexia E. Smith (talk) 01:12, 15 February 2015 (UTC)Reply
I was unable to reproduce this issue and MobileFrontend appears to be applying its styling correctly. Alexia E. Smith (talk) 21:18, 17 February 2015 (UTC)Reply

Brightcove videos and support for MW 1.25?

edit

Is it possible to embed video stored on the Brightcove service? And how can I get this extension to work with MediaWiki 1.25alpha?

Thanks --Wmat (talk) 01:41, 25 February 2015 (UTC)Reply

Brightcove does not exactly provide an interface for embedding their videos and they actually caution against it since URLs can change at any time. What is wrong with it on 1.25alpha? Alexia E. Smith (talk) 01:46, 25 February 2015 (UTC)Reply
Thanks for the response, Alexia. That's unfortunate, as my client just moved all of their video to Brightcove. As for MW1.25alpha, after installing the latest version of the extension, I get errors as follows: PHP Parse error: syntax error, exexpected '[' in EmbedVideo.php on line 22. --Wmat (talk) 01:55, 25 February 2015 (UTC)Reply
It looks like a custom video service could be coded handle Brightcove's Media API. I put in an enhancement request on the Github project, but I do not know if myself or another team member will be able to get to it any time soon. See this issue above about PHP 5.3 for the support issue. Alexia E. Smith (talk) 02:07, 25 February 2015 (UTC)Reply
Did Brightcove ever get added to EmbedVideo?--Wmat (talk) 20:09, 3 September 2015 (UTC)Reply

List of pages with EmbedVideo

edit

It'd be nice if there was a way to get a list of pages with EmbedVideo, similar to the lists available to templates, for example. --Eburcat (talk) 23:33, 29 August 2015 (UTC)Reply

You could use Extension:DynamicPageList3 or Extension:Semantic_MediaWiki to generate a list of pages that contain the parser function and/or text. Alexia E. Smith (talk) 01:00, 30 August 2015 (UTC)Reply

Error with rubJobs

edit

php showJobs.php is producing an error with this extension PHP Parse error: syntax error, unexpected '[' in /m/extensions/Embedvideo/EmbedVideo.php on line 24

I added it under

if (!$wgCommandLineMode) { to get the runJobs to work.

If you are using PHP 5.3 on your server you should upgrade to PHP 5.4 at a minimum. PHP 5.3, while officially supported by Mediawiki, is end of life and no longer receives security updates. Alexia E. Smith (talk) 15:38, 2 September 2015 (UTC)Reply

Please Add video from VK.COM

edit

Hello! How to add VK.COM video for this Extension? PS.In MW 1.26.0 + PHP 5.6.10 -it work - OK!!

See below.. Sphynkx (talk) 17:49, 27 January 2016 (UTC)Reply

VK.COM support

edit

Some hack of classes/VideoServices.php

diff (with plugin v. 2.1.3):


*** VideoService.php	2014-09-22 18:38:34.000000000 +0300
--- VideoService.php-VK	2016-01-27 18:52:03.108431956 +0200
***************
*** 8,17 ****
--- 8,18 ----
   * @link		https://www.mediawiki.org/wiki/Extension:EmbedVideo
   *
   **/
  namespace EmbedVideo;
  
+ 
  class VideoService {
  	/**
  	 * Available services.
  	 *
  	 * @var		array
***************
*** 221,230 ****
--- 222,243 ----
  			),
  			'id_regex'		=> array(
  				'#^(.+?-\d+)$#is'
  			)
  		),
+ 		'vk' => array(
+ 			'embed'			=> '%1$s',
+ 			'https_enabled'	=> true,
+ 			'url_regex'		=> array(
+ 				'#(http?://vk.com/video-\d+_\d+)#is',
+ 				'#http?://vk.com/video-(\d+_\d+)#is',
+ 			),
+ 			'id_regex'		=> array(
+ 				'#^([\d\w-]+)$#is'
+ 			),
+ 			'servicename' => 'vk'
+ 		),
  		'youtube' => array(
  			'embed'			=> '<iframe src="//www.youtube.com/embed/%1$s" width="%2$d" height="%3$d" frameborder="0" allowfullscreen="true"></iframe>',
  			'default_width'	=> 640,
  			'default_ratio'	=> 1.77777777777778, //(16 / 9)
  			'https_enabled'	=> true,
***************
*** 381,390 ****
--- 394,418 ----
  		} else {
  			return false;
  		}
  	}
  
+ private function vkVideo()
+ {
+ if ($this->service['servicename'] !== 'vk') return $this->service['embed'];
+ 
+ preg_match('/.*?(\d+)_(\d+)/', $this->getVideoID(), $sem);
+ 
+ $ch = curl_init('http://vk.com/video-'.$sem[1].'_'.$sem[2]);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+ curl_exec($ch);
+ $cont = curl_multi_getcontent($ch);
+ curl_close($ch);
+ $vkurl=preg_replace("/^.*?get_swf&oid=-(\d+)&vid=(\d+)&embed_hash=([\d\w]+)\".*/sim",'<iframe src="//vk.com/video_ext.php?oid=-$1&id=$2&hash=$3&hd=2" width="%2$d" height="%3$d"  frameborder="0"></iframe>', $cont);
+ return ($vkurl);
+ }
+ 
  	/**
  	 * Return built HTML.
  	 *
  	 * @access	public
  	 * @return	mixed	String HTML to output or false on error.
***************
*** 396,406 ****
  
  		$html = false;
  		if (array_key_exists('embed', $this->service)) {
  			//Embed can be generated locally instead of calling out to the service to get it.
  			$data = array(
! 				$this->service['embed'],
  				$this->getVideoID(),
  				$this->getWidth(),
  				$this->getHeight()
  			);
  
--- 424,434 ----
  
  		$html = false;
  		if (array_key_exists('embed', $this->service)) {
  			//Embed can be generated locally instead of calling out to the service to get it.
  			$data = array(
! 				$this->vkVideo(),
  				$this->getVideoID(),
  				$this->getWidth(),
  				$this->getHeight()
  			);
  

Briefly: New VK section and extra-function vkVideo() added. Function called instead of $this->service['embed'] and returns either embed code (for VK) or service['embed'] (for all non-VK cases). Function parces VK-source, gets the ready to use embed-code and returns it.

Requirements: curl support for your PHP.

--Sphynkx (talk) 17:47, 27 January 2016 (UTC)Reply

OK support

edit

Video from Odnoklassniki.ru (ok.ru):

		'ok' => array(
			'embed'			=> '<iframe src="//ok.ru/videoembed/%1$s" width="%2$d" height="%3$d" frameborder="0" allowfullscreen="true"></iframe>',
			'default_width'	=> 640,
			'default_ratio'	=> 1.77777777777778, //(16 / 9)
			'https_enabled'	=> true,
			'url_regex'		=> array(
				'#video/(\d+)(?:&\S+?)?#is',
			),
			'id_regex'		=> array(
				'#^(\d+)$#is'
			),
		),

Sphynkx (talk) 17:53, 27 January 2016 (UTC)Reply

Thank you it works! MW 1.26.2 PHP 5.6 SMW 2.3.1 --Wikipro (talk) 11:55, 22 February 2016 (UTC)Reply

Doesn't work after moving on a new server :(

edit

I've installed the extension as in the description. But if I want to go on my wiki I get this error:

Parse error: syntax error, unexpected '[' in /mnt/webo/d2/86/54236986/htdocs/wiki/extensions/EmbedVideo/EmbedVideo.php on line 24

how can I fix it?

How to use EmbedVideo\VideoService::addService() ?

edit

I installed EmbedVideo 2.3.2 in /var/www/html/w/extensions/EmbedVideo and added to LocalSettings.php:

wfLoadExtension('EmbedVideo');
EmbedVideo\VideoService::addService('foo', array(...));

Now my wiki throws this error on every page, as if it couldn't locate the VideoService class:

Fatal error: Uncaught Error: Class 'EmbedVideo\VideoService' not found in /var/www/html/w/LocalSettings.php on line 844 Error: Class 'EmbedVideo\VideoService' not found in /var/www/html/w/LocalSettings.php on line 844 Call Stack: 0.0001 373240 1. {main}() /var/www/html/w/index.php:0 0.0003 373720 2. require('/var/www/html/w/includes/WebStart.php') /var/www/html/w/index.php:56 0.0067 760600 3. require_once('/var/www/html/w/LocalSettings.php') /var/www/html/w/includes/WebStart.php:124

What is the right way to add a service? I can't find any documentation on it. Thanks. --Djbwiki (talk) 14:18, 14 July 2016 (UTC)Reply

Parse error: syntax error, unexpected '[' /extensions/EmbedVideo/EmbedVideo.hooks.php on line 58

edit

EmbedVideo required PHP 5.4 or above. This error will occur with lower versions.

FIXED - Videos disappear after upgrading 2.2.8 to 2.4.0

edit

I tried upgrading from 2.2.8 to 2.4.0. Videos are loaded, I see them for a short time but then the sizes are all set to 0 and they disappear. I'm loading mostly vimeo videos. Happy to work with someone on debugging this if you get in touch. --Brian of London (talk) 10:52, 18 September 2016 (UTC)Reply

Please ignore - it was some horrible 7 year old cruft in my common.css file. --Brian of London (talk) 07:11, 19 September 2016 (UTC)Reply

style module should define its position explicitly

edit

Recently updated EmbedVideo version to 2.5.0 on our wiki (MediaWiki version 1.26.2).

Started getting this error on every page that displays a video

Warning: OutputPage::getModuleStyles: style module should define its position explicitly: ext.embedVideo.styles ResourceLoaderFileModule [Called from OutputPage::getModuleStyles in /home/myuser/mydomain.com/w/includes/OutputPage.php at line 623] in /home/myuser/mydomain.com/w/includes/debug/MWDebug.php on line 300

Any thoughts?

Rbirmann (talk) 18:56, 19 October 2016 (UTC)Reply

This can be fixed with a small change of adding '"position": "top",' to extension.js, see https://github.com/HydraWiki/mediawiki-embedvideo/compare/master...colinoflynn:patch-1

Coflynn (talk)

Need exam,ple how to use it inside a table

edit

I am trying to get a video in a table and then have text placed around it in the same way as with a image http://www.mat54-wiki.nl/mat54_Wiki/index.php/Pantograaf

Anny sugestion or help to this nooby is welcome

Twitch API Root URL Needs Updating

edit

All of the Twitch API calls are going to fail because they dropped all of the old versions in February, which this extension is using. The root url for the API should now be:

https://api.twitch.tv/kraken

Microsoft Stream or Video

edit

Is possible add Microsoft Stream videos?


Yes, you just need to add the following code to VideoServices.php

'stream' => [
	'embed'			=> '<iframe width="%2$d" height="%3$d" src="https://web.microsoftstream.com/embed/video/%1$s?autoplay=false&showinfo=true" frameborder="0" allowfullscreen ></iframe>',
	'default_width'	=> 640,
	'default_ratio'	=> 1.6,
	'https_enabled'	=> false,
	'url_regex'		=> [
		'#id_([\d\w-]+).html#is',
	],
	'id_regex'		=> [
		'#^([\d\w-]+)$#is'
	]
]

Update to MediaWiki 1.29

edit

Apparently, on update to MediaWiki v1.29 Extension:EmbedVideo is creating some incompatibility with Extension:WikiEditor. Tried systematically disabling all extensions and narrowed the issue down to this extension. When it is enabled the WikiEditor toolbar does not show up and the Console tab of the browser developer tools shows the error:

Chrome:

 Uncaught SyntaxError: Unexpected token <  /wiki/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=vector:1

Firefox:

 SyntaxError: expected expression, got '<' 1 load.php:1
  • The issue persists when the only extensions enabled are EmbedVideo and WikiEditor and even when employing different skins.
  • Tried with WikiEditor branches REL1_28, REL1_29 and master. EmbedVideo branch master.
  • MediaWiki v1.29.0 (a112e4f) - PHP v5.6.30 (cgi-fcgi)

Of lesser importance, also getting the deprecation warning (maybe related?):

 Deprecated: Use of EmbedVideo's extension.json or skin.json does not have manifest_version was deprecated in MediaWiki 1.29. [Called from ExtensionRegistry::loadFromQueue in /path/to/wiki/directory/includes/registration/ExtensionRegistry.php at line 148] in /path/to/wiki/directory/includes/debug/MWDebug.php on line 309

--AhmadF.Cheema (talk) 17:13, 19 July 2017 (UTC)Reply

I think I've got it figured now. Having debug code lines included in LocalSettings.php while having the EmbedVideo extension enabled is what was causing the WikiEditor to not load. Removing the debug lines appear to have resolved the issue. It is also possible, although quite unlikely, that the 21 Jun 2017 commit might have helped in resolving the issue.
--AhmadF.Cheema (talk) 09:49, 25 July 2017 (UTC)Reply

Spoilers hide video. How fix?

edit

I use spoiler:

{| class="mw-collapsible mw-collapsed wikitable"
! Spoiler name
|- class="mw-collapsible-content" style="display: none;"
| {{#ev:youtube|https://www.youtube.com/watch?v=8S0aD6QLTxQ|400||||start=43}}
|}

OGV is audio only

edit

OGV video from Wikimedia Commons displays as audio only. WEBM displays correctly as audiovideo though. Any way to fix this? Nicole Sharp (talk) 21:34, 29 April 2018 (UTC)Reply

Option to limit to certain services

edit

Is it possible to limit to like youtube, twitch and soundcloud as an example? Thanks --Skunark (talk) 03:17, 6 May 2018 (UTC)Reply

Not currently. I filed an issue for exactly this feature in December, but other than a thumbs-up from another person, it's seen no activity yet. I'm guessing that, since it's maintained by Gamepedia primarily for use on their own wikis, such a thing wouldn't be very high priority for them to implement. ディノ千?!? · ☎ Dinoguy1000 09:19, 6 May 2018 (UTC)Reply

Undefined index for SoundCloud

edit

I get an intermittent error message in my browser when viewing my wiki page with embedded SoundCloud. Undefined index: id_regex in VideoService.php

I'm using default settings in LocalSettings.php. Do I need to do anything to add SoundCloud service? Or does the regex for SoundCloud just need to be fixed?

Streaming the embedded link still works even when I get the error.

Justin Mariner (talk) 18:10, 22 June 2018 (UTC)Reply

Subtitles

edit

Is there anyway to add subtitle tracks to the video ?

<track kind="subtitles" src="messt.vtt" label="french subs" srclang="fr" default />

If not, would it be a possible feature? If yes, ideally i'd like that track to be a file uploaded on the wiki (or even better, would be the possibility to use a file or the content a wiki page using vtt format… the best would probably be a page using srt syntax being converted to vtt) --Loizbec (talk) 19:32, 5 November 2018 (UTC)Reply

My request actually seems to be fullfilled by Extension:TimedMediaHandler. I'll check that out… --Loizbec (talk) 11:04, 6 November 2018 (UTC)Reply

extension inestable

edit

esta extensión la descargue e instale en mi wiki siguiendo las instrucciones correctamente pero al momento de hacerlo esta no me dejaba entrar al wiki y lo intente varias veces y no funciona ya.

Return to "EmbedVideo/Archive" page.