Skip to content

Commit

Permalink
Update SDK to v0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fw-machine-user committed Mar 25, 2022
1 parent 1837fc5 commit 97f94c5
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## CHANGELOG

## [0.15.0]

### Added

- Support for live stream playback
- Live stream callback events

## [0.14.1]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion FireworkVideo.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "FireworkVideo"
spec.version = "0.14.1"
spec.version = "0.15.0"
spec.summary = "FireworkVideoSDK"
spec.homepage = "https://github.com/loopsocial/firework_ios_sdk"
spec.license = { :text => "Copyright 2021 Loop Now Technologies, Inc.", :type => "Copyright" }
Expand Down
26 changes: 26 additions & 0 deletions FireworkVideoSample/FireworkVideoSample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,29 @@ extension AppDelegate: FireworkVideoCTADelegate {
return true
}
}

/// Implementing the FireworkLiveStreamEventDelegate will receive live stream events
extension AppDelegate: FireworkLiveStreamEventDelegate {
func fireworkLiveStreamUserDidJoin(_ liveStream: LiveStreamEventDetails) {
// App developer code
debugPrint(">>> Live stream user did join")
}

func fireworkLiveStreamUserDidLeave(_ liveStream: LiveStreamEventDetails) {
// App developer code
debugPrint(">>> Live stream user did leave")
}

func fireworkLiveStreamUserDidSendChat(
_ chat: LiveStreamMessageDetails,
to liveStream: LiveStreamEventDetails
) {
// App developer code
debugPrint(">>> Live stream user did send chat \(chat.text) \(chat.username) \(chat.messageID)")
}

func fireworkLiveStreamUserDidSendLike(_ liveStream: LiveStreamEventDetails) {
// App developer code
debugPrint(">>> Live stream user did send like")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class VideoFeedCustomizationViewController: UIViewController {
action: #selector(SenderSuppliedTargetAction.performAction(_:)),
for: .valueChanged)
self.playerStyleSegmentedControl.selectedSegmentIndex = 0

self.customizationControlsStackView = UIStackView(arrangedSubviews: [
colorSegmentExplanation,
self.colorAttributesSegmentedControl,
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ let package = Package(
],
targets: [
.binaryTarget(name: "FireworkVideo",
url: "https://github.com/loopsocial/firework_ios_sdk/releases/download/v0.14.1/FireworkVideo-v0.14.1.xcframework.zip",
checksum: "b0950ebc873b360c85a5d7fe957330158d491efda1cae18ea6ca93d081ac4d3a"),
url: "https://github.com/loopsocial/firework_ios_sdk/releases/download/v0.15.0/FireworkVideo-v0.15.0.xcframework.zip",
checksum: "0eb0f9072ec3a2a182f8c823cf356092d9e1dbcf9bdbaa373a91225b0d6fa93d"),
]

)
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,21 @@ config.adBadge = adBadgeConfig
feedVC.viewConfiguration = config
```

#### Live Stream Event Callbacks

Live stream events can be observed by assgning a receiver as the `FireworkLiveStreamEventDelegate`. This will provide different methods that will be invoked at the time of each event.

```swift
// Assign a delegate
FireworkVideoSDK.eventTracking.liveStreamEventDelegate = // Object to receive live stream events
``

#### Custom Call-To-Action Button Handling

Custom Call-To-Action button handling is done via the `FireworkVideoCTADelegate` protocol. This provides control over what occurs when a call-to-action button is tapped.

1. Set the delegate:
```
```swift
FireworkVideoSDK.ctaDelegate = self
```
2. Confirm to protocol:
Expand Down

0 comments on commit 97f94c5

Please sign in to comment.