Unlike iOS, starting from V2.0.0, we don't support live stream on Android by default. But you could follow the instructions below to enable and enhance the function of live stream.
Add the MainApplication class if you don't have it
Don't forget to add the configuration in the AndroidManifest.xml file
Support the single-host live stream
Step 1: add the library dependency inside the dependencies block in the firework.gradle.
Step 2: add the following codes to the MainApplication class
Use modern (v2) livestream player
The modern (v2) livestream player offers a more extensive feature set than the classic (v1) version. For instance, features such as Giveaway, Trivia Giveaway, and AI Copilot are available exclusively in the modern player, and are not supported in the classic player.
Show brand logo
We show the more icon(three dots) in the top left corner of the player. You could use videoPlayerLogoConfiguration to show the brand logo in the top left corner of the player. The sample codes are:
For encoded ids, please refer to the following link for more details. Generally, the encoded id for videoPlayerLogoConfiguration is the same as the channel id you pass to widgets(such VideoFeed, StoryBlock)
import com.firework.livestream.singlehost.SingleHostLivestreamPlayerInitializer
import com.fireworksdk.bridge.flutter.FWFlutterSDK
class MainApplication: FlutterApplication() {
override fun onCreate() {
super.onCreate()
// you need to add the module before the sdk init method
FWFlutterSDK.addLivestreamPlayerInitializer(SingleHostLivestreamPlayerInitializer())
FWFlutterSDK.init(this)
}
}
// Use modern (v2) livestream player
FireworkSDK.getInstance().livestreamPlayerDesignVersion =
LivestreamPlayerDesignVersion.v2;