Testvideo: Unterschied zwischen den Versionen

Aus Zebradem WIKI
Zur Navigation springenZur Suche springen
Die Seite wurde neu angelegt: „Usage The EmbedVideo parser function expects to be called in any of the following ways: *<tt>{{#ev:service|id}}</tt> *<tt>{{#ev:service|id|width}}</tt> *<…“
 
Keine Bearbeitungszusammenfassung
 
Zeile 1: Zeile 1:
Usage
==Usage==


The EmbedVideo parser function expects to be called in any of the following ways:  
The EmbedVideo parser function expects to be called in any of the following ways:
* <tt><nowiki>{{#ev:service|id}}</nowiki></tt>
* <tt><nowiki>{{#ev:service|id|width}}</nowiki></tt>
* <tt><nowiki>{{#ev:service|id|width|align}}</nowiki></tt>
* <tt><nowiki>{{#ev:service|id|width|align|desc}}</nowiki></tt>
* <tt><nowiki>{{#evp:service|id|desc}}</nowiki></tt>
* <tt><nowiki>{{#evp:service|id|desc|align}}</nowiki></tt>
* <tt><nowiki>{{#evp:service|id|desc|align|width}}</nowiki></tt>


*<tt>{{#ev:service|id}}</tt>
Where:
*<tt>{{#ev:service|id|width}}</tt>  
* <tt>service</tt> is the name of a video sharing service (See "service name" in the list below)
*<tt>{{#ev:service|id|width|align}}</tt>  
* <tt>id</tt> is the id of the video to include
*<tt>{{#ev:service|id|width|align|desc}}</tt>
* <tt>width</tt> (optional) is the width in pixels of the viewing area (height will be determined automatically)
*<tt>{{#evp:service|id|desc}}</tt>  
* <tt>align</tt> (optional) is an alignment (float) attribute. May be "left" or "right".
*<tt>{{#evp:service|id|desc|align}}</tt>  
* <tt>desc</tt> (optional) is a short description to display beneath the video when it is aligned
*<tt>{{#evp:service|id|desc|align|width}}</tt>


Where:  
For example, to include the famous "evolution of dance" YouTube video, you'd enter:
<pre>{{#ev:youtube|dMH0bHeiRNg}}</pre>


*<tt>service</tt> is the name of a video sharing service (See "service name" in the list below)
And if you wanted scaled down to thumbnail size, on the right with a short description, you could use:
*<tt>id</tt> is the id of the video to include
<pre>{{#ev:youtube|dMH0bHeiRNg|100|right|This is an embedded video!}}</pre>
*<tt>width</tt> (optional) is the width in pixels of the viewing area (height will be determined automatically)
*<tt>align</tt> (optional) is an alignment (float) attribute. May be "left" or "right".
*<tt>desc</tt> (optional) is a short description to display beneath the video when it is aligned


For example, to include the famous "evolution of dance" YouTube video, you'd enter:
<pre>{{#ev:youtube|dMH0bHeiRNg}}</pre>
And if you wanted scaled down to thumbnail size, on the right with a short description, you could use:
<pre>{{#ev:youtube|dMH0bHeiRNg|100|right|This is an embedded video!}}</pre>
:''Note: See the [http://wiki.github.com/Whiteknight/mediawiki-embedvideo/ Project Homepage] for more examples.''
:''Note: See the [http://wiki.github.com/Whiteknight/mediawiki-embedvideo/ Project Homepage] for more examples.''


== Supported Services ==
==Supported Services==
 
As of version 1.0, EmbedVideo supports embedding video content from the following services:


As of version 1.0, EmbedVideo supports embedding video content from the following services:
{| class="wikitable"
{| class="wikitable"
|-
|-
Zeile 37: Zeile 36:
| <tt>dailymotion</tt>
| <tt>dailymotion</tt>
|-
|-
! Div Share  
! Div Share
| <tt>divshare</tt>
| <tt>divshare</tt>
|-
|-
Zeile 64: Zeile 63:
| <tt>youtube</tt> and <tt>youtubehd</tt>
| <tt>youtube</tt> and <tt>youtubehd</tt>
|-
|-
! [http://www.vimeo.com Vimeo]  
! [http://www.vimeo.com Vimeo]
| <tt>vimeo</tt>
| <tt>vimeo</tt>
|}
|}


== Enabling full-screen mode for youtube ==
==Enabling full-screen mode for youtube==
 
Note: This modification is described by various commenters in the Discussion tab.  
Note: This modification is described by various commenters in the Discussion tab.  


1. Open the EmbedVideo.hooks.php file and change the following:  
1. Open the EmbedVideo.hooks.php file and change the following:
* 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>" .


*line '''130''' from&nbsp;:
2. Open EmbedVideo.Services.php and add add &fs=1 to both youtube URL values. For example, change http://www.youtube.com/v/$1 to http://www.youtube.com/v/$1&fs=1


            " wmode=\"transparent\" width=\"{$width}\" height=\"{$height}\"&gt;" .
To enable HD by default, add &hd=1 after the &fs=1.


:to&nbsp;:
==Developer notes==


            " wmode=\"transparent\" allowfullscreen=\"true\" width=\"{$width}\" height=\"{$height}\"&gt;" .
The major benefit of using a parser function as the injection mechanism for video clips (as opposed to an extension tag) is that parser functions can utilize template parameters (of the form <tt><nowiki>{{{1}}}</nowiki></tt>).


*line '''158''' from&nbsp;:
For example, say you found yourself making a lot of YouTube videos in thumbnail size, right-aligned like an image.  You might make a template called Template:Youtube_tn which could contain this:
 
<pre>
            " wmode=\"transparent\" width=\"{$width}\" height=\"{$height}\"&gt;&lt;/embed&gt;" .
<div class="thumb tright">
 
{{#ev:youtube|{{{1}}}|{{{2|100}}}}}
:to&nbsp;:
</div>
 
</pre>
            " wmode=\"transparent\" allowfullscreen=\"true\" width=\"{$width}\" height=\"{$height}\"&gt;&lt;/embed&gt;" .
 
2. Open EmbedVideo.Services.php and add add &amp;fs=1 to both youtube URL values. For example, change http://www.youtube.com/v/$1 to http://www.youtube.com/v/$1&amp;fs=1
 
To enable HD by default, add &amp;hd=1 after the &amp;fs=1.
 
== Developer notes ==


The major benefit of using a parser function as the injection mechanism for video clips (as opposed to an extension tag) is that parser functions can utilize template parameters (of the form <tt>{{{1}}}</tt>).
And then call it like this:
 
<pre>
For example, say you found yourself making a lot of YouTube videos in thumbnail size, right-aligned like an image. You might make a template called Template:Youtube_tn which could contain this:
{{youtube tn|someYoutubeId}}
<pre>&lt;div class="thumb tright"&gt;
{{#ev:youtube|{{{1}}}|{{{2|100}}}}}
&lt;/div&gt;
</pre>
And then call it like this:  
<pre>{{youtube tn|someYoutubeId}}
</pre>
</pre>
<br>[[Category:YouTube_extensions|YouTube_extensions]]

Aktuelle Version vom 17. März 2013, 20:27 Uhr

Usage

The EmbedVideo parser function expects to be called in any of the following ways:

  • {{#ev:service|id}}
  • {{#ev:service|id|width}}
  • {{#ev:service|id|width|align}}
  • {{#ev:service|id|width|align|desc}}
  • {{#evp:service|id|desc}}
  • {{#evp:service|id|desc|align}}
  • {{#evp:service|id|desc|align|width}}

Where:

  • service is the name of a video sharing service (See "service name" in the list below)
  • id is the id of the video to include
  • width (optional) is the width in pixels of the viewing area (height will be determined automatically)
  • align (optional) is an alignment (float) attribute. May be "left" or "right".
  • desc (optional) is a short description to display beneath the video when it is aligned

For example, to include the famous "evolution of dance" YouTube video, you'd enter:

{{#ev:youtube|dMH0bHeiRNg}}

And if you wanted scaled down to thumbnail size, on the right with a short description, you could use:

{{#ev:youtube|dMH0bHeiRNg|100|right|This is an embedded video!}}
Note: See the Project Homepage for more examples.

Supported Services

As of version 1.0, EmbedVideo supports embedding video content from the following services:

Site Service Name
Dailymotion dailymotion
Div Share divshare
Edutopia edutopia
FunnyOrDie funnyordie
Google Video googlevideo
Interia interia or interiavideo
Revver revver
sevenload sevenload
TeacherTube teachertube
YouTube youtube and youtubehd
Vimeo vimeo

Enabling full-screen mode for youtube

Note: This modification is described by various commenters in the Discussion tab.

1. Open the EmbedVideo.hooks.php file and change the following:

  • 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>" .

2. Open EmbedVideo.Services.php and add add &fs=1 to both youtube URL values. For example, change http://www.youtube.com/v/$1 to http://www.youtube.com/v/$1&fs=1

To enable HD by default, add &hd=1 after the &fs=1.

Developer notes

The major benefit of using a parser function as the injection mechanism for video clips (as opposed to an extension tag) is that parser functions can utilize template parameters (of the form {{{1}}}).

For example, say you found yourself making a lot of YouTube videos in thumbnail size, right-aligned like an image. You might make a template called Template:Youtube_tn which could contain this:

<div class="thumb tright">
{{#ev:youtube|{{{1}}}|{{{2|100}}}}}
</div>

And then call it like this:

{{youtube tn|someYoutubeId}}