Share via


syncEvent

banner art

Previous Next

syncEvent

The syncEvent attribute sends a playlist synchronization event from the shared playlist for a broadcast publishing point to the wrapper playlist for the publishing point.

Syntax

  Eventsync-value ::= (Eventsync-name "." Time-symbol ) (S ("+") S Clock-value)?
  Eventsync-name ::= Event name 
  Time-symbol ::= "begin" | "end"
  Clock-value ::= (Full-clock-value | Partial-clock-value | Timecount-value)
  Full-clock-value ::= Hours ":" Minutes ":" Seconds ("." Fraction)?
  Partial-clock-value ::= Minutes ":" Seconds ("." Fraction)?
  Timecount-value ::= Timecount ("." Fraction)? (Metric)?
  Metric ::= "h" | "min" | "s" |"ms"
  Hours ::= DIGIT+; any positive number
  Minutes ::= 2DIGIT; any range from 00 to 59
  Seconds ::= 2DIGIT: range from 00 to 59
  Fraction ::= DIGIT+
  Timecount ::= DIGIT+
  2DIGIT ::= DIGIT DIGIT
  DIGIT ::= (0-9)

Remarks

This is a Microsoft extension to SMIL 2.0.

The WMS SMIL Playlist Parser plug-in enforces case sensitivity on the syncEvent attribute.

The syncEvent attribute can be used only to coordinate media elements between the shared playlist of a broadcast publishing point and a wrapper playlist. When a shared playlist element with this attribute becomes active, the server sends the synchronization event identified by the attribute to the wrapper playlist. A media element in a wrapper playlist can respond to the event by using the event name in a begin or end attribute. If you are using the begin attribute, the media element must be inside of an excl time container. It cannot be inside of a seq time container because seq allows only positive offset values to be used with the begin attribute rather than offsets tied to the syncEvent. For more information about shared and wrapper playlist objects, see Playlist Basics.

  • Note   The IWMSPlaylist::FireEvent method can be used to raise an event to which any type of server-side playlist can respond. The syncEvent attribute can be used only to coordinate media elements between a shared playlist on a broadcast publishing point and a wrapper playlist.
  • Note   The syncEvent attribute does not function as expected if the publishing point is configured to start when a client connects and there is only one connected client. The administrator must, in this case, manually start the publishing point before the client connects.

Example Code

You can use the syncEvent attribute to deliver targeted advertisements. For example, assume that a broadcast publishing point has the following shared playlist.

<?wsx version="1.0"?>
<smil>
  <excl>
    <media id = "Shared1" src="https://encoder:8080" syncEvent="NationalAd" />
    <media id = "Shared2" src="Movie.wmv" begin="Shared1.end + 30s" />
  </excl>
</smil>

Assume also that the publishing point has the following wrapper playlist.

<?wsx version="1.0"?>
<smil>
  <excl>
     <priorityClass peers="pause">
       <media id = "Wrapper1" begin="0" src="%RequestedURL%" />
       <media id = "Wrapper2" src=" LocalAd.wmv " begin="NationalAd.end"  />
     </priorityClass>
  </excl>
</smil>

In this example, a national advertisement is streamed from an encoder, and a local advertisement is specified in the wrapper playlist. When the national advertisement identified by the Shared1 media element ends, LocalAd.wmv is played. Movie.wmv starts 30 seconds after the national advertisement ends. LocalAd.wmv plays in the interval between the end of the national advertisement and the start of Movie.wmv.

When the Shared1 media element becomes active, the server sends the NationalAd event to the wrapper playlist. Because the begin attribute for the Wrapper2 media element is set to "NationalAd.end", LocalAd.wmv starts when the media element associated with the syncEvent ends. That is, LocalAd.wmv starts when the national advertisement ends. To specify that LocalAd.wmv start when the national advertisement begins, you can specify the Wrapper2 media element in the following manner.

<media id="Wrapper2" src="Ad1.wmv" begin="NationalAd.begin" dur="30s" />

The peers attribute for the priorityClass element in the wrapper playlist is set to "pause" to indicate that Wrapper1 resumes when Wrapper2 ends.

To download and play a custom playlist from an ASP page, you can add a media element similar to the following.

<media id="Wrapper2" src="httpd://server_name/local_ad.asp" 
      begin="LocalAd.end" dur="30s" />

For more information about customizing and downloading playlists, see Downloading a Playlist from a Web Server.

See Also

Previous Next