Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Luke Leighton
committed
Mar 27, 2012
1 parent
d89ac67
commit a9bffca
Showing
7 changed files
with
126 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import pyjd # this is dummy in pyjs. | ||
from pyjamas.ui.RootPanel import RootPanel | ||
from pyjamas.media.Video import Video | ||
from pyjamas.media.Audio import Audio | ||
from pyjamas import Window | ||
|
||
if __name__ == '__main__': | ||
pyjd.setup("public/Media.html?fred=foo#me") | ||
v = Video(Width="640px", Height="480px", | ||
StyleName="vteststyle", | ||
Autoplay=True, | ||
Controls=True, | ||
src="http://127.0.0.1/home/kiss.the.girl.mp4") | ||
|
||
a = Audio(Width="640px", Height="50px", | ||
StyleName="ateststyle", | ||
Autoplay=True, | ||
Controls=True, | ||
src="http://127.0.0.1/home/Lry_Crane_Copy.mp3") | ||
|
||
RootPanel().add(a) | ||
#RootPanel().add(v) | ||
|
||
pyjd.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
TARGETS = [ | ||
'Media.py', | ||
] | ||
|
||
|
||
PACKAGE = { | ||
'title': 'helloworld', | ||
'desc': 'Port of GWT hello world example', | ||
} | ||
|
||
|
||
def setup(targets): | ||
'''Setup example for translation, MUST call util.setup(targets).''' | ||
util.setup(targets) | ||
|
||
|
||
def translate(): | ||
'''Translate example, MUST call util.translate().''' | ||
util.translate() | ||
|
||
|
||
def install(package): | ||
'''Install and cleanup example module. MUST call util.install(package)''' | ||
util.install(package) | ||
|
||
|
||
##---------------------------------------## | ||
# --------- (-: DO NOT EDIT :-) --------- # | ||
##---------------------------------------## | ||
|
||
|
||
import sys | ||
import os | ||
|
||
|
||
examples = head = os.path.abspath(os.path.dirname(__file__)) | ||
while os.path.split(examples)[1].lower() != 'examples': | ||
examples = os.path.split(examples)[0] | ||
if not examples: | ||
raise ValueError("Cannot determine examples directory") | ||
sys.path.insert(0, os.path.join(examples)) | ||
from _examples import util | ||
sys.path.pop(0) | ||
|
||
util.init(head) | ||
|
||
setup(TARGETS) | ||
translate() | ||
install(PACKAGE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
# you will need to read the top level README, and run boostrap.py | ||
# and buildout in order to make pyjsbuild | ||
|
||
options="$*" | ||
#if [ -z $options ] ; then options="-O";fi | ||
../../bin/pyjsbuild --print-statements $options Media |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.teststyle { | ||
font-size: 200%; | ||
margin: 20px; | ||
padding: 20px; | ||
background-color: #00ff00; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html> | ||
<!-- auto-generated html - You should consider editing and adapting this | ||
to suit your requirements. No doctype used here to force quirks mode; see | ||
wiki for details: http://pyjs.org/wiki/csshellandhowtodealwithit/ | ||
--> | ||
<head> | ||
<link rel="stylesheet" href="Media.css"> | ||
<title>Media (Pyjamas Auto-Generated HTML file)</title> | ||
</head> | ||
<body style="background-color:white"> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters