LogoLogo
  • Rad TV Creator and Streaming Docs
  • Getting Started - Creators, Studios, Publishers
    • Create Your Rad TV Channel
    • Upload and Monetize Videos
    • Sell Individual Videos
    • Sell Subscription Video
    • Create Content Playlists
    • Create a FAST Channel
    • Publish RSS From Outside Server
    • Get Verified
    • Get Approved for Subscription Payments
    • Pricing Onchain Art
    • Maximize Your Earnings
    • VR and Portrait Content FAQ
  • Getting Started - Subscribers, Viewers
    • Premium and Free On-Demand Video, and Free TV
    • Rad TV for Web
    • Rad TV for PS5 / PS VR2
      • Sideloading
      • DLNA/UPnP
      • RSS Feeds
      • Video Encoding
      • File Naming Conventions
      • Controls for VR Version
      • Changelog for VR Version
    • Rad TV for PS4 / PS VR
      • Sideloading
    • Rad TV for iOS / Apple TV
    • Rad TV for Android / Android TV / Chromecast
    • Rad TV for Meta Quest
      • Sideloading
    • Local Media Servers and DLNA/UPnP
    • Adding External RSS Feeds to Your Library
  • Getting Started - Developer API
    • Authentication
    • GraphQL Basics
    • Managing Content
    • Managing Playlists
    • Managing Channels
  • Premium Subscriptions
    • Unlock Rad TV Premium with a Stream Pass NFT
  • Earn Free Premium Benefits via Referrals
  • Rad TV Partnerships for Businesses
  • Rad TV Blockchain Integrations
  • Rad TV Technical Support
Powered by GitBook
On this page
  • Working with Playlists
  • Creating a Playlist
  • Updating a Playlist
  • Adding Assets to a Playlist
  • Best Practices
  1. Getting Started - Developer API

Managing Playlists

PreviousManaging ContentNextManaging Channels

Last updated 4 months ago

Check out our custom Rad TV Developer API . (free or premium OpenAI account required)

Working with Playlists

The Rad TV Developer API allows you to create, update, and manage playlists within a channel. Playlists serve as collections of content that can be organized and displayed to users.

Creating a Playlist

To create a playlist, use the createPlaylist mutation. This requires a channel identifier and a PlaylistInput object for the playlist metadata.

GraphQL Mutation Example:

mutation {
  createPlaylist(
    channel: "did:rad:channel/5678-wxyz",
    input: {
      metadata: {
        title: "Adventure Playlist",
        summary: "A collection of exciting adventure videos"
      }
    }
  ) {
    id
    metadata {
      title
      summary
    }
  }
}

Expected Response:

{
  "data": {
    "createPlaylist": {
      "id": "did:rad:playlist/abcd-5678",
      "metadata": {
        "title": "Adventure Playlist",
        "summary": "A collection of exciting adventure videos"
      }
    }
  }
}

Updating a Playlist

To update an existing playlist, use the updatePlaylist mutation. Provide the playlist ID and any fields you want to update.

GraphQL Mutation Example:

mutation {
  updatePlaylist(
    id: "did:rad:playlist/abcd-5678",
    input: {
      metadata: {
        title: "Updated Adventure Playlist",
        summary: "Updated summary for the adventure videos collection"
      }
    }
  ) {
    id
    metadata {
      title
      summary
    }
  }
}

Expected Response:

{
  "data": {
    "updatePlaylist": {
      "id": "did:rad:playlist/abcd-5678",
      "metadata": {
        "title": "Updated Adventure Playlist",
        "summary": "Updated summary for the adventure videos collection"
      }
    }
  }
}

Adding Assets to a Playlist

To attach images or other assets to a playlist, use the createPlaylistAsset mutation.

GraphQL Mutation Example:

mutation {
  createPlaylistAsset(
    id: "did:rad:playlist/abcd-5678",
    input: {
      filename: "adventure-thumbnail.png",
      image: {
        hint: BANNER
      }
    }
  ) {
    id
    metadata {
      title
    }
  }
}

Expected Response:

{
  "data": {
    "createPlaylistAsset": {
      "id": "did:rad:playlist/abcd-5678",
      "metadata": {
        "title": "Adventure Playlist"
      }
    }
  }
}

Best Practices

  • Organize Playlists: Use meaningful titles and summaries for easy management.

  • Optimize Metadata: Include relevant keywords and descriptions for better discoverability.

  • Error Handling: Handle cases like invalid playlist IDs or permission errors gracefully.

chatbot here