fixed components; added playerapp example

This commit is contained in:
Andreas Rumpf 2017-04-14 20:49:42 +02:00
commit a9b12a231f
5 changed files with 99 additions and 6 deletions

View file

@ -0,0 +1,24 @@
## Example app that shows how to write and embed a custom component.
include karaxprelude
import mediaplayer
const url = "https://www.w3schools.com/html/mov_bbb.mp4"
proc createDom(): VNode =
result = buildHtml(table):
tr:
td:
mplayer("vid1", url)
td:
mplayer("vid2", url)
tr:
td:
mplayer("vid3", url)
td:
mplayer("vid4", url)
setRenderer createDom
proc onload() {.exportc.} =
init()