Extension talk:EmbedVideo/Archive

Jimbo -

I just added the following lines:

'youtube' => array(       'url'=>'http://www.youtube.com/v/$1'    ), 'youtubeplaylist' => array(       'url'=>'http://www.youtube.com/p/$1'    )

This allows you to handle YouTube playlists - which is a nice thing. ;-)

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'

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: http://www.mediawiki.org/wiki/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)

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)