SLIDER.foregroundProgress

[与此页面关联的功能(Windows 媒体播放器 SDK)是旧版功能。 它已被 MediaPlayer 取代。 MediaPlayer 已针对Windows 10和Windows 11进行了优化。 如果可能,Microsoft 强烈建议新代码使用 MediaPlayer 而不是 Windows 媒体播放器 SDK。 如果可能,Microsoft 建议重写使用旧 API 的现有代码以使用新 API。]

foregroundProgress 属性指定或检索前台进度栏的当前位置,占滑块区域的百分比。

        elementID.foregroundProgress

可能的值

此属性是从 0 到 100 的可读/写 number (浮点 数) 。

备注

此属性主要用于跟踪媒体文件的下载进度,同时使用 value 属性跟踪文件的当前播放位置。 滑块拇指的位置限制在前台进度的区域。 这允许仅在下载文件的可用部分中进行交互式查找。

若要使用此功能, useForegroundProgress 属性必须设置为 true。

示例

<SLIDER
  id="seek"
  backgroundColor="blue"
  foregroundColor="red"
  thumbImage="seekthumb.bmp"
  min="0"
  max="wmpprop:player.currentMedia.duration"
  value="wmpprop:player.controls.currentPosition"
  useForegroundProgress="true"
  foregroundProgress="wmpprop:player.network.downloadProgress"
  ondragend="player.controls.currentposition=value"
/>

要求

要求
版本
Windows 媒体播放器版本 7.0 或更高版本

另请参阅

SLIDER 元素

SLIDER.min

SLIDER.max

SLIDER.useForegroundProgress

SLIDER.value