r61056 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61055‎ | r61056 | r61057 >
Date:18:47, 14 January 2010
Author:dale
Status:resolved (Comments)
Tags:
Comment:
* added player skin variable
* fixed video tag output to use html5 "poster" (instead of thumbnail)
Modified paths:
  • /trunk/extensions/OggHandler/OggHandler.php (modified) (history)
  • /trunk/extensions/OggHandler/OggHandler_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OggHandler/OggHandler.php
@@ -57,6 +57,8 @@
5858 // then we can output the <video> tag and its re-written by mv_embed
5959 $wgVideoTagOut = false;
6060
 61+$wgVideoPlayerSkin = 'kskin';
 62+
6163 // Support striped player iframe output for remote embedding
6264 $wgEnableIframeEmbed = false;
6365
Index: trunk/extensions/OggHandler/OggHandler_body.php
@@ -596,7 +596,7 @@
597597
598598 function toHtml( $options = array() ) {
599599 global $wgEnableTemporalOggUrls, $wgVideoTagOut,
600 - $wgScriptPath, $wgEnableTimedText;
 600+ $wgScriptPath, $wgEnableTimedText, $wgVideoPlayerSkin;
601601
602602 wfLoadExtensionMessages( 'OggHandler' );
603603 if ( count( func_get_args() ) == 2 ) {
@@ -642,7 +642,7 @@
643643 'src' => $url,
644644 'wikiTitleKey' => $this->file->getTitle()->getDBKey(),
645645 'style' => "width:{$width}px;height:{$playerHeight}px",
646 - 'thumbnail'=>$thumb_url,
 646+ 'poster'=>$thumb_url,
647647 'controls'=> 'true',
648648 'durationHint' => $length,
649649 'startOffset' => $offset,
@@ -697,6 +697,11 @@
698698 $videoAttr['URLTimeEncoding'] = 'true';
699699 }
700700
 701+ // Set player skin:
 702+ if( $wgVideoPlayerSkin ){
 703+ $videoAttr['class'] = htmlspecialchars ( $wgVideoPlayerSkin );
 704+ }
 705+
701706 $s = Xml::tags( 'video', $videoAttr,
702707 Xml::tags('div', array(
703708 'class'=>'videonojs',

Follow-up revisions

RevisionCommit summaryAuthorDate
r61512* white space and comment clean up per r61056 #c5410dale08:04, 26 January 2010

Comments

#Comment by Tim Starling (talk | contribs)   04:50, 26 January 2010

Use tabs not spaces for indenting. Put a space on either side of binary operators such as "=>". Document configuration variables. Explain what "kskin" is meant to mean.

#Comment by Mdale (talk | contribs)   08:05, 26 January 2010

added some skin documentation in r61512, and cleaned up some white space issues

Status & tagging log