Help:Media format

From Linux Web Expert

Media format
HTML5 Audio / Video media result printer
Scenarios, examples, demos
Example: Examples
Collection
{{#widget:YouTube|id=KIhbgal0IJg|width=220|height=220 }}
Further Information
Provided by: 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'.

The bundled JPlayer is not actively developed anymore. Therefore the media format will break in recent versions of MW/SMW1


Parameters

⧼validator-describe-header-parameter⧽ ⧼validator-describe-header-type⧽ ⧼validator-describe-header-default⧽ ⧼validator-describe-header-description⧽
class ⧼validator-type-string⧽ ⧼validator-describe-empty⧽ Specify an additional cascading style sheet class
theme ⧼validator-type-string⧽ blue.monday Select a grid theme
inspector ⧼validator-type-boolean⧽ no Displays detailed information about a specified media element

Usage

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

#scite could not render a citation text for reference "gh:srf:822" because type "issue" was not assigned to a template.


Property "Namespace" has a restricted application area and cannot be used as annotation property by a user.Property "Docinfo editor" (as page type) with input value "User:>Krabina Bernhard" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.

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


References

  1. ^ gh:srf:822