| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| * Licensed to the Apache Software Foundation (ASF) under one |
| * or more contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. The ASF licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| --> |
| <Module> |
| <ModulePrefs title="Flash Caja Demo" |
| height="200" |
| description="Demonstrates the use of caja to protect flash gadgets"> |
| <Require feature="caja"></Require> |
| <Require feature="flash"></Require> |
| <Require feature="dynamic-height"></Require> |
| </ModulePrefs> |
| <Content type="html"> |
| <![CDATA[ |
| |
| Caja does not allow <code>object</code> or <code>embed</code> tags |
| in HTML. However, Shindig provides a tamed JavaScript API for |
| embedding flash on a page. To embed a flash file, use |
| <code>Require feature="flash"</code> in your |
| ModulePrefs and <code>gadges.flash.embedFlash</code> in the body of |
| your gadget to embed flash. |
| <p> |
| For example, here is a YouTube video. |
| <p> |
| <div id="ytapiplayer"> |
| You need Flash player 10 and JavaScript enabled to view this video. |
| </div> |
| <script type="text/javascript"> |
| var success = gadgets.flash.embedFlash( |
| "http://www.youtube.com/v/0AqMb-edXlc", // Flash video |
| "ytapiplayer", // id of div to place flash object |
| "10" // minimum version |
| ); |
| </script> |
| <script>gadgets.window.adjustHeight();</script> |
| ]]> |
| </Content> |
| </Module> |