native video won't respond to touch events

Just wondering if anyone else has encountered this problem of if I am doing something stupid.

I can’t get native video objects to respond to touch events.

In my code below, the xxx fucntion is not called when the video object is clicked/touched.

(Note however, if I uncomment the Runtime event listener, then function yyy is called, even when the video is clicked).

[code]
function xxx(event)
print(“In xxx().”);
return true;
end – function
function yyy(event)
print(“In yyy().”);
end – function
local teddyVid = native.newVideo(0, 0, 1050, 576);
teddyVid:load(“saoirse_short_from_qtime_iPad.m4v”);

teddyVid:addEventListener(“touch”, xxx);

teddyVid:play();

Runtime:addEventListener(“touch”, yyy);
[/code] [import]uid: 133169 topic_id: 32412 reply_id: 332412[/import]

Hi,
I don’t think native videos can respond to touch events. If you have a full screen video and want to “tap to cancel”, use the Runtime touch listener like you have. Otherwise, if you have a partial-screen video, you can build other controls behind/around it, or use other programmatic methods to control the video playback.

Best regards,
Brent [import]uid: 9747 topic_id: 32412 reply_id: 128906[/import]

Thanks, I suspected as much.

That’s a good idea about having an object behind the video.

Stephen. [import]uid: 133169 topic_id: 32412 reply_id: 128927[/import]

Hi,
I don’t think native videos can respond to touch events. If you have a full screen video and want to “tap to cancel”, use the Runtime touch listener like you have. Otherwise, if you have a partial-screen video, you can build other controls behind/around it, or use other programmatic methods to control the video playback.

Best regards,
Brent [import]uid: 9747 topic_id: 32412 reply_id: 128906[/import]

Thanks, I suspected as much.

That’s a good idea about having an object behind the video.

Stephen. [import]uid: 133169 topic_id: 32412 reply_id: 128927[/import]