Prezados,
Executo o seguinte código no Ginga-NCL Virtual Set-top Box e no Ginga-Ncl player, mas só funciona no Ginga-Ncl Player.
<?xml version="1.0" encoding="ISO-8859-1"?>
<ncl id="nclTVestibular" xmlns="http://www.ncl.org.br/NCL3.0/EDTVProfile">
<head>
<regionBase>
<region id="rgFullScreen">
<region id="rgTv" width="765" height="500" zIndex="3"/>
</region>
</regionBase>
<descriptorBase>
<descriptor id="dTv" region="rgTv" focusIndex="0"/>
</descriptorBase>
</head>
<body>
<port id="pIntro" component="lua"/>
<media id="lua" src="test.lua" descriptor="dTv"/>
</body>
</ncl>
______________________________________________________________________________
local img = canvas:new("back.png")
function redraw()
canvas:compose(0, 0, img)
canvas:flush()
end
function handler(evt)
redraw()
if evt.class == 'key' and evt.type == 'press' then
-- movimento do cursor. apenas as setas movem o cursor
if evt.key == 'CURSOR_UP' then
canvas:drawText(20, 30, "CURSOR_UP") -- canvas:drawText("CURSOR_UP", 20, 30)
-- para o Set-top-box
elseif evt.key == 'CURSOR_DOWN' then
canvas:drawText(20, 30, "CURSOR_DOWN")
elseif evt.key == 'CURSOR_LEFT' then
canvas:drawText(20, 30, "CURSOR_left")
elseif evt.key == 'CURSOR_RIGHT' then
canvas:drawText(20, 30, "CURSOR_R")
end
end
end
event.register(handler)
Alguém sabe qual é o problema?
Autor: Laécio Freitas
1Um comentário
<bindParam name="var" value="8"/>
</bind>
. Agora o problema é como retornar o controle para o formatador. Fiz isso no nclua, event.post('out', {class='ncl', type='presentation', area='voltar',transition='starts'})
event.post('out', {class='ncl', type='presentation', area='voltar',transition='stops'})
event.post('out', {class='ncl', type='presentation', transition='stops'}) _______________________________________________________________________________ Isso no NCL <link xconnector="onBeginStartNSetN">
<bind role="onBegin" component="lua" interface="voltar"/>
<bind role="start" component="background"/>
<bind component="programSettings" role="set" interface="service.currentKeyMaster">
<bindParam name="var" value="8"/> <! 8 é o focusindex da mídia principal no ncl-->
</bind>
<bind component="programSettings2" role="set" interface="service.currentFocus">
<bindParam name="var" value="1"/> <!-- MENU 1-->
</bind> voltou para o formatador, mais continua a executar os eventos do nclua quando eu clico em alguma tecla (CURSOR_UP).... Estou usando o Ginga-NCL Virtual Set-top Box1 Alguém sabe resolver esse problema!