{jrCore_media_player}

Applies to: Jamroom 7.0+ Last verified: 2026-10-24
  • jrCore_media_player

    Function
    jrCore_media_player
    parameter
    type
    default
    required
    description
    module
    string
    -
    on
    The module of the media, such as jrAudio, jrVideo or jrPlaylist
    type
    string
    -
    off
    The player, such as jrAudio_button or jrAudio_player_dark. Without it: the active skin's default player for the module.
    field
    string
    -
    off
    The file field, such as audio_file or video_file
    item
    array
    -
    off
    One item to play, usually $item
    items
    array
    -
    off
    Several items to play
    item_id
    int
    -
    off
    The id of one item to play
    search1, order_by, limit, ...
    string
    -
    off
    Without item, items or item_id: find the items to play, as in {jrCore_list}
    autoplay
    bool
    false
    off
    Start playing when the page loads
    assign
    string
    -
    off
    Put the result in this variable instead of showing it

    Shows an audio, video or playlist player. Players are provided by modules and skins; each skin can set a default player per module.

    {jrCore_media_player module="jrAudio" type="jrAudio_button" field="audio_file" item=$item}
    {jrCore_media_player module="jrVideo" field="video_file" item_id="2" autoplay=true}
    {jrCore_media_player module="jrPlaylist" type="jrPlaylist_player_dark" item=$item}
    {jrCore_media_player module="jrAudio" field="audio_file" search1="audio_genre = rock" order_by="_created desc" limit="10"}
  • Other parameters are passed to the player's template, where the player can use them.

Tags