Fetches and returns current activity on Xbox Live, Steam, and Jellyfin.

4.8 kB · 151 lines · Created 3mo ago
JavaScript

I deploy this as a Cloudflare Worker. I explain my use of the script here: https://vale.rocks/posts/the-implementation-of-this-site#current-media-display

Example API response:

{
  "xbox": {
    "online": true,
    "state": "Online",
    "activeTitle": {
      "name": "Halo Infinite",
      "deviceType": "XboxSeriesX",
      "state": "Active",
      "lastModified": "2026-07-28T01:15:30.000Z",
      "richPresence": "Playing Big Team Battle - Fragmentation"
    },
    "lastSeen": {
      "titleName": "Halo Infinite",
      "deviceType": "XboxSeriesX",
      "timestamp": "2026-07-28T01:15:30.000Z"
    }
  },
  "steam": {
    "online": true,
    "slug": "online",
    "game": "Ratz Instagib"
  },
  "jellyfin": {
    "active": true,
    "media": {
      "type": "tv",
      "show": "Neon Genesis Evangelion",
      "season": 1,
      "episode": 9,
      "episodeName": "Both of You, Dance Like You Want to Win!"
    }
  },
  "updatedAt": "2026-07-28T02:43:01.000Z"
}
Sign up or Sign in to add to the discussion.