-
-
Notifications
You must be signed in to change notification settings - Fork 180
Embedding
Embedding TurboWarp is very similar to how you embed Scratch 3:
<iframe src="https://turbowarp.org/414716080/embed" width="499" height="416" allowtransparency="true" frameborder="0" scrolling="no" allowfullscreen></iframe>
Replace 414716080
with the ID of your project. Change width and height to match your needs. The player will automatically resize to fit. Feel free to use this however you please.
All standard URL Parameters are still available, along with some special values exclusive to embeds:
Embeds also support the autoplay
parameter, which will automatically hit the green flag when the project is loaded. For example: https://turbowarp.org/15832807/embed?autoplay
Note that audio may not work until the user interacts with the project (for example, clicking). This is a restriction imposed by browsers. There is nothing TurboWarp can do to work around this.
By default the embed will generate a random username for each user. Unlike the homepage where this is remembered between visits, the embed generates a new one every visit. You can use the username
URL parameter to override this behavior, for example: https://turbowarp.org/443603478/embed?username=1234
If you don't need cloud variables, consider setting the username
parameter to an empty value to potentially reduce load on our server, for example: https://turbowarp.org/443603478/embed?username
If you use user-supplied information to generate an embed link, please make sure to use encodeURIComponent or other sanitization to make sure that users cannot specify arbitrary parameters, as some parameters can cause remote code execution.
TurboWarp is licensed under the GPLv3.0. Whether or not embedding a GPLv3.0 website with an <iframe> forces the entire website to be GPLv3.0 is unclear and untested in court. However, the general consensus appears amongst people who aren't lawyers is that it does not. If you have concerns, ask a lawyer.