Extension:Streamer

MediaWiki extensions manual
OOjs UI icon advanced-invert.svg
Streamer
Release status: unmaintained
Implementation Parser function
Description Display information about a streamer from various streaming services.
Author(s) Curse Inc. Wiki Platform Team, Alexia E. Smith (Alexia E. Smith)
Latest version 0.5.0 (2018-10-15)
MediaWiki 1.31+
PHP 7.0+
License GNU Lesser General Public License 3.0
Download
Example Gamepedia Help Wiki

Check usage and version matrix.

The Streamer extension displays information about streamers from various streaming services. It can display information as simple as online/offline to as extensive as the current thumbnail.

Project Homepage
Documentation at Github
Mediawiki Extension Page
Extension:Streamer
Source Code
Source Code at Github
Bug Reports and Feature Requests
Issue Tracker at Github
Licensing
Streamer is released under The GNU Lesser General Public License, version 3.0.

InstallationEdit

ConfigurationEdit

Streamer only requires configuration if the YouTube or Twitch service will be used.

Setting Default Description
$wgYouTubeApiKey null Accessing the YouTube API requires registering with Google and obtaining an API key.
$wgTwitchClientId null Accessing the Twitch API requires registering with Twitch and obtaining a Client ID.

UsageEdit

TagsEdit

#streamer - Parser TagEdit

The #streamer parser tag takes what service is being used, who the user is, and optionally how to display the information.

Basic Syntax:

{{#streamer:
service=[Service]
|user=[User]
}}

Parameters for #streamer TagEdit

Parameter Required Default Description
service yes The service name to look up users on. See Supported Streaming Services.
user yes The user identifier for user on the streaming service.
template no block Built In: block, debug, link, live, minilive, thumbnail, viewers
Use a built in template or specify a custom template to use.
link no Fully qualifed URL to override the link in templates.


ExampleEdit

To display the default block template for TwitchPlaysPokemon from the Twitch streaming service:

{{#streamer:
service=Twitch
|user=twitchplayspokemon
}}

 


TemplatesEdit

There are seven built in templates that come with the extension; block, debug, link, live, minilive, thumbnail, and viewers. By default if no template is specified it uses the block template.

CustomEdit

Which template is used to display streamer information can be customized through Mediawiki's templating system. Using the "template" parameter simply add the template page name into the parser call. Example: template=Template:BlockCustom

There are several replacement variables used in the templates that will be automatically filled in with the correct information.

  • %ONLINE% - Integer based boolean if the streamer is online. Use the parser function to check against this.
  • %NAME% - Streamer's display name, as reported from the streaming service. Will fall back to the streamer's user name if one is not available.
  • %VIEWERS% - Number of current live viewers.
  • %DOING% - What the streamer is doing. This is typically the name of a video game they are playing.
  • %STATUS% - Custom status field set by the channel. This might be a custom stream title or social status depending on the service.
  • %LIFETIME_VIEWS% - Number of overall lifetime views on the channel. This count may include video on demand views depending on the service.
  • %FOLLOWERS% - Number of followers(subscriptions) that the channel has.
  • %LOGO% - Static logo image of the user or channel avatar.
  • %THUMBNAIL% - Periodically updated thumbnail image of a currently live stream.
  • %CHANNEL_URL% - Direct unmodified URL to the channel on the service.
  • %LINK% - URL to the streamer's page on the service. If a custom page link is specified in the Special:StreamerInfo interface it will be used instead.


Built InEdit

The built in templates below are copied from the StreamerTemplate class file and are placed here for reference purposes. They can be used to assist in building custom templates.

blockEdit
<div class='stream block'>
	<div class='logo'><img src='{{#if:%THUMBNAIL%|%THUMBNAIL%|%LOGO%}}'/></div>
	<div class='stream_info'>
		<div class='name'><a href='%LINK%'>%NAME%</a></div>
		<div class='online {{#ifeq:%ONLINE%|1|live|offline}}'><div class='dot'></div><div class='text'>{{#ifeq:%ONLINE%|1|".wfMessage('stream_online')->escaped()."|".wfMessage('stream_offline')->escaped()."}}</div></div>
	</div>
</div>
debugEdit
<div class='stream debug'>
	<ul>
		<li>ONLINE => %ONLINE%</li>
		<li>NAME => %NAME%</li>
		<li>VIEWERS => %VIEWERS%</li>
		<li>DOING => %DOING%</li>
		<li>STATUS => %STATUS%</li>
		<li>LIFETIME_VIEWS => %LIFETIME_VIEWS%</li>
		<li>FOLLOWERS => %FOLLOWERS%</li>
		<li>LOGO => %LOGO%</li>
		<li>THUMBNAIL => %THUMBNAIL%</li>
		<li>CHANNEL_URL => %CHANNEL_URL%</li>
		<li>LINK => %LINK%</li>
	</ul>
</div>
linkEdit
<div class='name'><a href='%LINK%'>%NAME%</a></div>
liveEdit
<div class='stream live'>
	<div class='stream_info'>
		<div class='name'><a href='%LINK%'>%NAME%</a></div>
		<div class='online {{#ifeq:%ONLINE%|1|live|offline}}'><div class='dot'></div><div class='text'>{{#ifeq:%ONLINE%|1|".wfMessage('stream_online')->escaped()."|".wfMessage('stream_offline')->escaped()."}}</div></div>
	</div>
</div>
miniliveEdit
<div class='stream minilive'>
	<div class='stream_info'>
		<div class='name'><a href='%LINK%'>%NAME%</a></div>
		<div class='online {{#ifeq:%ONLINE%|1|live|offline}}'><div class='dot'></div></div>
	</div>
</div>
viewersEdit
<div class='stream viewers'>
	<div class='stream_info'>
		<div class='name'><a href='%LINK%'>%NAME%</a></div>
		<div class='online {{#ifeq:%ONLINE%|1|live|offline}}'><div class='dot'></div><div class='text'>%VIEWERS%</div></div>
	</div>
</div>
thumbnailEdit
<div class='stream thumbnail'>
	<div class='logo'><img src='{{#if:%THUMBNAIL%|%THUMBNAIL%|%LOGO%}}'/></div>
</div>


#streamerinfo - Parser Meta TagEdit

The #streamerinfo parser meta tag takes what service is being used and who the user is to tag an article as related to that person. It will cause any links automatically generated from the #streamer tag to use the article page as the destination and display name. Streamer information created from tagging or manually entered will be visible in the Special:StreamerInfo interface. Note: Articles tagged with the #streamerinfo tag will override any manually entered information.

Basic Syntax:

{{#streamerinfo:
service=[Service]
|user=[User]
}}


Parameters for #streamerinfo TagEdit

Parameter Required Default Description
service yes The service name to look up users on. See Supported Streaming Services.
user yes The user identifier for user on the streaming service.


ExampleEdit

To tag the article "Twitch Plays Pokemon" with the Twitch user "twitchplayspokemon":

{{#streamerinfo:
service=Twitch
|user=twitchplayspokemon
}}

This would cause all output from the #streamer tag to reference to the "Twitch Plays Pokemon" when generating links and display names.


Supported Streaming ServicesEdit

Service Parameter Value Web Site
Azubu.tv azubu http://www.azubu.tv/
Beam beam https://beam.pro/
Twitch.tv twitch http://www.twitch.tv/
YouTube youtube https://www.youtube.com/