Story Block (iOS)
Display Story Block
Use StoryBlockViewController
import FireworkVideo
class ViewController: UIViewController {
func embedStoryBlockInViewController() {
let storyBlockVC = StoryBlockViewController(source: .discover)
// Please ensure that viewConfiguration and isPictureInPictureEnabled are set
// before attaching it to the parent view
storyBlockVC.viewConfiguration = getStoryBlockConfiguration()
storyBlockVC.isPictureInPictureEnabled = true
self.addChild(storyBlockVC)
storyBlockVC.view.translatesAutoresizingMaskIntoConstraints = false
self.view.addSubview(storyBlockVC.view)
NSLayoutConstraint.activate([
storyBlockVC.view.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
storyBlockVC.view.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
storyBlockVC.view.heightAnchor.constraint(equalToConstant: 500),
storyBlockVC.view.centerYAnchor.constraint(equalTo: self.view.centerYAnchor)
])
storyBlockVC.didMove(toParent: self)
}
func getStoryBlockConfiguration() -> StoryBlockConfiguration {
var viewConfiguration = StoryBlockConfiguration()
viewConfiguration.playbackButton.isHidden = false
viewConfiguration.fullScreenPlayerView.playbackButton.isHidden = false
return viewConfiguration
}
}Use FWSStoryBlockView
Use FWSStoryBlockSwiftUIView (SwiftUI)
Story Block Content Source
Channel
Channel Playlist
Dynamic Content
Hashtag Playlist
Single Video or Live Stream
Video Ads
Receive story block events
Play and pause StoryBlock programmatically
Use StoryBlockViewController
Use StoryBlockView
Player configurations
Story block layout
Vertical layout

Horizontal layout

Loading indicator color
Last updated
Was this helpful?