Commentaires sur : [WPF] S’amuser avec le MediaElement sous WPF https://sebastien.warin.fr/2006/10/21/68-wpf-mediaelement/ Le blog personnel et technique de Sébastien Warin, Chief Technology Officer (CTO) & Creative Technologist Wed, 19 Jan 2011 09:21:04 +0000 hourly 1 https://wordpress.org/?v=5.9.12 Par : souma https://sebastien.warin.fr/2006/10/21/68-wpf-mediaelement/#comment-3473 Wed, 19 Jan 2011 09:21:04 +0000 https://sebastien.warin.fr/?p=202#comment-3473 merci bcp, ça m’a aidé !!!

]]>
Par : alt157 https://sebastien.warin.fr/2006/10/21/68-wpf-mediaelement/#comment-3160 Fri, 22 May 2009 07:51:11 +0000 https://sebastien.warin.fr/?p=202#comment-3160 Bonjour,

je trouve l article très intéressant, vraiment bien fait.

Et pour répondre à Matthieu personnellement je créerai le fichier de facon temporaire sur le DD puis je le lirai et a la fin du media je le supprime.

Un petit exemple avec un mp3 :

[code]

string path = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @ »\test.mp3″;

private void Window_Loaded(object sender, RoutedEventArgs e)
{
// recopie le fichier dans les ressources sur le DD
System.IO.File.WriteAllBytes(path, Properties.Resources._04___Entities);
mediaElement1.Source = new Uri(path);
mediaElement1.LoadedBehavior = MediaState.Play;
}

private void mediaElement1_MediaEnded(object sender, RoutedEventArgs e)
{
// libere les ressources
mediaElement1.LoadedBehavior = MediaState.Close;
// supprime le fichier du DD
System.IO.File.Delete(path);
}

[/code]

J espere que cela t aidera.

Merci encore pour l article 🙂

]]>
Par : Mathieu https://sebastien.warin.fr/2006/10/21/68-wpf-mediaelement/#comment-3147 Sun, 03 May 2009 14:12:50 +0000 https://sebastien.warin.fr/?p=202#comment-3147 Bonjour,

Article très intéressant !

Quelqu’un a-t-il une solution pour jouer un son/vidéo depuis un fichier lié dans les ressources de l’application ?

merci d’avance.

]]>
Par : xxx https://sebastien.warin.fr/2006/10/21/68-wpf-mediaelement/#comment-3140 Tue, 24 Mar 2009 09:19:25 +0000 https://sebastien.warin.fr/?p=202#comment-3140 Merci !

Ça m’as bien servi à moi aussi 🙂

]]>
Par : Leclercq Jean-Christophe https://sebastien.warin.fr/2006/10/21/68-wpf-mediaelement/#comment-3125 Sat, 21 Feb 2009 23:05:58 +0000 https://sebastien.warin.fr/?p=202#comment-3125 Thx !
Ca m’a bien servi pour me faire mon petit player :p

]]>