» Interface
» Modifier keys
» Recording
» Streams Manager
» Quick Open
» Preferences
» Miscellaneous
» Developers
» History
» Information & Credits

Developers

FStream have some developers abilities. Here is some help about this functionalities.

  • ApppleScript
    FStream recognize the apple scripting technology : AppleScript.
    You can show the complete list of commands via the Script Editor application in your Application folder. You should go on the "File" menu, then "Open Dictionary" and then select "FStream".

    Here some simple scripts examples :

    Start playing the selected webradio in FStream
    tell application "FStream"
        startPlaying
    end tell

    Stop playing the selected webradio in FStream
    tell application "FStream"
        stopPlaying
    end tell

    Start a recording session in FStream
    tell application "FStream"
        startRecording
    end tell

    Stop the recording session in FStream
    tell application "FStream"
        stopRecording
    end tell

    Get a tree of your favourites webradio
    tell application "FStream"
        treeOfPlaylist
    end tell

  • PlugIns:
    FStream recognize PlugIns to extend its functionalities.
    For the moment, only skin are recognized by FStream. Skins are interfaces PlugIns that allow to change the default main window style. You can build skin with Xcode in Objective-C or in XML with your favourite XML editor. You can donwload examples at this page.

  • fsradio:
    FStream recognize a special URL scheme : "fsradio".
    With this kind of URL, FStream can be directly used to load a radio, in all kind of application that recognize extended scheme.
    The URL can be composed only of the stream URL of the webradio to load, or composed of the stream URL and the stream name separated with a "_" character.
    The name is in UTF8 format, and the two items are encoded in base64.

    Here some examples :
    fsradio://aHR0cDovL3d3dy5zb3VyY2VtYWMuY29tL2ZzdHJlYW0ucGhwP3Bscz0y_RnLDqXF1ZW5jZSAz for "Fréquence 3".
    fsradio://aHR0cDovL3d3dy5zb3VyY2VtYWMuY29tL2ZzdHJlYW0ucGhwP3Bscz00_T1XDryBGTQ== for "OUÏ FM".
    fsradio://aHR0cDovL3d3dy5zb3VyY2VtYWMuY29tL2ZzdHJlYW0ucGhwP3Bscz0xMw==_TGEgR3Jvc3NlIFJhZGlv for "La Grosse Radio".
    fsradio://aHR0cDovL3d3dy5zb3VyY2VtYWMuY29tL2ZzdHJlYW0ucGhwP3Bscz0xMg== for "France Info" without name.

  • Presets:
    FStream have an integrated set of preset radios. But it is possible for users to add its list of preset from an external server. Here how to do :
    • The user make a new entry in preferences, in the "Presets" pannel
    • He indicate the name of the preset. This name can be what he want : this is usefull only for the user.
    • He indicate the preset address.

    The preset address should allow to receive a plist of this form:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>

         <key>host</key>
         <string>www.sourcemac.com</string>

         <key>base</key>
         <string>www.sourcemac.com</string>

         <key>genre</key>
         <string>/fstream_sample.php?action=genre&language=[language]</string>

         <key>radio</key>
         <string>/fstream_sample.php?action=radio&genre=[genre]&language=[language]</string>

         <key>search</key>
         <string>/fstream_sample.php?action=search&search=[search]&language=[language]</string>

      </dict>
      </plist>
    • The key "genre" contain the genre list page generator address. In this address, it is possible possible to use the tag [language] that will be replaced by the current language code.
    • The key "radio" contain the radio list page address, generated from the selected genre. In this address, it is possible to use the tag [language] and the tag [genre] that will be replaced by the genre identifier selected by the user.
    • The key "search" contain the radio list page address, generated from a research keyword. In this address, it is possible to use the tag [language] and the tag [search] that will be replaced by the keyword that the user entered in the search field.


    The format returned by the server should be the following :
    • The data returned should be continuous (and not by block) and no encrypted
    • The data should be encoded in UTF-8
    • This special characters should be replaced :
    •  "<" become "&#60;"
       ">" become "&#62;"
       "[" become "&#91;"
       "]" become "&#93;"
       "$" become "&#36;"
    • A list is represended like this :
    • [identifier_1$nom_1][identifier_2$nom_2]...
      The identifier can be what you want, it will replace the tag [genre] in the radio address.
    • A list of radio (via a genre or a search) is represended like this :
    • [name_1$format_1$bitrate_1$url_1][name_2$format_2$bitrate_2$url_2]...
      The format is a MIME type (audio/mpeg, etc.) and the bitrate is in kbps.

    The script of the sample preset can be downloaded here.