/// <summary> /// Plays media from the current position. /// </summary> public void Play() { if (INTERNAL_VisualTreeManager.IsElementInVisualTree(this)) { if (_mediaElement != null) { INTERNAL_HtmlDomManager.CallDomMethod(_mediaElement, "play"); } else if (_mediaElement_ForAudioOnly_ForSimulatorOnly != null) { _mediaElement_ForAudioOnly_ForSimulatorOnly.Play(); } } }
///// <summary> ///// Occurs when the value of the CurrentState property changes. ///// </summary> //public event RoutedEventHandler CurrentStateChanged; ///// <summary> ///// Occurs when the MediaElement is no longer playing audio or video. ///// </summary> //public event RoutedEventHandler MediaEnded; ///// <summary> ///// Occurs when there is an error associated with the media Source. ///// </summary> //public event ExceptionRoutedEventHandler MediaFailed; ///// <summary> ///// Occurs when the media stream has been validated and opened, and the file ///// headers have been read. ///// </summary> //public event RoutedEventHandler MediaOpened; ///// <summary> ///// Occurs when the value of the Volume property changes. ///// </summary> //public event RoutedEventHandler VolumeChanged; /// <summary> /// Returns an enumeration value that describes the likelihood that the current /// MediaElement and its client configuration can play that media source. /// </summary> /// <param name="type">A string that describes the desired type as a string.</param> /// <returns> /// A value of the enumeration that describes the likelihood that the current /// media engine can play the source. /// </returns> public MediaCanPlayResponse CanPlayType(string type) { string canplay = INTERNAL_HtmlDomManager.CallDomMethod(_mediaElement, "canPlayType", type).ToString(); return(ConvertHtmlCanPlayTypeResult(canplay)); }