Help:Embed Video
From Android Game Development Wiki
Contents |
[edit] 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.
[edit] 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 |
[edit] 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}}
[edit] Reporting Bugs
There is an issue tracker set up on the Github project page.
[edit] Contributing
Bug reports, feature requests, and patches are always welcomed. New contributors can be added to the project if there is sufficient interest.