Note that this Wiki is a work in progress, items may not be updated or may disappear entirely as the pages are updated.

SAM HTML Output

From SpacialAudio

Jump to: navigation, search

Contents

SAM Broadcaster contains a powerful set of features that helps you generate dynamic webpages and provide a better experience and higher interaction for your listeners.

A typical SAM website has the following features

  • Displays the currently playing song information.
  • BuyCD links (Extra revenue opportunities).
  • Artist homepage links (Extra promotion for artists you play).
  • Recently played list and a "coming up" list.
  • Complete list of songs in your media library. Users can also make instant, real-time requests!
  • List of top requested songs.

Understanding the HTML Output Process

In short, the output process looks like this: Input template file -> SAM tag "search & replace" -> Output webpage file -> FTP Uploading

  1. Input template is a source file that contains certain tags that SAM will replace with actual values. An example of a tag is: $history.artist$. This tag will be replaced by the artist name in the current history table row.
  2. On each song change, or when HTML output pages are generated, SAM will read the Input template and search for tags in it. When a tag is found, SAM will replace the tag with the actual value that corresponds to that tag.
  3. The resulting file is then written to the specified Output filename.
  4. Optionally, the Output file can also be uploaded to a remote webserver via FTP. Please refer to the HTML output reference guide under the Help menu of SAM for more detailed information.

General HTML Output

SAM Broadcaster's HTML Output Area
SAM Broadcaster's HTML Output Area

These are the general web pages usually updated each time a song changes.

  • Click the Plus ("+") button to add a new HTML output page. This will bring up the HTML output options dialog.
  • The Minus ("-") button will remove the currently selected HTML output page.
  • The Config ("Tools") button allows you to change the details of the currently selected HTML page. This will bring up the HTML output options dialog.
  • The Up & Down arrows allow you to change the order in which HTML output pages are generated.
  • When the Auto-generate on song change is checked, SAM will generate the HTML output pages each time a new song starts playing.
  • Skip songs less than [xx] seconds in duration allows you to specify the minimum duration of a song before pages will be generated.
    • Generating HTML output for songs less than thirty seconds are mostly a waste of CPU and other resources since:
      1. The page will only be displayed a few seconds before it must be generated again.
      2. The FTP upload will, in many cases, not even be finished before new HTML pages are generated and have to be uploaded.
      3. If you have a bunch of short promos (Less than 10sec) playing back-to-back it can seriously affect CPU time and might cause audio to skip.

Note: Skipping HTML generation for songs less that thirty seconds in duration is highly recommended.

Playlist HTML Output

This section can only contain a SINGLE file and should only be updated ONCE each time you add or modify songs in your media library. Generating these pages can take a lot of CPU time and take a long time to upload for large media libraries.

  • Click Plus ("+") button to add a new HTML output playlist page. This will bring up the HTML output options dialog.
  • The Minus ("-") button will remove the current HTML output playlist page.
  • The Config ("Tools") button allows you to change the details of the current HTML output playlist page. This will bring up the HTML output options dialog.

Note: The Playlist page can not be generated automatically on each song change since it will be a huge waste of CPU and resources. Instead, you should manually generate after you make major changes to your playlist. You could, of course, also do it on fixed intervals (Like once a week).

Refer to the General menu command to manually generate the Playlist page.

Upload Files via FTP

After your HTML pages are created, SAM has a built-in FTP client that can upload these pages to a remote webserver.

Note: Please contact your web host provider if you do not know any of the required details below.

  • Host: The DNS name or IP address of the FTP server/web server machine.
  • Port: the port the FTP client will use to connect. The default FTP port is 21.
  • Username: Your FTP account login username.
  • Password: Your FTP account login password.
  • User passive FTP mode: Enables FTP Passive mode file transfers. Check this option if SAM4 is located behind a proxy server, NAT or firewall.
  • Remote web directory (Web root): The actual FULL path to your document root directory located on the webserver. (This is the place where all your *.html files are uploaded.)
  • Remote picture directory: - The actual FULL path to your picture directory located on the webserver. (This is the place where all your album covers are uploaded.)

Related Areas

  • The General menu on the top of SAM allows you to generate HTML output:
    • Click on General, HTML output
      • From there you can Generate the current song information, the playlist and upload the pictures.
  • The FTP Log window will display the progress of all your FTP uploads. If the FTP uploading does not work, this is the first place to track down the problem.
    • This is usually found on Desktop B.
  • The Song Information Editor contains an Upload picture button that will upload the pciture using the above configured FTP details.
  • The HTML Output Examples will give you a quick introduction to HTML output usage in three examples.