Help:Media format

From semantic-mediawiki.org
Media format
HTML5 Audio / Video media result printer
Scenarios, examples, demos
Example: Examples
Collection
Further Information
Provided by: Extension "Semantic Result Formats"
Added: 1.9.0
Removed: still supported
Requirements: none
Format name: media
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. yes
Authors: James Hong Kong
Categories: media
Table of Contents

The result format media integrates jPlayer JavaScript library which is a HTML5 Audio / Video player and #ask queries in order for content to be directly accessible via audio or video mediaplayer.

Enabled mime types corresponds to jPlayer's supported formats such as 'mp3', 'mp4', 'webm', 'webma', 'webmv', 'ogg', 'oga', 'ogv', 'm4v', 'm4a'.

Parameters[edit]

Parameter Type Default Description
class text empty Specify an additional cascading style sheet class
theme text blue.monday Select a grid theme
inspector yes/no no Displays detailed information about a specified media element

Usage[edit]

Media source is the subject itself
{{#ask:
 [[Category:Mediaplayer test]]
 |?Title=title
 |?Has cover art=poster
 |?Has artists=artist
 |default=''No valid media found.''
 |format=media
}}
Media source is not the subject itself
{{#ask:
 [[Has source::+]]
 |?Has source=source
 |?Has title=title
 |?Has artist=artist
 |default=''No valid media found.''
 |format=media
}}
Single mode
{{#ask:
 [[File:...‎]]
 |default=''No valid media found.''
 |format=media
}}
  •  ?...=source is used to identify the media source (needed when the subject is not the media source)
  •  ?...=title is used to identify the title
  •  ?...=poster is used to identify the related cover art if available
  •  ?...=artist is used to identify the artists if available

Examples[edit]


This documentation page applies to all SMW versions from 1.9.0 to the most current version.