David Blume commited on 2020-03-07 16:27:45
Showing 6 changed files, with 41 additions and 37 deletions.
... | ... |
@@ -3,6 +3,16 @@ |
3 | 3 |
dxb Channel is a test [channel for Roku devices](https://sdkdocs.roku.com/display/sdkdoc/SceneGraph+Samples). |
4 | 4 |
It uses SceneGraph and the BrightScript language. |
5 | 5 |
|
6 |
+## Getting The Channel |
|
7 |
+ |
|
8 |
+This is the private channel code: **[dxb](https://my.roku.com/add/dxb)** |
|
9 |
+ |
|
10 |
+Clicking the link will take you directly to a confirmation page for getting the channel. |
|
11 |
+ |
|
12 |
+## Preview |
|
13 |
+ |
|
14 |
+![dxb channel screenshot](http://dlma.com/images/dxb_channel/dxb_screenshot.jpg) |
|
15 |
+ |
|
6 | 16 |
# Getting the project |
7 | 17 |
|
8 | 18 |
You can get a copy of this project by clicking on the |
... | ... |
@@ -76,6 +76,7 @@ function onUpdateText() as void |
76 | 76 |
else |
77 | 77 |
m.updates.text = m.updates.text + chr(10) + m.myTask.updateText |
78 | 78 |
end if |
79 |
+ print m.myTask.updateText |
|
79 | 80 |
end function |
80 | 81 |
|
81 | 82 |
function onUpdateTextLower() as void |
... | ... |
@@ -87,8 +88,8 @@ function updateTextLower(s as String) as void |
87 | 88 |
m.updates_lower_array.Shift() |
88 | 89 |
end while |
89 | 90 |
m.updates_lower_array.Push(s) |
90 |
- |
|
91 | 91 |
m.updates_lower.text = m.updates_lower_array.Join(chr(10)) |
92 |
+ print s |
|
92 | 93 |
end function |
93 | 94 |
|
94 | 95 |
function onUpdateTextRight() as void |
... | ... |
@@ -97,6 +98,7 @@ function onUpdateTextRight() as void |
97 | 98 |
else |
98 | 99 |
m.updates_right.text = m.updates_right.text + chr(10) + m.myTask.updateTextRight |
99 | 100 |
end if |
101 |
+ print m.myTask.updateTextRight |
|
100 | 102 |
end function |
101 | 103 |
|
102 | 104 |
function onKeyEvent(key as String, press as Boolean) as Boolean |
... | ... |
@@ -98,6 +98,22 @@ |
98 | 98 |
vertAlign="top" |
99 | 99 |
wrap="true" /> |
100 | 100 |
</Rectangle> |
101 |
+ <Label id="merch" |
|
102 |
+ text="Source code and more at dblu.me/dxb" |
|
103 |
+ width="810" |
|
104 |
+ height="50" |
|
105 |
+ translation = "[970,990]" |
|
106 |
+ horizAlign="right" |
|
107 |
+ vertAlign="top" |
|
108 |
+ color = "0x52C7F880" |
|
109 |
+ wrap="true" /> |
|
110 |
+ <Poster |
|
111 |
+ id="qr" |
|
112 |
+ uri="pkg:/images/qr_87.png" |
|
113 |
+ width="60.0" |
|
114 |
+ height="60.0" |
|
115 |
+ blendColor="0x60C0FF10" |
|
116 |
+ translation="[1790,960]" /> |
|
101 | 117 |
|
102 | 118 |
<Timer |
103 | 119 |
id = "textTimer" |
... | ... |
@@ -29,7 +29,6 @@ function executeTask() as void |
29 | 29 |
for each key in aaRunParams |
30 | 30 |
val = aaRunParams[key] |
31 | 31 |
m.top.updateText = key + " = " + val.ToStr() |
32 |
- print "roAppManager.runParams " key " = " val |
|
33 | 32 |
end for |
34 | 33 |
|
35 | 34 |
deviceInfo = CreateObject("roDeviceInfo") |
... | ... |
@@ -47,12 +46,14 @@ function executeTask() as void |
47 | 46 |
success = deviceInfo.EnableCodecCapChangedEvent(true) |
48 | 47 |
if not success then m.top.updateTextLower = "EnableCodecCapChangedEvent failure" |
49 | 48 |
|
50 |
- |
|
49 |
+ ' |
|
50 |
+ ' This is a good place to experiment. |
|
51 |
+ ' Here, we print the GetConnectionInfo AssociativeArray. |
|
52 |
+ ' |
|
51 | 53 |
aaConnectionInfo = deviceInfo.GetConnectionInfo() |
52 | 54 |
for each key in aaConnectionInfo |
53 | 55 |
val = aaConnectionInfo[key] |
54 | 56 |
m.top.updateTextRight = key + " = " + val.ToStr() |
55 |
- print "roDeviceInfo.ConnectionInfo " key " = " val |
|
56 | 57 |
end for |
57 | 58 |
|
58 | 59 |
while(true) |
... | ... |
@@ -64,52 +65,27 @@ function executeTask() as void |
64 | 65 |
if msgType = "roHdmiStatusEvent" |
65 | 66 |
aa = msg.GetInfo() |
66 | 67 |
v = aa.LookupCI("Plugged") |
67 |
- if v <> invalid |
|
68 |
- m.top.updateTextLower = dt + " HDMI plugged " + v.toStr() |
|
69 |
- print "HDMI plugged " v.toStr() |
|
70 |
- end if |
|
68 |
+ if v <> invalid then m.top.updateTextLower = dt + " HDMI plugged " + v.toStr() |
|
71 | 69 |
elseif msgType = "roCECStatusEvent" |
72 | 70 |
aa = msg.GetInfo() |
73 | 71 |
v = aa.LookupCI("Active") |
74 |
- if v <> invalid |
|
75 |
- m.top.updateTextLower = dt + " CEC Status " + v.toStr() |
|
76 |
- print "CEC Status " v.toStr() |
|
77 |
- end if |
|
72 |
+ if v <> invalid then m.top.updateTextLower = dt + " CEC Status " + v.toStr() |
|
78 | 73 |
elseif msgType = "roDeviceInfoEvent" |
79 | 74 |
aa = msg.GetInfo() |
80 | 75 |
v = aa.LookupCI("Mute") |
81 |
- if v <> invalid |
|
82 |
- m.top.updateTextLower = dt + " Mute " + v.toStr() |
|
83 |
- print "Mute " v.toStr() |
|
84 |
- end if |
|
76 |
+ if v <> invalid then m.top.updateTextLower = dt + " Mute " + v.toStr() |
|
85 | 77 |
v = aa.LookupCI("Mode") |
86 |
- if v <> invalid |
|
87 |
- m.top.updateTextLower = dt + " Mode " + v.toStr() |
|
88 |
- print "Mode " v.toStr() |
|
89 |
- end if |
|
78 |
+ if v <> invalid then m.top.updateTextLower = dt + " Mode " + v.toStr() |
|
90 | 79 |
v = aa.LookupCI("linkStatus") |
91 |
- if v <> invalid |
|
92 |
- m.top.updateTextLower = dt + " LinkStatus " + v.toStr() |
|
93 |
- print "LinkStatus " v.toStr() |
|
94 |
- end if |
|
80 |
+ if v <> invalid then m.top.updateTextLower = dt + " LinkStatus " + v.toStr() |
|
95 | 81 |
v = aa.LookupCI("audioGuideEnabled") |
96 |
- if v <> invalid |
|
97 |
- m.top.updateTextLower = dt + " AudioGuide " + v.toStr() |
|
98 |
- print "AudioGuide " v.toStr() |
|
99 |
- end if |
|
82 |
+ if v <> invalid then m.top.updateTextLower = dt + " AudioGuide " + v.toStr() |
|
100 | 83 |
v = aa.LookupCI("appFocused") |
101 |
- if v <> invalid |
|
102 |
- m.top.updateTextLower = dt + " appFocused " + v.toStr() |
|
103 |
- print "appFocused " v.toStr() |
|
104 |
- end if |
|
84 |
+ if v <> invalid then m.top.updateTextLower = dt + " appFocused " + v.toStr() |
|
105 | 85 |
v = aa.LookupCI("audioCodecCapabilityChanged") |
106 |
- if v <> invalid |
|
107 |
- m.top.updateTextLower = dt + " audioCodecCapabilityChanged " + v.toStr() |
|
108 |
- print "audioCodecCapabilityChanged " v.toStr() |
|
109 |
- end if |
|
86 |
+ if v <> invalid then m.top.updateTextLower = dt + " audioCodecCapabilityChanged " + v.toStr() |
|
110 | 87 |
else |
111 | 88 |
m.top.updateTextLower = dt + " msgType " + msgType |
112 |
- print "Unknown event msgType " v.toStr() |
|
113 | 89 |
end if |
114 | 90 |
|
115 | 91 |
end while |