Extension talk:EmbedVideo/Archive

Adding support for local video
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 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==

Add the youtubeplaylist type ...

'youtubeplaylist' => array(       'extern' =>            ' ',        'default_ratio' => 16/9    ),

to handle YouTube play lists using the new iframe embedding technique

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


 * 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?
How would I go about adding GodTube to this? --12.219.103.195 17:57, 16 September 2007 (UTC)

Cant get it to work
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 :D

Changed code to add another site.
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
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
Convert Video to
 * container: mp4
 * video: MPEG-4 AVC, H264
 * audio: AAC

with avidemux

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

Step 3 Install EmbedVideo.php
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 6 Upload and insert code
Upload file and insert the code

or

FireFox?
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
Is there a way to get a video to start when the page is displayed?

Casey See my site

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

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

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

Vimeo
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
i know just to play youtube video. can anyone explain me how?

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

Usage:

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
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
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)
 * Dailymotion: add allowFullScreen="true" (line 92) -->  'wmode="transparent" width="$2" height="$3" allowFullScreen="true">'. 
 * GoogleVideo: add &fs=true  (line 196) --> 'url' => 'http://video.google.com/googleplayer.swf?docId=$1&fs=true'
 * Youtube: add &fs=1 (line 205) -->  'url'=>'http://www.youtube.com/v/$1&fs=1'


 * 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)

Edit Button
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": "", "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)

Adding support for higher resolution feeds from youtube
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)

Access Controls?
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
Slightly modded version of this extension is avaliable at

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
You can modify the code to produce valid XHTML by replacing

with

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

adding Xfire embed support to EmbedVideo.php
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 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)
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)
 * Confirm - does _not_ work on 1.16b3. Shows only "" string. Sauron 10:28, 23 June 2010 (UTC)

$wgEmbedVideoServiceList: sevenload
Because videos from sevenload could not be embedded, I changed the referring array (starts line 198): 'sevenload' => array(       'url' => 'http://sevenload.com/pl/$1/300x258/swf'    ), --ThT 05:44, 3 July 2009 (UTC)
 * 1) adjustment 03.07.2009
 * 2) videos from Sevenload could not be embedded
 * 3)        'url' => 'http://page.sevenload.com/swf/en_GB/player.swf?id=$1'

$wgEmbedVideoServiceList: slideshare
For the embedding of presentations from Slideshare without using Extension:SlideShare I just added the referring array: 'slideshare' => array(       'url' => 'http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=$1'    ), --ThT 17:21, 30 October 2009 (UTC)
 * 1) adjustment 30.10.2009
 * 2) slideshare

Not working for me
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)

Problem with PHP 5.1.6
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)


 * This fixed my v1.16 running PHP 5.1.6 as well. --173.11.163.197 16:49, 5 October 2010 (UTC)


 * 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)

To enable full screen mode in version 1.0
Just modify the EmbedVideo.hooks.php file : " wmode=\"transparent\" width=\"{$width}\" height=\"{$height}\">".
 * line 130 from :
 * to :

" wmode=\"transparent\" allowfullscreen=\"true\" width=\"{$width}\" height=\"{$height}\">". " wmode=\"transparent\" width=\"{$width}\" height=\"{$height}\"> ".
 * line 158 from :
 * to :

" wmode=\"transparent\" allowfullscreen=\"true\" width=\"{$width}\" height=\"{$height}\"> ".

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

Undefined index
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)

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)


 * 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)


 * Thank you very much. I'll keep waiting for the new version. Cheers Fladei 12:50, 25 October 2010 (UTC)

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
It would be nice if you added support for NicoVideo. Here is the code I recently added and tested:

'nicovideo' => array(       'extern' => ' ',        'default_width' => 490,        'default_ratio' => 490/387,    ),

75.71.202.125 01:50, 18 December 2010 (UTC)

de.sevenload.com
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)

vkontakte.ru
Hello! How to add vkontakte video for this Extension?

extension broken with IIS
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)


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

Stats about embedded videos?
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)