# CTV

On connected TV (CTV), Samsung (Tizen) and LG (webOS) TVs run apps built as web pages, and Android TV, Google TV, and Fire TV apps can show a web page in a web view. The Web SDK loads in that page, and viewers watch from across the room with a remote.

![Diagram: setting up Onsite on CTV in 5 steps: Build a 16:9 placement, Load the Web SDK in your TV app's page, Fill the screen inside a safe area, Set the page context to the show, Handle the remote in your app.](https://cdn.sanity.io/images/lnrtvsvr/development/10d40b0a7a492a8da0bf3d782384dfc836dc94e2-320x180.svg)

## Product use cases in this environment

| Use case | Product | How it shows up here |
| --- | --- | --- |
| Horizontal Video Player Placement | Onsite | Pick a 16:9 video aspect ratio to match the screen. |
| Feeds on home and details screens | Onsite | A row of short videos on your streaming app's home screen, or clips about the show on its details screen. |
| Contextual feeds | Onsite | Set the page context to the show or channel on screen, so the placement ranks videos about it. |
| FAST channels | Onsite | The SDK runs on the channel app's screens around the stream. It does not run inside the linear stream. |
| Your feed on partners' TV players | Offsite | Coming soon: an Extended O&O tag, set up with Genuin, that carries your feed to approved partners' TV players. |
| Clips from shows | Studio | Studio finds the strongest moments in shows and live replays, and cuts landscape clips. |
| Playback settings | Control | Autoplay Video and Auto-Advance Playback start the next video without a click. |

## Limitations

- There is no TV SDK. The Web SDK runs only where a TV app loads a web page: HTML5 apps on Tizen and webOS, and web views on Android TV, Google TV, and Fire TV. Roku and Apple TV apps can't load web pages.
- The SDK has no focus navigation for TV remotes. Handle remote keys in your app.
- Comments, reactions, and sign-in expect touch, a mouse, or a keyboard, so treat the experience as lean-back viewing.
- Some TVs crop the edges, so give the container about 90% of the screen.
- TV web engines differ by maker and model year, so test on the device.
- Video starts muted. Map a remote key to `window.genuin.emit("player:unmute")` so viewers can turn sound on.
- Playback pauses while the page loses focus or is hidden, and resumes when it returns.
- A carousel doesn't start over after its last video. A grid cycles through the tiles it shows.

## Set it up

1. **Build a 16:9 placement.** Pick the 16:9 aspect ratio for the embed or placement. Read: [Build a placement](https://begenuin.com/developers/browse-by-products/onsite/how-a-brand-can-get-started-with-placements-in-business-account).
2. **Load the Web SDK in your TV app's page.** The steps are the same as on the web. Read: [CTV and OTT apps in the Web SDK guide](https://begenuin.com/developers/developer-resources/sdk/how-do-you-embed-and-configure-the-genuin-web-sdk-on-your-website#ctv-and-ott-apps).
3. **Fill the screen inside a safe area.** Give the container about 90% of the screen's width and height.
4. **Set the page context to the show.** Change it when the viewer moves to another show. Read: [Deliver contextual feeds with page, user, and location context](https://begenuin.com/developers/developer-resources/sdk/contextual-embeds-how-they-work-and-how-to-configure-them).
5. **Handle the remote in your app.** In the placement's Configure View, under Media Play, turn on Autoplay Video. Then pick Auto-Advance Playback (Full Video, 3s, 5s, or 7s) or Loop Video. The SDK has no remote-control navigation, so handle remote keys in your app. Read: [Set the view](https://begenuin.com/developers/browse-by-products/onsite/how-a-brand-can-get-started-with-placements-in-business-account#set-the-view).

## Example

- **Business:** a streaming service with apps for Samsung (Tizen) and LG (webOS) TVs.
- **Page:** each show's details screen, under the synopsis.
- **Setup:** Under **Grow** > **On Site** > **Placement**, a **Carousel** placement with a **Video Cell Aspect Ratio** of 16:9. On **Configure View**, under **Media Play**, **Autoplay Video** is on and **Auto-Advance Playback** is **Full Video**. On **Implementation Guide**, **Custom Context** is ticked. The details screen passes the show's title, genre, and cast as `page_context`. The app maps the remote's Play/Pause key to `window.genuin.emit("player:pause")` and `window.genuin.emit("player:play")`.
- **What viewers see:** a row of landscape clips about the show that play one after another without a click.
- **What you measure:** the placement's analytics, plus the `onPlay` events the app forwards to its own analytics.

## Best practices

- Call `window.genuin.update` with the new show's `page_context` when the viewer opens another show, so the row changes without reloading the page.
- Use 5s or 7s auto-advance for a preview row on the home screen, and **Full Video** on a details screen, where viewers watch clips through.
- Put the row where it's on screen when the page opens. The SDK renders a placement when it comes within 200 px of the viewport and plays only while it's in view.
- Test on the oldest TV model year you support. An older web engine can show the tiles but not play the video.

## Developer resources

- [Embed the Genuin Web SDK on your digital properties](https://begenuin.com/developers/developer-resources/sdk/how-do-you-embed-and-configure-the-genuin-web-sdk-on-your-website)
- [Add a Genuin placement to your digital properties](https://begenuin.com/developers/developer-resources/sdk/how-do-you-configure-the-genuin-web-sdk-placement-on-your-website)
- [Deliver contextual feeds with page, user, and location context](https://begenuin.com/developers/developer-resources/sdk/contextual-embeds-how-they-work-and-how-to-configure-them)

## Related

- [Embed support by platform](https://begenuin.com/developers/browse-by-products/onsite/cross-platform-embeds-supported-specs-integrations-and-limitation)
- [Tags for Distribution](https://begenuin.com/developers/browse-by-products/offsite/tags-for-distribution)
