...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="YouTube Player" description="YouTube Player Using Embedded Experiences" height="400" width="700">
<Require feature="embedded-experiences"></Require>
<Require feature="dynamic-height"></Require>
</ModulePrefs>
<Content type="html" view="embedded,default">
<![CDATA[
<script type="text/javascript">
function showPlayer(context){
document.getElementById("player").innerHTML = '<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/' + context + '?fs=1&hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/' + context + '?fs=1&hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>';
gadgets.window.adjustHeight();
}
function initData() {
opensocial.data.getDataContext().registerListener('org.opensocial.ee.context', function(key){
showPlayer(opensocial.data.getDataContext().getDataSet(key));
});
}
gadgets.util.registerOnLoadHandler(initData);
</script>
<div id="player">
</div>
]]>
</Content>
</Module>
|
...