-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am using the html 5 video tag to stream a live m3u8 stream into my ZK page. This works perfectly, the issue I am having is that any ZK callbacks seems to stop the stream.
For example, if the user clicks a ZK Button on the screen - it stops the stream even if the callback for the button has no code in it.
Is there a way I can get my ZK callbacks without it interrupting the stream? Is there a way to put the stream maybe in its own thread inside the zul?
Simple java button callback :
public void onClick$_testButton(Event event) { // Once the callback is made the stream is stopped, I then have to hit play again on the Ipad. }
Here is my zul code :
<zk xmlns:h="http://www.w3.org/1999/xhtml" xmlns:zk="http://www.zkoss.org/2005/zk"> <?page title="Virtual Screen"?> <zscript><![CDATA[ ... More code here that for getting the url passed to the video tag.... ]]> </zscript> <window id="_liveVideoWindow" border="normal" apply="com.dh.ui.ipad.view.video.DHzDirectTVVirtualScreenView" height="1000px" width="100%" xmlns:w="http://www.zkoss.org/2005/zk/client"> <style src="${styleSheet}"/> ...... <html> <video controls="controls" preload="auto" width="100%" height="420px"> <source src="${liveStreamUrl}"/> </video> </html> <button id="_testButton" label="Clicking This stops the stream"/> ... </window> </zk>
I found out what the issue was, I have a javascript call the plays an audio "click" sound whenever a button is pressed. This click was causing the stream to stop playing, as soon as I removed the call to play the click the issue went away.
Asked: 2012-10-22 20:01:17 +0800
Seen: 82 times
Last updated: Oct 23 '12