3

I am using SMF silverlight media player. I am using the following code to get me the current volume on player

this.item = function(){
        alert(this.player.GetVolume());
    }

which works fine but I also want the current status of the media. Whats the property for that. I didn't see that in API docs

thanks

iCollect.it Ltd
  • 92,391
  • 25
  • 181
  • 202
Asim Zaidi
  • 27,016
  • 49
  • 132
  • 221

1 Answers1

1

I believe you want the PlayState property, which is of type MediaPluginState and can be one of these values:

  • Closed
  • Opening
  • Buffering
  • Playing
  • Paused
  • Stopped
  • Individualizing
  • AcquiringLicense
  • ClipPlaying
CodeNaked
  • 40,753
  • 6
  • 122
  • 148
  • 1
    @Autolycus - I'm not sure of the JavaScript code to access it, but in C# it would be 'this.player.PlayState == MediaPluginState.Closed`. I don't see a `GetVolume` method in the latest version of SMF, which can be found [here](http://smf.codeplex.com/). – CodeNaked Jun 29 '11 at 01:13
  • there is a VolumeLevel property - btw, from my OnApplyTemplate override at a SMFPlayer descendent I call protected void UpdateVolumeElement() { if (VolumeElement != null) VolumeElement.VolumeLevel = VolumeLevel; } since it seems the UI element doesn't update the volume UI at startup with the VolumeElement value set to the player at XAML – George Birbilis Jun 14 '15 at 12:16