Fazer uma PerguntaFazer uma Pergunta
 

RespondidoHow to play flash in MediaElement

  • terça-feira, 9 de janeiro de 2007 7:32publicENEMY Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Hi guys.

     

    Is it possible to play flash in MediaElement? I used k-lite codec to play flash content in media player classic, but somehow, windows media player cannot play flash content(weird). The error is "Windows Media Player cannot play the file because your Internet security settings prohibit the use of ActiveX controls."

     

    Thanks.

Respostas

Todas as Respostas

  • terça-feira, 9 de janeiro de 2007 14:59LesterLobo - MSFTModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    if your intention is just playing flash files you could use the swf-xaml converter http://www.mikeswanson.com/swf2xaml/

     

  • quarta-feira, 10 de janeiro de 2007 1:55publicENEMY Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Thanks for the reply LesterLobo. But my intention is to create a WPF media player(much like media player classic from k-lite codec) that can play almost all types of media available. After installing codecs from k-lite codec, i can play almost all media types that media player classic can play using MediaElement, except flash swf. Actionscript, interactivity, messaging between .net and flash is not a priority at the moment.

     

    Thanks.

  • quarta-feira, 10 de janeiro de 2007 10:30Chimme Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Use the <Page> -control.

    It can display normal html-pages and probably flash-objects as well.

  • segunda-feira, 15 de janeiro de 2007 7:25publicENEMY Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Hi Chimme,

     

    Tried that. But the results are not what I expected. The result are limited like when you do interop(winform or win32). Ie no transparency(using wpf container) etc. I have created a sort of library of flash-activex-winform interop in a wpf container. If you want, I can release it to the community so that if anyone want to do flash in wpf, they can just use the library. Currently i dont have a blog or web space. Any invitation?

     

    Thanks.

  • terça-feira, 16 de janeiro de 2007 13:40LesterLobo - MSFTModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    you could post it on the community site here

    http://wpf.netfx3.com/files/folders/applications/default.aspx

    it would be nice to have your code there

  • quarta-feira, 24 de janeiro de 2007 7:02kalle vanska Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    i'd be also interested in testing your library!

    Thanks

  • sexta-feira, 25 de janeiro de 2008 18:26Code4Fun2000 Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    I am also interested in this library if you are willing to share. Thanks

     

  • sexta-feira, 25 de janeiro de 2008 21:01Jeremiah Morrill Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    If you need to play flash video files (flv), I like ffdshow codec because it seems to be an all in one, play everything type codec. http://ffdshow-tryout.sourceforge.net/

     

    I believe SWF files via media player classic were rendered via a different mechanism than your standard video through directshow and therefore can't be rendered into WPF compositing.

     

    There are a couple options for you.  The one listed above with using WPF interop methods...or my shamelessly plugged WPF/Win32 interop renderer, which will give you interactivity with any win32 control and WPF compositing...There are some performance implications, but you can adjust the "redraw" rate of the control to throttle CPU.

    http://www.codeplex.com/WPFWin32Renderer

     

    -Jer

  • sexta-feira, 25 de janeiro de 2008 21:18Code4Fun2000 Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Thanks for the reply Jer. That is a pretty cool implementation. I don't know if it will do what I am trying to acheive though. I was looking for a way to support swf files on the canvas while maintaining transparency. Is it possible to host the swf file on the canvas without losing tranparency?

  • sexta-feira, 25 de janeiro de 2008 21:31Jeremiah Morrill Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    It can support the same transpency options you have in normal wpf...If you are talking about a per-pixel alpha channel of transparent pixels in the flash swf, I'm not aware of any interop implementation that will do that...but who knows?  Programmers come up with new black magic everyday!  I suppose if the interop solution made use of layered windows and some hackery it could be done...but now I'm just babbling out loud.

     

    -Jer

     

  • segunda-feira, 21 de setembro de 2009 5:59janiv Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    You can host a Flash Player activeX using Crossbow: Embedding and Communicating with the Macromedia Flash Player in WPF
    Janiv Ratson. Technology and Development Expert. | BL: http://blogs.microsoft.co.il/blogs/janiv/ | LI: http://www.linkedin.com/in/janiv | TW: http://twitter.com/janiv