Video feed layouts (iOS)
Horizontal layout
let layout = VideoFeedHorizontalLayout()
// Configure itemWidth:itemHeight to 16:9
layout.itemWidthRatio = 16 / 9
// Configure spacing between items
layout.itemSpacing = 10
// Configure content insets
layout.contentInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
let channelID = "<Encoded Channel ID>"
let playlistID = "<Encoded Playlist ID>"
// Create VideoFeedViewController instance
let feedVC = VideoFeedViewController(
layout: layout,
source: .channelPlaylist(
channelID: channelID,
playlistID: playlistID
)
)
// Create VideoFeedView instance
let feedView = VideoFeedView(
layout: layout,
source: .channelPlaylist(
channelID: channelID,
playlistID: playlistID
)
)
VideoFeedSwiftUIView(
layout: layout,
source: .channelPlaylist(
channelID: channelID,
playlistID: playlistID
)
)

Grid layout

Last updated
Was this helpful?