2 Replies Latest reply on Apr 20, 2011 5:36 AM by Urska V

    MediaOutput for displaying stream of byte[] images

    Urska V Newbie

      I would need some help. I am using mediaOutput with a4j:poll to keep reRendering new images, which are stored in streamedPic property of scenesHelper bean.

       

                                               <a4j:poll id="myPoll" interval="1" 
                                                       enabled="true"
                                                       reRender="pollUpdate"
                                                       ajaxSingle="true"/>
      
                                                 <h:panelGroup id="pollUpdate">                                 
      
                                                                 <a4j:mediaOutput ielement="img" rendered = "#{scenesBean.selectedFile.streamedPic!=null}"
                                                               cacheable="false"
                                                               session="true"
                                                               createContent="#{scenesBean.paintTest}"
                                                               mimeType="image/jpeg">
                                                                <f:param value="#{scenesBean.timeStamp}" name="time" />
                                                                </a4j:mediaOutput>
                                                   </h:panelGroup>
      
      

       

      According to the code, the images should be rerendered every millisecond. But, I get around 2 images per second. The variable streamedPic changes around 20 pic per second, so it must be the problem in mediaOutut or a4j:poll?

      Any clues, hints?