ssaguiar
3 years agoStreaming Star
How to use parenteral control pinpad?
Hi to all
I wish to know where I can find any use example of a parenteral control using pinpad.
In my player I have, in xml:
<DynamicPinPad
id = "parenteralPinPad" />
In the brightscript code I have:
At the start:
m.parenteralPinPad = m.top.findNode("parenteralPinPad")
then, when a channel is for adults, for example, I use:
if (videoGenre = "Adultos")
m.Video.control = "stop"
m.parenteralPinPad.text = ""
showParenteralPinpad()
else
playChannelVideo()
end if
And, in on onKeyEvent:
if (key = "OK") then
if (m.parenteralPinPad.visible = true) then
if (len(m.parenteralPinPad.text) = 4) then
if(m.parenteralPinPad.text = m.global.ParenteralPassword)
m.channelIsAuthorized = true
hideParenteralPinpad()
playVideo()
end if
end if
handled = true
end if
return handled
The parenteral password is located on our server, for each user.
The user can change this password using the Android, the IOS ot the smart TV's - Samsung or LG apps.
I wish to know if it's mandatory to use the Roku device's pin number (in this case how to read it programatically)?
If not, can I use the approach I described above or do I need to implement all the parenteral pin classes and screens in my channel (one to change / update the pin which will be saved in the device's m.global variable)?
Can. you provide some examples and/or tutorials?
Thank you very much