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:
Inside my managed bean I have: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>
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;
}
Any clue will be very welcome! Thanks a lot!