Hello,
I have a grid application where I am making the first row of the grid a live feed. It is currently a search screen, with code in appmain like this:
' Display the search screen
Function displaySearchScreen()
...setup and display search window
end function
To test my implementation, I took the custom video player example and copied the code into appmain, right below the displaySearchScreen function above. Then, I changed the RunUserInterface sub in the example code (now pasted into appMain) take the place of the code in the displaySearchScreen function. My grid still shows Search as the option, but when I choose it, the audio from the live feed starts to play - the screen is blank. Pressing the down arrow, as suported in the custom video player example, produces the full screen video. Another down arrow scales the video to the window in the custom video player canvas, but my canvas does not display.
The code for the display of the canvas is, I believe:
Sub SetupFramedCanvas()
m.canvas.AllowUpdates(false)
m.canvas.Clear()
m.canvas.SetLayer(0, [
{ 'Background:
Url: m.background
CompositionMode: "Source"
},
{ 'The title:
Text: "Custom Video Player"
TargetRect: m.layout.top
TextAttrs: { valign: "bottom", font: m.headerfont, color: m.textcolor }
},
{ 'Help text:
Text: m.help
TargetRect: m.layout.right
TextAttrs: { halign: "left", valign: "top", color: m.textcolor }
}
])
m.paint()
m.canvas.AllowUpdates(true)
End Sub
I was expecting the m.paint() statement to produce the canvas, but it does not. The event loop does appear to be working however. What should I be looking for? Any assistance appreciated.