mirror of
https://github.com/dyne/FreeJ.git
synced 2026-02-07 13:29:47 +01:00
produces JavaScript for playing the videos from the "enclosures" in the feed. layer.cpp - small check to avoid a segmentation fault on a null pointer.
39 lines
722 B
Python
39 lines
722 B
Python
import threading
|
|
import freej
|
|
import time
|
|
import sys
|
|
|
|
#freej.set_debug(3)
|
|
|
|
# init context
|
|
cx = freej.Context()
|
|
cx.init(400,300,0,0)
|
|
cx.config_check("keyboard.js")
|
|
cx.plugger.refresh(cx)
|
|
|
|
# add a layer
|
|
# lay = freej.create_layer(cx,sys.argv[1])
|
|
#lay = cx.open(sys.argv[1])
|
|
#filt = cx.filters["vertigo"]
|
|
#lay.add_filter(filt)
|
|
|
|
#header=freej.TextLayer()
|
|
#cx.add_layer(header)
|
|
#header.set_position(5,0)
|
|
#header.print_text("EngageMedia TV")
|
|
#header.start()
|
|
|
|
lay = freej.VideoLayer()
|
|
lay.init(cx)
|
|
lay.open("http://www.engagemedia.org/Members/swst/videos/triabunna.wmv")
|
|
lay.start()
|
|
lay.active = True
|
|
cx.add_layer(lay)
|
|
lay.set_position(10,10)
|
|
|
|
|
|
th = threading.Thread(target = cx.start , name = "freej")
|
|
th.start();
|
|
# th.join();
|
|
|