* @version 0.20 * * Changelog * ========= * * 0.10 - Initial build with FlowPlayer 1.x * 0.20 - Release using FlowPlayer 2.0.1 */ // Extension credits that show up on Special:Version $wgExtensionCredits['parserhook'][] = array( 'name' => 'FlowPlayerExtension', 'author' => 'Avidan Ross', 'url' => 'http://www.mediawiki.org/wiki/Extension:FlowPlayerExtension', 'description' => 'Allows the display of flv movies within a wiki using the FlowPlayer movie player.' ); if( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) $wgHooks['ParserFirstCallInit'][] = 'FlowPlayerExtension'; else $wgExtensionFunctions[] = 'FlowPlayerExtension'; function FlowPlayerExtension() { global $wgParser; $wgParser->setHook( 'flowplayer', 'renderFlowPlayer' ); return true; } function renderFlowPlayer( $input, $args ) { global $wgScriptPath; //if width and height are not set, give defaults if( !isset( $args['width'] ) ) $args['width'] = 240; if( !isset( $args['height'] ) ) $args['height'] = 320; if( isset( $args['advanced'] ) ){ $flowPlayerVariables =array( 'videoFile', 'baseURL', 'autoPlay', 'autoBuffering', 'usePlayOverlay', 'splashImageFile', 'initialScale', 'videoHeight', 'useNativeFullScreen', 'fullScreenScriptURL', 'bufferLength', 'startingBufferLength', 'useSmoothing', 'videoLink', 'emailPostUrl', 'emailVideoLink', 'emailDefaultMessage', 'url', 'name', 'live', 'start', 'end', 'protected', 'type','linkUrl', 'linkWindow', 'overlay', 'overlayId', 'duration', 'controlEnabled', 'allowResize', 'showOnLoadBegin', 'maxPlayCount' ); } else { $flowPlayerVariables =array( 'videoFile', 'baseURL', 'autoPlay', 'autoBuffering',' usePlayOverlay', 'splashImageFile', 'initialScale', 'videoHeight', 'useNativeFullScreen', 'fullScreenScriptURL', 'bufferLength', 'startingBufferLength', 'useSmoothing', 'videoLink', 'emailPostUrl', 'emailVideoLink', 'emailDefaultMessage' ); } $flashvars = new stdClass(); $flashvars->config = new stdClass(); //if no "videofile" is set, use the local wiki file if( !isset( $args['videofile'] ) ){ $file = wfFindFile( $input ); if( is_object( $file ) && $file->exists() ) $flashvars->config->videoFile = $file->getFullUrl(); } foreach( $flowPlayerVariables as $configVariableName ){ //for some reason, mediawiki passes all arguments in lower case if( isset( $args[strtolower( $configVariableName )] ) ) { if( in_array( $args[strtolower($configVariableName)], array( 'false', 'true' ) ) ){ $flashvars->config->$configVariableName = (bool)( $args[strtolower($configVariableName)] == 'true' ); } else { $flashvars->config->$configVariableName = $args[strtolower($configVariableName)]; } } } $flashvars = Xml::encodeJsVar( $flashvars ); $flowplayerpath = $wgScriptPath . "/extensions/flowplayer/FlowPlayer.swf"; $returnString = "\n"; $returnString .= "
\n"; $returnString .= "\n"; return $returnString; } ログイン - Olonkho Hyper Media
Thu | Aug | 16,2018

ログイン

提供:Olonkho Hyper Media


ログイン

Olonkho Hyper Mediaにログインするにはクッキーを有効にする必要があります。