Package pyjamas :: Package media :: Module VideoElement
[hide private]
[frames] | no frames]

Source Code for Module pyjamas.media.VideoElement

 1  """ 
 2  * Copyright 2009 Mark Renouf 
 3  * 
 4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 5  * use this file except in compliance with the License. You may obtain a copy of 
 6  * the License at 
 7  * 
 8  * http:#www.apache.org/licenses/LICENSE-2.0 
 9  * 
10  * Unless required by applicable law or agreed to in writing, software 
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHDIR 
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
13  * License for the specific language governing permissions and limitations under 
14  * the License. 
15  """ 
16   
17  @TagName(VideoElement.TAG) 
18 -class VideoElement(MediaElement):
19 TAG = "video" 20
21 - def create(self):
22 return Document.get().createElement(TAG).cast()
23 24
25 - def __init__(self):
26 pass
27 28
29 - def getWidth(self):
30 JS(""" 31 return this['width']; 32 """)
33 34
35 - def setWidth(self, width):
36 JS(""" 37 this['width'] = width; 38 """)
39 40
41 - def getHeight(self):
42 JS(""" 43 return this['height']; 44 """)
45 46
47 - def setHeight(self, height):
48 JS(""" 49 this['height'] = height; 50 """)
51 52
53 - def getVideoWidth(self):
54 JS(""" 55 return this['videoWidth']; 56 """)
57 58
59 - def getVideoHeight(self):
60 JS(""" 61 return this['videoHeight']; 62 """)
63 64
65 - def getPoster(self):
66 JS(""" 67 return this['poster']; 68 """)
69 70
71 - def setPoster(self, url):
72 JS(""" 73 this['poster'] = url; 74 """)
75