Lizzy v1.1.1

christophedelory.playlist.asx
Class Reference

java.lang.Object
  extended by christophedelory.playlist.asx.Child
      extended by christophedelory.playlist.asx.AsxElement
          extended by christophedelory.playlist.asx.URLElement
              extended by christophedelory.playlist.asx.Reference

public class Reference
extends URLElement

Specifies an URL for a piece of digital media content. The URL can point to any media type supported, using any protocol supported by the WMP control.
The media types supported include still images such as .gif and .jpg images and Flash files with an .swf file name extension. These media types are useful for including advertising content within a playlist. With image files and Flash files that play in a loop, you must also specify the amount of time to display the media item by including a DURATION element within the REF element. If you want an image to continue displaying while the next entry in the playlist is buffered, include a PARAM element within the ENTRY element, set its name attribute to ShowWhileBuffering, and set its value attribute to true.
To reference content on a CD or a DVD that allows it, the wmpcd and wmpdvd protocols are provided. For example, setting the HREF attribute to "wmpdvd://f/5/3" will play chapter 3 of title 5 on a DVD, but only if the DVD has been authored to allow it.
Applications that open digital media from behind a firewall will have better performance when opening the media items if the address is specified using the domain name server (DNS) name instead of the IP address.
The most common use of this element is for URL rollover. If the WMP control is unable to open a piece of media defined in a REF element, it tries the URL in the next REF element. Once the WMP control opens media content from a URL defined within the scope of one ENTRY element, it ignores subsequent REF tags within that ENTRY element. After the piece of content is done playing, the WMP control moves on to the next ENTRY element, if any.
Important: once the WMP control establishes a connection to a referenced piece of content, it ignores all other REF elements in that ENTRY, whether the connection terminates normally or abnormally.
If the media item referenced is an image file, the DURATION element must be used to specify the display time for the image.
Note: attempting to play Flash media that includes sound with the first frame may yield unexpected results. You should author Flash content to play sound starting no earlier than the second frame.
Windows Media Player version 7.0 or later.

Version:
$Revision: 92 $
Author:
Christophe Delory

Constructor Summary
Reference()
           
 
Method Summary
 Duration getDuration()
          Returns the length of time the WMP control will render a stream.
 Marker getEndMarker()
          Returns the marker at which Windows Media Player ends rendering the stream.
 PreviewDuration getPreviewDuration()
          Returns the preview duration.
 Marker getStartMarker()
          Returns the marker at which Windows Media Player starts rendering the stream.
 Duration getStartTime()
          Returns the start time of this reference.
 void setDuration(Duration duration)
          Initializes the length of time the stream will be rendered.
 void setEndMarker(Marker endMarker)
          Initializes the marker at which Windows Media Player ends rendering the stream.
 void setPreviewDuration(PreviewDuration previewDuration)
          Initializes the preview duration.
 void setStartMarker(Marker startMarker)
          Initializes the marker at which Windows Media Player starts rendering the stream.
 void setStartTime(Duration startTime)
          Initializes the start time of this reference.
 
Methods inherited from class christophedelory.playlist.asx.URLElement
getHref, setHref
 
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

Reference

public Reference()
Method Detail

getDuration

public Duration getDuration()
Returns the length of time the WMP control will render a stream. A DURATION element defined within a REF element overrides one that appears within the REF element's parent ENTRY element.

Returns:
a duration. May be null.
See Also:
setDuration(christophedelory.playlist.asx.Duration)

setDuration

public void setDuration(Duration duration)
Initializes the length of time the stream will be rendered.

Parameters:
duration - a duration. May be null.
See Also:
getDuration()

getPreviewDuration

public PreviewDuration getPreviewDuration()
Returns the preview duration.

Returns:
a preview duration. May be null.
See Also:
setPreviewDuration(christophedelory.playlist.asx.PreviewDuration)

setPreviewDuration

public void setPreviewDuration(PreviewDuration previewDuration)
Initializes the preview duration.

Parameters:
previewDuration - a preview duration. May be null.
See Also:
getPreviewDuration()

getStartTime

public Duration getStartTime()
Returns the start time of this reference. Defines a time index into the content from which the stream must play. This element can be used only with stored, on-demand content that has been indexed.

Returns:
a start time. May be null.
See Also:
setStartTime(christophedelory.playlist.asx.Duration)

setStartTime

public void setStartTime(Duration startTime)
Initializes the start time of this reference.

Parameters:
startTime - a start time. May be null.
See Also:
getStartTime()

getStartMarker

public Marker getStartMarker()
Returns the marker at which Windows Media Player starts rendering the stream. A STARTMARKER element defined within a REF element takes precedence over a STARTMARKER element defined within the REF element's parent ENTRY element. A STARTMARKER element also takes precedence over a STARTTIME element. If the marker specified by a STARTMARKER element occurs later in the stream than the marker defined by an ENDMARKER element, no content plays, but no error is generated.

Returns:
a start marker. May be null.
See Also:
setStartMarker(christophedelory.playlist.asx.Marker)

setStartMarker

public void setStartMarker(Marker startMarker)
Initializes the marker at which Windows Media Player starts rendering the stream.

Parameters:
startMarker - a start marker. May be null.
See Also:
getStartMarker()

getEndMarker

public Marker getEndMarker()
Returns the marker at which Windows Media Player ends rendering the stream. In preview mode, reaching an end marker stops the preview, even if the time specified by the PREVIEWDURATION element has not elapsed. The ENDMARKER element takes precedence over the DURATION element. If the ENDMARKER is hit before the time specified by DURATION has elapsed, playback will end. An ENDMARKER element defined within a REF element takes precedence over an ENDMARKER defined within the REF element's parent ENTRY element. If the marker specified by an END MARKER element occurs earlier in the stream than the marker defined by a STARTMARKER element, no content plays, but no error is generated.

Returns:
an end marker. May be null.
See Also:
setEndMarker(christophedelory.playlist.asx.Marker)

setEndMarker

public void setEndMarker(Marker endMarker)
Initializes the marker at which Windows Media Player ends rendering the stream.

Parameters:
endMarker - an end marker. May be null.
See Also:
getEndMarker()

© 2008-2009 Christophe Delory

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