# Video Feed Content Source (iOS)

### **Video Feed Content Source**

The enum `VideoFeedContentSource` defines the different sources that can be used to populate the Video Feed/Player Deck/Circle Story.

#### **Channel**

Displays content from the specified channel id.

```swift
let channelID = "<Channel ID>"
let source = VideoFeedContentSource.channel(channelID: channelID)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

#### **Channel Playlist**

Displays content from the specified playlist id.

```swift
let channelID = "<Your Channel ID>"
let playlistID = "<Playlist ID>"
let source = VideoFeedContentSource.channelPlaylist(channelID: channelID, playlistID: playlistID)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

#### **Dynamic Content**

Displays dynamic content based on the provided channel id and content parameters.

```swift
let channelID = "<Channel ID>"
let parameters: DynamicContentParameters = ["<cohort key>": ["<cohort value 1>", "<cohort value 2>"]]
let source = VideoFeedContentSource.dynamicContent(channelID: channelID, parameters: parameters)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

#### Hashtag Playlist

Displays content based on the provided channel id and the hashtag expression.

```swift
let channelID = "<Channel ID>"
let singleHashtag = "dogs"
let source = VideoFeedContentSource.hashtagPlaylist(channelID: channelID, filterExpression: singleHashtag)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

Or a more advanced hashtag expression can be used to fine tune the results

```swift
let channelID = "<Channel ID>"
let filterExpression = "(and sport (or food comedy))"
let source = VideoFeedContentSource.hashtagPlaylist(channelID: channelID, filterExpression: filterExpression)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

#### SKU Playlist

Displays content based on the provided channel id and SKU/Product external IDs.

```swift
let channelID = "<Encoded Channel ID>"
let productIDs = ["<Product ID>", ...]
let source = VideoFeedContentSource.skuPlaylist(channelID: channelID, productIDs: productIDs)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

#### Single Video or Live Stream

Displays a single video or live stream content.

```swift
let videoID = "<Video ID>"
let source = VideoFeedContentSource.singleContent(contentID: videoID)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

#### Video Ads

Displays video ads based on vast XML.

```swift
// Specifies which channel the video ads should be created under.
let adChannelId = "<Channel ID>"
// The vast XML.
let vastXml = "<Vast XML>"
let source = VideoFeedContentSource.videoAds(adChannelId: adChannelId, vastXml: vastXml)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```

#### Channel Videos

```swift
let channelID = "Encoded channel id"
let videoIDs = ["Encoded video id 1", "Encoded video id 2", ...]
let source = VideoFeedContentSource.channelVideos(channelID: channelID, videoIDs: videoIDs)
// UIKit
let videoFeedView = FWSVideoFeedView(source: source)
let playerDeckView = PlayerDeckView(source: source)
let circleStory = CircleStoryView(source: source)
// SwiftUI
FWSVideoFeedSwiftUIView(source: source)
PlayerDeckSwiftUIView(source: source)
CircleStorySwiftUIView(source: source)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.firework.com/firework-for-developers/ios-sdk/integration-guide-for-ios-sdk/video-feed-content-source-ios.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
