How Does SMIL Communicate State to a Server?

Synchronized Multimedia Integration Language (SMIL) communicates client-side runtime state back to an authoring or backend server primarily through the SMIL StateSubmission Module introduced in the SMIL 3.0 specification. By coupling an internal XML data model with declarative submission elements—specifically <submission> and <send>—a SMIL presentation can capture user inputs, track playback progress, and transmit structured data over protocols such as HTTP without requiring custom scripting.

The SMIL 3.0 State Architecture

In earlier versions of SMIL, presentations were predominantly unidirectional. Player runtimes evaluated static switch conditions or local system metrics, but they lacked a standardized way to modify and persist internal variables. SMIL 3.0 introduced dedicated State modules—drawing inspiration from XForms and XPath—to allow dynamic state handling:

The Core Submission Elements

State transmission relies on two coordinating elements: <submission> and <send>.

1. The <submission> Element

Declared within the document's <head> or state declaration area, the <submission> element specifies the connection parameters for the external endpoint:

2. The <send> Element

While <submission> defines how and where data travels, the <send> element defines when the submission occurs. Because <send> participates directly in SMIL's timing engine, submissions can be scheduled precisely or tied to interactive user triggers:

<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
  <head>
    <state language="http://www.w3.org/2007/SPARQL">
      <data xmlns="">
        <score>85</score>
        <completed>true</completed>
      </data>
    </state>
    <submission id="submitScore"
                action="https://example.com/api/progress"
                method="post"
                replace="none" />
  </head>
  <body>
    <par>
      <!-- Media playback and user interaction -->
      <video src="lesson.mp4" id="lessonVideo" />
      
      <!-- Trigger submission when video reaches the end -->
      <send submission="submitScore" begin="lessonVideo.end" />
    </par>
  </body>
</smil>

Practical Applications of State Communication

By combining <state>, <setvalue>, and <send>, SMIL presentations maintain a continuous feedback loop with authoring servers: