private void btnVal_Click(object sender, System.EventArgs e) { double Seek; Seek = ourAudio.CurrentPosition; txtVal.Text = Seek.ToString(); }
public void WriteXml(System.Xml.XmlWriter writer) { writer.WriteStartElement("item", Properties.Resources.CasparPlayoutSchemaURL); writer.WriteAttributeString("clipname", Clipname); writer.WriteAttributeString("videoLayer", VideoLayer.ToString()); writer.WriteAttributeString("seek", Seek.ToString()); writer.WriteAttributeString("length", Length.ToString()); writer.WriteAttributeString("loop", Loop.ToString()); writer.WriteStartElement("transition"); writer.WriteAttributeString("type", Transition.Type.ToString()); writer.WriteAttributeString("duration", Transition.Duration.ToString()); writer.WriteEndElement(); writer.WriteEndElement(); }
/// <summary> /// Seek a new postion. /// Seek to some place in the movie. /// Seek.Relative is a relative seek of +/- value seconds (default). /// Seek.Percentage is a seek to value % in the movie. /// Seek.Absolute is a seek to an absolute position of value seconds. /// </summary> /// <param name="value"></param> /// <param name="type"></param> public void Seek(int value, Seek type) { Debug.WriteLine(DateTime.Now.ToLongTimeString() + " MPLAYER Seek. {1} type, {0} seconds", value, type.ToString()); MediaPlayer.StandardInput.WriteLine(string.Format("pausing_keep_force seek {0} {1}", value, (int)type)); MediaPlayer.StandardInput.Flush(); }
/// <summary> /// Seek a new postion. /// Seek to some place in the movie. /// Seek.Relative is a relative seek of +/- value seconds (default). /// Seek.Percentage is a seek to value % in the movie. /// Seek.Absolute is a seek to an absolute position of value seconds. /// </summary> /// <param name="value"></param> /// <param name="type"></param> public void Seek(int value, Seek type) { _mpv.DoMpvCommand("seek", value.ToString(CultureInfo.InvariantCulture), type.ToString().ToLower()); }