mirror of
https://github.com/dyne/FreeJ.git
synced 2026-06-16 12:59:33 +02:00
Adding new scripts. An example python script playing video, and a python script which parses RSS2 feeds and
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.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user