- Display an annotation when a viewer clicks on a different annotation
- Display an annotation when the viewer gets a quiz question right or wrong
- Display an annotation based on a parameter passed in from an external API
Adding a display rule
To add a display rule to an annotation, follow these steps.
- Login to Brightcove Interactivity Studio.
- In the left navigation, click Manage.
- Click on a project to open it.
- In the list of annotations, locate the annotation and click the edit icon ().
- In the Edit menu, click More...
- Click Display Rule.
- Enter the display rule. The expression entered in this dialog will be evaluated prior to rendering the annotation.
- Click .
- Click Done.
Display rule syntax
Testing for a set variable
[variable name] eg.
This is the same as writing
my_var=true. This will be true if the resolved variable is defined and it’s value is not false
[variable name]=="value" eg.
This will be true only if the resolved variable is exactly equal to the string value between the single quotes
Testing for correct quiz answers
[quiz variable name]_correct eg.
This will be true only if the resolved variable is equal to the correct answer of the quiz question
Testing for incorrect quiz answers
[quiz variable name] && ![quiz variable name]_correct eg.
This will be true only if the resolved variable is NOT equal to the correct answer of the quiz question.
Here's a basic example. Clicking on one annotation will make another appear.
The image and text annotations are configured with the same start and end times.
orange) is set to
true. For example, here is the display rule for the orange.
This will cause the orange image overlay to only display when the variable
orange = true.
The text overlay Click here to change the image to display an orange is configured with a display rule to display when
apple = true. The Link setting is configured to switch the variables when clicked.
So clicking the text will set
true which will make the alternate text overlay and orange image both appear.