# RCWeb RSS News

**RSS News** turns any RCWeb display into a digital signage news board fed by RSS or Atom feeds. It uses the same full-screen presentation style as **news**, but its sources are ordinary feed URLs instead of thenewsapi.com categories.

![icon](pwa-512x512.png "RSS News Icon")

## What it shows

- Four equal article panels on each landscape screen
- Four stacked article panels on each portrait screen
- RSS channel images before the source title when feeds expose one
- Image previews to the left of each title and description when a feed item exposes one
- Source labels, timestamps, a live indicator and a room clock
- A top-right QR code linking to the **rss-news-c** phone control

The viewer cycles to the next screen every 14 seconds. Tap the display, press space, or use the phone control to pause and resume. The arrow keys move between screens.

## Sources

The viewer starts with these RSS sources:

```text
https://feeds.skynews.com/feeds/rss/home.xml
https://www.theguardian.com/world/rss
https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml
https://www.pbs.org/newshour/feeds/rss/headlines
https://feeds.npr.org/1001/rss.xml
https://www.cbc.ca/webfeed/rss/rss-topstories
https://feeds.bbci.co.uk/news/rss.xml
https://feeds.bbci.co.uk/news/world/rss.xml
https://www.aljazeera.com/xml/rss/all.xml
https://www.cbsnews.com/latest/rss/main
https://www.france24.com/en/rss
```

The active source list is stored in the viewer browser's `localStorage` under `rcweb.rss-news.sources`, so refreshing or reopening the viewer keeps the same configuration.

## How it talks to the controller

The viewer is authoritative. It owns the loaded headlines, active screen index, play state and RSS source list, then exposes a small public API on `window.rssNewsViewer`:

```text
rssNewsViewer.next()
rssNewsViewer.prev()
rssNewsViewer.goto(index)
rssNewsViewer.play()
rssNewsViewer.pause()
rssNewsViewer.toggle()
rssNewsViewer.requestState(clientId)
rssNewsViewer.setSources(["https://feeds.bbci.co.uk/news/rss.xml"])
rssNewsViewer.refresh()
```

Whenever the screen changes, play state toggles, or the sources are reconfigured, the viewer pushes a snapshot to every `rss-news-c` client in the room with:

```javascript
rc.sendFunctionCall("rss-news-c", "rssNewsControl.receiveState", snapshot);
```

## Data loading

RSS XML and article images are loaded through the existing same-origin `/api/basic-proxy/` route. This keeps the app browser-only and avoids common RSS CORS failures without adding backend code.

## URL

`/rss-news/?r=<room>`
