Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

{jr_logged_in} Index {jr_not_logged_in}

{jr_media_access}


The {jr_media_access} Template function has become the recommended way to embed ALL Media Plays (audio and video) into your Jamroom templates.  It handles all of the proper permission settings based on the viewers quota, as well as is very flexible in how the media can be played.

This makes working in the templates much easier, and anyone that has worked on older versions of Jamroom where you have large {if} {else} template constructs will appreciate this new method.

 

Parameters

Name Type Required Default Description
media string yes n/a The "media" parameter tells Jamroom the type of media that it will be displaying.  Valid values for the media parameter are:
hifi_stream - HIFI Audio Stream
lofi_stream - LOFI Audio Stream
hifi_download - HIFI Audio Download
lofi_download - LOFI Audio Download
video_stream - Video Stream
video_download - Video Download
type string no "html" The "type" parameter tells Jamroom the "type" of media Link you want to create.  Valid values are:
image - creates an anchor link to an image
button - creates a link based on a form button
flash_player_button - creates an embedded Flash Player Button
flash_player_slim - creates a "slim" embedded Flash Player
theme string yes * n/a The "theme" parameter is required if the {jr_media_access} template function is being embedded into a Profile Theme Template.  The value of this parameter needs to be the name of the theme.
skin string yes * n/a The "skin" parameter is required if the {jr_media_access} template function is being embedded into a Skin Template.  The value of this parameter needs to be the name of the skin.
media_size number no 0 This parameter tells Jamroom the size of the media file - if this is left at the default of 0, then Jamroom assumes there is no media file associated with the media information, and none of the stream or download options will be available.
media_id number yes n/a The "media_id" parameter tells Jamroom the "unique" ID if the media item.  This will be either the song_id or the video_id, depending on the "media" parameter.
onclick string no n/a If you would like to add a Javascript On Click handler to the media stream or download action, you can specify the Javascript with the "onclick" parameter.
media_url string yes n/a If Jamroom determines that the viewer has the necessary access rights to stream or download the media, then this is the URL that will be used to allow the User to perform the media action.
download string no "no" If the media item can be downloaded, the "download" parameter should be set to the proper download setting that is controlled by the media item (i.e. $SONG_HIFI_DOWNLOAD, etc.).
image string no "media".png The "image" parameter is used to define the image that will be shown to perform the media action (i.e. stream or download).  By default, Jamroom will look for an image that is named the same as the "media" parameter with the .png extension - i.e. "hifi_stream.png".  This image should be located in the "images" directory of the given theme or skin parameter.
alt string no n/a The "alt" parameter defines the ALT text that will be used for the "image" parameter.
no_image string no n/a If the media item being requested does not exist (for example there is no LOFI version of the song), then the "no_image" parameter can be set to provide an image that is shown instead of the play/download button.
no_alt string no n/a If the "no_image" parameter is set, and the resulting media item is not available, the "no_alt" parameter defines the ALT text for the "no_image".
login_image string no n/a If the media item being requested requires the viewer to be logged in before they can perform the action, the "login_image" will be displayed in place of the play or download image.
login_alt string no n/a If the "login_image" parameter is set, and the resulting media item requires a login to perform the action, the "login_alt" parameter defines the ALT text for the "login_image".

 

Examples

Create HIFI and LOFI Stream, and HIFI and LOFI Download links based on images.  This example is from the main jr_ranking_row.tpl found in the jamroom/skins/Cobalt3 directory:

{jr_lang id="38" default="hifi stream" assign="hifi_s"}
{jr_lang id="40" default="hifi download" assign="hifi_d"}
{jr_lang id="39" default="lofi stream" assign="lofi_s"}
{jr_lang id="41" default="lofi download" assign="lofi_d"}
{jr_media_access type="image" alt=$hifi_s media="hifi_stream" media_url=$SONG_HIFI_PLAY_URL skin="Cobalt3" media_size=$SONG_HIFI_SIZE download=$SONG_HIFI_DOWNLOAD}
{jr_media_access type="image" alt=$hifi_d media="hifi_download" media_url=$SONG_HIFI_DOWNLOAD_URL skin="Cobalt3" media_size=$SONG_HIFI_SIZE download=$SONG_HIFI_DOWNLOAD}
{jr_media_access type="image" alt=$lofi_s media="lofi_stream" media_url=$SONG_LOFI_PLAY_URL skin="Cobalt3" media_size=$SONG_LOFI_SIZE download=$SONG_LOFI_DOWNLOAD}
{jr_media_access type="image" alt=$lofi_d media="lofi_download" media_url=$SONG_LOFI_DOWNLOAD_URL skin="Cobalt3" media_size=$SONG_LOFI_SIZE download=$SONG_LOFI_DOWNLOAD}

{jr_logged_in} page 132 of 171 {jr_not_logged_in}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network