Embed Video or link to Youtube Video on App Lab Project

There is a way, but it’s not really ready for prime time and difficult to control. The write command will add text to the screen starting at the top.

write("<a href='http://code.org/csp'> go to CSP! </a>");

Example Project – updated

We’re working on arbitrary HTML insertion which would let you do things like embed videos, but there are security risks/hurdles associated that we have to wrangle. You’ll notice if you experiment with inserting html with the write command that it’s pretty locked down - the html is inspected and sanitized to avoid security holes. The debug console will tell what was stripped out. This makes it hard to control right now - like you can’t really position it or set styles.

“working on” means it’s high on the priority list for when major updates to App Lab happen which will happen, but at some indefinite point in the future. We know this is a feature people want, but that’s the news for now.

-Baker

3 Likes