Video is not rendering in p:media

UI Components for JSF
Post Reply
Ito
Posts: 14
Joined: 26 Feb 2010, 16:41

08 Sep 2010, 20:31

Hi!

I´m trying to play a video from an InputStream (StreamedContent) I´ve checked the video created by the InputStream and it´s play as well. When I try to play it, the video player does not show anything. Just a "blank" screen!

The output HTML rendered is:
output wrote:<embed pluginspage="http://www.adobe.com/go/getflashplayer" src="/it/faces/index.xhtml?primefacesDynamicContent=movieBean.media" type="application/x-shockwave-flash" height="300" width="300"></embed>
Inside my managed bean I have:

Code: Select all

    Dados d;
    StreamedContent media;

    public MovieBean() {
        try {
            DadosDAO dao = new DadosDAO();
            List<Dados> lista = dao.findDadosEntities();
            if (!lista.isEmpty()) {
                d = lista.get(0);
            }
            InputStream is = d.download();
            media = new DefaultStreamedContent(is, "video/x-flv", d.getNome());
        } catch (Exception ex) {
            Logger.getLogger(MovieBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public StreamedContent getMedia() {
        return media;
    }
Using JSF 2.0 Primefaces 2.1 Apache Tomcat.

Any clue will be very welcome! Thanks a lot!

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

08 Sep 2010, 20:52

I remember an issue with flv files, you are trying to play flv right?

http://primefaces.prime.com.tr/forum/vi ... flv#p19543

Ito
Posts: 14
Joined: 26 Feb 2010, 16:41

08 Sep 2010, 22:05

Yes, I did it like the example and worked.

The player capture same screen video from URL, but it´s sound weird for me, there is controller buttons, right?

My video is a InputStream, no error is showed, but i´m still trying. If I find something usefull I post back here! :)

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 49 guests