Lizzy v1.1.1

christophedelory.playlist.asx
Class Event

java.lang.Object
  extended by christophedelory.playlist.asx.Child
      extended by christophedelory.playlist.asx.AsxElement
          extended by christophedelory.playlist.asx.Event
All Implemented Interfaces:
AsxElementContainer

public class Event
extends AsxElement
implements AsxElementContainer

Defines a behavior or action taken by Windows Media Player when it receives a script command labeled as an event. An event is a particular type of script command embedded in a stream sent to the WMP control that consists of a double string. The first string is the word "event", and the second string is the event name. The event name in the second string must match the event name defined in the ASX file (the match is not case-sensitive). Events can be sent to a WMP control receiving a real-time stream, or can be saved in an .asf, .wma, or .wmv file that gets delivered as an on-demand unicast stream. When the WMP control receives the script command, it processes the event as defined by the EVENT element.
This element defines a scope of ENTRY or ENTRYREF elements that are processed whenever the WMP control receives the script command with the named event. The ENTRYREF can be a URL that points to an ASP page. With this element, you can specify a behavior for stream switching in near real-time, as opposed to pre-authored stream changes using references to other pieces of content or ASX files.
When you use ASP pages to generate playlists, you must specify a value for the Response.ContentType property and the Response.expires property in the ASP page because of latency issues with Windows Media Player. The Response.ContentType must be a valid file name extension for Windows Media metafiles. Valid types include .asf, .asx, .wma, .wax, .wmv, and .wvx.
See the Platform SDK for details about using the Response object in ASP.
This element can appear anywhere within the ASX element. If multiple EVENT elements within an ASX element have identical values for their NAME attributes, the WMP control uses the first occurrence within the ASX element, and ignores all others. When EVENT elements have distinct NAME attributes, their order within the ASX element does not matter.
The WMP control discards events it receives while processing another event. Nesting of events is not supported. When Windows Media Player is in preview mode, event content is not constrained by the PREVIEWDURATION element; the full length of event content can play even if the preview duration for the active ENTRY element expires prior to the end of the event.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Event()
           
 
Method Summary
 void addAsxElement(AsxElement asxElement)
          Adds an ASX element to this container.
 List<AsxElement> getAsxElements()
          Returns the list of ASX elements defined in this container.
 String getName()
          Returns the value of the event as created in Windows Media Author.
 String getWhenDone()
          Returns the value that defines what occurs after the referenced event content finishes playing.
 void setName(String name)
          Initializes the value of the event as created in Windows Media Author.
 void setWhenDone(String whenDone)
          Initializes the value that defines what shall be done after playing the referenced content.
 
Methods inherited from class christophedelory.playlist.asx.Child
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Event

public Event()
Method Detail

getName

public String getName()
Returns the value of the event as created in Windows Media Author.

Returns:
a name. Shall not be null.
See Also:
setName(java.lang.String)

setName

public void setName(String name)
Initializes the value of the event as created in Windows Media Author.

Parameters:
name - a name. Shall not be null.
Throws:
NullPointerException - if name is null.
See Also:
getName()

getWhenDone

public String getWhenDone()
Returns the value that defines what occurs after the referenced event content finishes playing. The following values are the possible:
RESUME
The current entry (the clip interrupted by the event) resumes playing. If the content is stored content, it resumes at the same point where it stopped; if the content is broadcast, it resumes at the current position.
NEXT
The next ENTRY element plays as if the event had not occurred and we had reached the end of the current clip.
BREAK
If the current entry is within a REPEAT loop, the loop terminates as if the repeat count had been completed. Otherwise, we jump to the end of the playlist as if the final entry had completed as usual.
Default value is "RESUME".

Returns:
the associated action. Shall not be null.
See Also:
setWhenDone(java.lang.String)

setWhenDone

public void setWhenDone(String whenDone)
Initializes the value that defines what shall be done after playing the referenced content.

Parameters:
whenDone - the associated action. Shall not be null.
Throws:
NullPointerException - if whenDone is null.
See Also:
getWhenDone()

addAsxElement

public void addAsxElement(AsxElement asxElement)
Description copied from interface: AsxElementContainer
Adds an ASX element to this container.

Specified by:
addAsxElement in interface AsxElementContainer
Parameters:
asxElement - an ASX element. Shall not be null
See Also:
AsxElementContainer.getAsxElements()

getAsxElements

public List<AsxElement> getAsxElements()
Description copied from interface: AsxElementContainer
Returns the list of ASX elements defined in this container.

Specified by:
getAsxElements in interface AsxElementContainer
Returns:
a list of ASX elements. May be empty but not null.
See Also:
AsxElementContainer.addAsxElement(christophedelory.playlist.asx.AsxElement)

© 2008-2009 Christophe Delory

Copyright © 2008-2009 Christophe Delory. All Rights Reserved.