An open API service indexing awesome lists of open source software.

https://github.com/dansup/loops-embed-demo

Loops Embed Demo
https://github.com/dansup/loops-embed-demo

activitypub loops

Last synced: about 1 month ago
JSON representation

Loops Embed Demo

Awesome Lists containing this project

README

          

# Loops Embed Demo

A small static demo showing how to embed [Loops](https://joinloops.org) videos on any webpage.

Drop a `

`, load `embed.js`, done.

## What's in it

- A single `index.html` with a handful of embedded loops
- Dark mode toggle (persists via `localStorage`)
- A floating event log panel that listens for `postMessage` events from the embeds — useful if you want to see what data the embed pushes back to the parent page (`play`, `pause`, `progress`, `seek`, etc.)
- A copy-to-clipboard snippet so people can grab the embed code

## Running it

It's one HTML file with no build step. Easiest way:

```bash
php -S localhost:8000
```

Then open . You can also just open `index.html` directly in a browser — works fine.

Only external deps are Tailwind via CDN and `embed.js` from `loops.video`.

## The embed

```html


Caption fallback

```

Swap in any shortcode. The script tag only needs to be on the page once, no matter how many embeds you have.

## Events

The embed `postMessage`s back to the parent with `context: "loops-embed"` and an `event` field. Open the event log (icon, bottom right) and play around with a video to see them come through.

## License

AGPLv3