Partager via


filter Element

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The filter element contains elements that limit the size of a playlist, duration of a playlist, or number of media items in a playlist.

<filter
    type = "string"
    id = "WPL_GUID"
    name = "string"
>
</filter>
            

Attributes

type

The type of filter object. There are no predefined values for this attribute.

id (required)

The GUID that uniquely identifies a filter object. The filter object's methods are invoked to interpret the fragment elements contained in the filter element.

Value Description
{BC5E21B0-504C-46F6-82BF-FB975C911AD6} The id for the "Microsoft Auto Playlist Filter -- Limits auto playlists by count, size or duration" filter.

name (required)

The name of the filter object.

Value Description
Microsoft Auto Playlist Filter -- Limits auto playlists by count, size or duration Limits auto playlists by count, size, or duration.

Parent/Child Elements

Hierarchy Elements
Parent smartPlaylist
Child fragment

Remarks

The filter element does not add any media elements to a playlist; it simply removes or filters out content that was selected by the sourceFilter element.

Examples

<filter 
    type = "smartFilterObject" 
    id = "{BC5E21B0-504C-46F6-82BF-FB975C911AD6}" 
    name = "Microsoft Auto Playlist Filter -- Limits auto playlists by count,size or duration">
        <fragment name = "Limit Number of Items">
            <argument name = "number">25</argument>
        </fragment>
</filter>

Requirements

Requirement Value
Version
Windows Media Player 9 Series or later.

See also

argument Element

fragment Element

smartPlaylist Element

sourceFilter Element

Windows Media Playlist Elements Reference