How Does the Subtype Attribute Customize SMIL Wipe Transitions?

The subtype attribute in Synchronized Multimedia Integration Language (SMIL) refines standard transition elements by specifying the exact direction, pattern, starting point, and orientation of visual wipe effects. While the primary type attribute defines the overarching geometric family of a transition—such as barWipe, irisWipe, or clockWipe—the subtype attribute controls the precise mechanics of how the transition reveals or conceals media elements on screen.

The Role of Transitions in SMIL

SMIL includes a dedicated transition module that standardizes how visual transitions execute across multimedia presentations. The primary element used to define these effects is <transition>.

A standard transition definition incorporates several key attributes:

Directional Control in Linear Bar Wipes

The standard barWipe transitions from one media item to another along a straight linear axis. Without a subtype, a player defaults to a predefined direction, but explicitly setting the subtype allows developers to orient the wipe along any primary axis:

For split-bar wipes where multiple bands move concurrently, subtypes like vertical or horizontal create opposing movements originating simultaneously from center outward or edges inward.

Shaping Iris and Shape-Based Wipes

For shape-based wipe patterns like irisWipe or triangleWipe, the subtype attribute modifies geometric orientation and growth origins:

Rotational and Clock Wipes

Radial and rotational wipe families, such as clockWipe or fanWipe, rely heavily on the subtype attribute to establish the anchor point and angular trajectory of the wipe sweep:

Implementation Syntax

A basic SMIL implementation defines the transition in the <head> section using type and subtype, then applies that transition to a visual asset in the <body> layout:

<smil xmlns="http://www.w3.org/ns/SMIL">
  <head>
    <layout>
      <root-layout width="640" height="480"/>
      <region id="mainRegion" top="0" left="0" width="640" height="480"/>
    </layout>
    <transition id="wipeRight" 
                type="barWipe" 
                subtype="leftToRight" 
                dur="1.5s"/>
  </head>
  <body>
    <seq>
      <img src="slide1.jpg" region="mainRegion" dur="5s"/>
      <img src="slide2.jpg" region="mainRegion" dur="5s" transIn="wipeRight"/>
    </seq>
  </body>
</smil>

By isolating visual mechanics into the subtype property, SMIL decouples geometric algorithms from motion parameters, allowing developers to configure granular SMPTE-compliant video transitions directly through declarative XML markup.