BoinxTV can be customized by adding new layers. The real power of layers lies in the fact that they are actually made with a MacOS X technology called Quartz Composer. Almost anything is possible with Quartz Compositions. You can create interactive TV shows where your audience can send in SMS or twitter messages which are displayed on screen. Create stock charts from online data. Keep scores in a sports match. Play games on screen. You may find inspiration in some of the layers included with BoinxTV. To work with BoinxTV, the Quartz Compositions must contain certain elements so that BoinxTV and the layer can talk to each other and that the layer can display the media files BoinxTV sends to it. In theory, anyone can make their own layers. This page describes on a technical level how to create layers using Quartz Composer.
If you do not want to dig into Quartz Composer yourself, let us do it for you. We have extensive experience creating layers for BoinxTV, including data visualization such as stock charts, which you can leverage to create just the right layer for you. See the BoinxTV web pages for details.
There are some pre-requisitions before you can start developing layers for BoinxTV:
As a first and easy example we are going to create a basic Quartz Composition and use it as a layer in BoinxTV.
Billboard. You can do so quickly by typing in some leading letters of the patch name in the search field at the bottom of the Patch Library window. This is a Render Patch. It draws an image flat on the output screen.Image with String patch in the Patch Library and drag this over to your editor window. Position it on the right side of the Billboard patch. The Image with String patch is a Generator patch that will generate an image containing a text you can specify with the input value String.Image output of the Image with String patch with the Image input of the Billboard patch.Viewer button in the top right corner. You should see a window with a checkerboard in the background and “Hello World!” in white letters above it.Image with String patch to reveal a context menu for it. Input Splitter will appear on the document which is connected by its output to the input String of the Image With String patch.My Text. Please note that this published input is visible to BoinxTV and will be presented in the parameters view on the left when the layer is selected in BoinxTV.tv_LayerProtocolVersion as the Property, switch the Class option from String to Number and put a 1 into the Value column. (Please read Minimal Implementation down below for more information about this entry)Hello World.qtzLayer Composition Importer window will pop up. Hello World.qtz file previously saved to the Desktop.Imported Hello World.qtzBlank template and hit the Choose button in the lower right corner. A new BoinxTV Document window will show up containing a single Placer layer rendering yourself sitting in front of your computer.Hello World layer you just imported and drag an instance to the top of the layer stack in the middle of the document.My Text and change the text of the input field.Congratulations! You just created a new BoinxTV layer! In the following sections we want to go into the details whats necessary to be a good BoinxTV citizen.
Please note, that we can't explain how to use Quartz Composer Editor in all details in this documentation. If you want to learn more about Quartz Composer please read The Quartz Composer User Guide at the Apple Developer website.
If want to change a build-in BoinxTV layer you can export that layer in BoinxTV by the following steps:
Now that you exported a BoinxTV layer you are able to modify it with the Quartz Composer app by Apple.
Once you are done editing or creating your custom layer you have to import your layer into BoinxTV. There are several ways of importing a layer into BoinxTV:
At the bottom of the window you will see an Import Log which tells you if anything worked out or if BoinxTV is missing something from the layer protocol. Warnings are marked in orange. Failure is show in red. Success is green.
Please restart BoinxTV in order to make the imported layer appear in the layers repository.
This technique is useful when sending out custom layers to other BoinxTV users (e.g. your clients) who are not familiar with manually importing custom layers. It isn't very handy while in development thought, because QuartzCompose won't open the file anymore.
.tvlayer at the end and hit Return. The Finder will ask you if you really want to change the extension. Please accept.Please restart BoinxTV in order to make the imported layer appear in the layers repository.
Because it is tedious to manually import your Quartz Composer Composition into BoinxTV to test it we developed a small AppleScript Droplet which copies the composition to the temp folder, renames it with the .tvlayer extension and installs it by opening it with BoinxTV.
Please restart BoinxTV in order to make the imported layer appear in the layers repository.
(Work in progress)
BoinxTV expect the Quartz Compositions to adopt to the Layer Protocol for BoinxTV layers. In this section you will learn the minimal implementation.
The minimal implementation of the Layer Protocol involves only Quartz Composition Properties which can be edited in the Quartz Composer editor by selecting Editor ⇢ Edit information (⌥⌘I).
You only have to add these keys to the property list:
| Name | Type | Sample Value |
|---|---|---|
| tv_LayerProtocolVersion | Number | 1.2 |
| tv_LayerIdentifier | String | com.example.layer.mylayer |
| tv_LayerVersion | Number (real) | 1.01 |
It is important to know how those values are used by BoinxTV so that BoinxTV can handle layer version conflicts.
com.boinx.layer.*. Please use your own scheme in order to have unique identifiers all over the world. Please note that BoinxTV don't use the file name to compare layers!2.4 vs 2.6) then replace the document layer with the new one.