diff --git a/.swiftlint.yml b/.swiftlint.yml index 1f8ab368..b766fe92 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -2,6 +2,7 @@ disabled_rules: - todo - trailing_comma - inclusive_language + - non_optional_string_data_conversion opt_in_rules: # performance diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/ChannelManager.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/ChannelManager.kt index adbefa98..5f92ce3e 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/ChannelManager.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/ChannelManager.kt @@ -32,20 +32,18 @@ class ChannelManager { name: String, handler: MethodCallHandler, binaryMessenger: BinaryMessenger, - ): MethodChannel { - return MethodChannel(binaryMessenger, name).apply { + ): MethodChannel = + MethodChannel(binaryMessenger, name).apply { this.setMethodCallHandler(handler) } - } fun registerEventChannel( name: String, handler: StreamHandler, binaryMessenger: BinaryMessenger, - ): EventChannel { - return EventChannel(binaryMessenger, name).apply { + ): EventChannel = + EventChannel(binaryMessenger, name).apply { this.setStreamHandler(handler) } - } } } diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayer.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayer.kt index 0e8b4956..8626e45f 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayer.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayer.kt @@ -34,7 +34,8 @@ class FlutterPlayer( config: PlayerConfig?, analyticsConfig: AnalyticsConfig?, defaultMetadata: DefaultMetadata?, -) : StreamHandler, EventListener() { +) : EventListener(), + StreamHandler { private var widevineCallbacksHandler: WidevineCallbacksHandler? = null private val methodChannel = ChannelManager.registerMethodChannel( @@ -115,9 +116,7 @@ class FlutterPlayer( private fun onMethodCall( method: String, arguments: JMethodArgs, - ): Any { - return player.onMethodCall(method, arguments.asPlayerMethodArgs) - } + ): Any = player.onMethodCall(method, arguments.asPlayerMethodArgs) override fun onListen( arguments: Any?, diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerView.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerView.kt index 96cd52f9..ab3869a3 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerView.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerView.kt @@ -31,7 +31,10 @@ class FlutterPlayerView( messenger: BinaryMessenger, id: Int, args: Any?, -) : MethodChannel.MethodCallHandler, EventChannel.StreamHandler, PlatformView, EventListener() { +) : EventListener(), + MethodChannel.MethodCallHandler, + EventChannel.StreamHandler, + PlatformView { private val methodChannel: MethodChannel = MethodChannel( messenger, diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerViewFactory.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerViewFactory.kt index c5c544f6..6a1611f4 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerViewFactory.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/FlutterPlayerViewFactory.kt @@ -13,7 +13,5 @@ class FlutterPlayerViewFactory( context: Context, viewId: Int, args: Any?, - ): PlatformView { - return FlutterPlayerView(context, messenger, viewId, args) - } + ): PlatformView = FlutterPlayerView(context, messenger, viewId, args) } diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/Helper.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/Helper.kt index 9556cb71..a0a69353 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/Helper.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/Helper.kt @@ -27,18 +27,16 @@ class Helper { return (x - inMin) * outRange / inRange + outMin } - fun getSystemBrightness(context: Context): Float { - return Settings.System.getInt( - context.contentResolver, - Settings.System.SCREEN_BRIGHTNESS, - 0, - ).toFloat() - } + fun getSystemBrightness(context: Context): Float = + Settings.System + .getInt( + context.contentResolver, + Settings.System.SCREEN_BRIGHTNESS, + 0, + ).toFloat() @RequiresApi(Build.VERSION_CODES.M) - fun canWriteSystemSettings(context: Context): Boolean { - return Settings.System.canWrite(context) - } + fun canWriteSystemSettings(context: Context): Boolean = Settings.System.canWrite(context) fun requestSystemWritePermission(context: Context) { val intent = @@ -48,8 +46,6 @@ class Helper { ContextCompat.startActivity(context, intent, null) } - fun getAudio(context: Context): AudioManager { - return context.getSystemService(Context.AUDIO_SERVICE) as AudioManager - } + fun getAudio(context: Context): AudioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager } } diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPayload.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPayload.kt index 315a4841..740ad35f 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPayload.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPayload.kt @@ -1,3 +1,6 @@ package com.bitmovin.player.flutter -data class PlayerPayload(val id: String, val data: Any?) +data class PlayerPayload( + val id: String, + val data: Any?, +) diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPlugin.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPlugin.kt index cd67f4ff..3d937bd1 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPlugin.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/PlayerPlugin.kt @@ -13,7 +13,9 @@ import io.flutter.embedding.engine.plugins.activity.ActivityAware import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding import java.lang.ref.WeakReference -class PlayerPlugin : FlutterPlugin, ActivityAware { +class PlayerPlugin : + FlutterPlugin, + ActivityAware { private var flutterPluginBindingReference = WeakReference(null) private var activity = WeakReference(null) diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineCallbacksHandler.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineCallbacksHandler.kt index caecece3..64ebcfb6 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineCallbacksHandler.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineCallbacksHandler.kt @@ -48,41 +48,42 @@ class WidevineCallbacksHandler( methodName: String, arguments: Map, ): ByteArray { - return CallbackToFutureAdapter.getFuture { completer -> - runOnMainThread { - methodChannel.invokeMethod( - methodName, - arguments, - object : MethodChannel.Result { - override fun success(result: Any?) { - if (result !is String) { + return CallbackToFutureAdapter + .getFuture { completer -> + runOnMainThread { + methodChannel.invokeMethod( + methodName, + arguments, + object : MethodChannel.Result { + override fun success(result: Any?) { + if (result !is String) { + completer.setException( + Exception("Invalid result type found for: $methodName"), + ) + return + } + + completer.set(Base64.decode(result, Base64.NO_WRAP)) + } + + override fun error( + errorCode: String, + errorMessage: String?, + errorDetails: Any?, + ) { completer.setException( - Exception("Invalid result type found for: $methodName"), + Exception("Error when calling $methodName. Error code: $errorCode, message: $errorMessage"), ) - return } - completer.set(Base64.decode(result, Base64.NO_WRAP)) - } - - override fun error( - errorCode: String, - errorMessage: String?, - errorDetails: Any?, - ) { - completer.setException( - Exception("Error when calling $methodName. Error code: $errorCode, message: $errorMessage"), - ) - } - - override fun notImplemented() { - completer.setException( - Exception("Method not implemented: $methodName"), - ) - } - }, - ) - } - }.get() + override fun notImplemented() { + completer.setException( + Exception("Method not implemented: $methodName"), + ) + } + }, + ) + } + }.get() } } diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineConfigMetadata.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineConfigMetadata.kt index 16088c51..37a96058 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineConfigMetadata.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/drm/WidevineConfigMetadata.kt @@ -1,3 +1,6 @@ package com.bitmovin.player.flutter.drm -data class WidevineConfigMetadata(val hasPrepareMessage: Boolean, val hasPrepareLicense: Boolean) +data class WidevineConfigMetadata( + val hasPrepareMessage: Boolean, + val hasPrepareLicense: Boolean, +) diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonMethodHandler.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonMethodHandler.kt index 7eea225c..b392e67a 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonMethodHandler.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonMethodHandler.kt @@ -4,8 +4,9 @@ import io.flutter.plugin.common.MethodCall import io.flutter.plugin.common.MethodChannel /** set Result from returned object or set an error if an exception is thrown. */ -internal class JsonMethodHandler(private val handler: (String, JMethodArgs) -> Any) : - MethodChannel.MethodCallHandler { +internal class JsonMethodHandler( + private val handler: (String, JMethodArgs) -> Any, +) : MethodChannel.MethodCallHandler { override fun onMethodCall( call: MethodCall, result: MethodChannel.Result, diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonObjects.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonObjects.kt index 441ed8b6..5663352d 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonObjects.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonObjects.kt @@ -24,11 +24,15 @@ private interface JStruct { fun toJsonString() = jacksonObjectMapper().writeValueAsString(map) } -internal class JSource(override var map: Map<*, *>) : JStruct { +internal class JSource( + override var map: Map<*, *>, +) : JStruct { val sourceConfig by structGetter(::JSourceConfig).require() } -internal class JSourceConfig(override var map: Map<*, *>) : JStruct { +internal class JSourceConfig( + override var map: Map<*, *>, +) : JStruct { val url by GetString.require() val type by enumGetter() val title by GetString @@ -43,7 +47,9 @@ internal class JSourceConfig(override var map: Map<*, *>) : JStruct { val subtitleTracks by structListGetter(::JSubtitleTrack).require() } -internal class JSourceMetadata(override var map: Map<*, *>) : JStruct { +internal class JSourceMetadata( + override var map: Map<*, *>, +) : JStruct { val title by GetString val videoId by GetString val cdnProvider by GetString @@ -52,16 +58,22 @@ internal class JSourceMetadata(override var map: Map<*, *>) : JStruct { val customData by structGetter(::JCustomData) } -internal class JSourceOptions(override var map: Map<*, *>) : JStruct { +internal class JSourceOptions( + override var map: Map<*, *>, +) : JStruct { val startOffset by GetDouble val startOffsetTimelineReference by enumGetter() } -internal class JDrmConfig(override var map: Map<*, *>) : JStruct { +internal class JDrmConfig( + override var map: Map<*, *>, +) : JStruct { val widevine by structGetter(::JWidevineConfig) } -internal class JWidevineConfig(override var map: Map<*, *>) : JStruct { +internal class JWidevineConfig( + override var map: Map<*, *>, +) : JStruct { val prepareMessage by GetBool val prepareLicense by GetBool val licenseUrl by GetString @@ -70,7 +82,9 @@ internal class JWidevineConfig(override var map: Map<*, *>) : JStruct { val httpHeaders by GetStringMap } -internal class JStyleConfig(override var map: Map<*, *>) : JStruct { +internal class JStyleConfig( + override var map: Map<*, *>, +) : JStruct { val isUiEnabled by GetBool val isHideFirstFrame by GetBool val supplementalPlayerUiCss by GetString @@ -79,7 +93,9 @@ internal class JStyleConfig(override var map: Map<*, *>) : JStruct { val playerUiJs by GetString } -internal class JPlaybackConfig(override var map: Map<*, *>) : JStruct { +internal class JPlaybackConfig( + override var map: Map<*, *>, +) : JStruct { val isAutoplayEnabled by GetBool val isMuted by GetBool val isTimeShiftEnabled by GetBool @@ -91,16 +107,22 @@ internal class JPlaybackConfig(override var map: Map<*, *>) : JStruct { val seekMode by enumGetter() } -internal class JLicensingConfig(override var map: Map<*, *>) : JStruct { +internal class JLicensingConfig( + override var map: Map<*, *>, +) : JStruct { val delay by GetInt } -internal class JLiveConfig(override var map: Map<*, *>) : JStruct { +internal class JLiveConfig( + override var map: Map<*, *>, +) : JStruct { val minTimeShiftBufferDepth by GetDouble val liveEdgeOffset by GetDouble } -internal class JAnalyticsConfig(override var map: Map<*, *>) : JStruct { +internal class JAnalyticsConfig( + override var map: Map<*, *>, +) : JStruct { val licenseKey by GetString.require() val adTrackingDisabled by GetBool val randomizeUserId by GetBool @@ -116,13 +138,17 @@ internal class JAnalyticsConfig(override var map: Map<*, *>) : JStruct { val defaultMetadata by structGetter(::JDefaultMetadata) } -internal class JDefaultMetadata(override var map: Map<*, *>) : JStruct { +internal class JDefaultMetadata( + override var map: Map<*, *>, +) : JStruct { val cdnProvider by GetString val customUserId by GetString val customData by structGetter(::JCustomData) } -internal class JCustomData(override var map: Map<*, *>) : JStruct { +internal class JCustomData( + override var map: Map<*, *>, +) : JStruct { val customData1 by GetString val customData2 by GetString val customData3 by GetString @@ -156,7 +182,9 @@ internal class JCustomData(override var map: Map<*, *>) : JStruct { val experimentName by GetString } -internal class JPlayerConfig(override var map: Map<*, *>) : JStruct { +internal class JPlayerConfig( + override var map: Map<*, *>, +) : JStruct { val key by GetString val styleConfig by structGetter(::JStyleConfig) val playbackConfig by structGetter(::JPlaybackConfig) @@ -166,7 +194,9 @@ internal class JPlayerConfig(override var map: Map<*, *>) : JStruct { val remoteControlConfig by structGetter(::JRemoteControlConfig) } -internal class JRemoteControlConfig(override var map: Map<*, *>) : JStruct { +internal class JRemoteControlConfig( + override var map: Map<*, *>, +) : JStruct { val receiverStylesheetUrl by GetString val customReceiverConfig by GetStringMap val isCastEnabled by GetBool @@ -175,7 +205,9 @@ internal class JRemoteControlConfig(override var map: Map<*, *>) : JStruct { val sendDrmLicenseRequestsWithCredentials by GetBool } -internal class JSubtitleTrack(override var map: Map<*, *>) : JStruct { +internal class JSubtitleTrack( + override var map: Map<*, *>, +) : JStruct { constructor(subtitleTrack: SubtitleTrack) : this(emptyMap()) { url = subtitleTrack.url id = subtitleTrack.id @@ -199,7 +231,9 @@ internal class JSubtitleTrack(override var map: Map<*, *>) : JStruct { /** Arguments for all [Player] methods. */ @JvmInline -internal value class JMethodArgs(private val call: MethodCall) { +internal value class JMethodArgs( + private val call: MethodCall, +) { val asCreatePlayerArgs get() = JCreatePlayerArgs(asMap) val asPlayerMethodArgs get() = JPlayerMethodArg(asMap) val asCastManagerOptions get() = JBitmovinCastManagerOptions(asMap) @@ -208,25 +242,33 @@ internal value class JMethodArgs(private val call: MethodCall) { } /** Arguments for [BitmovinCastManager.initialize] */ -internal class JBitmovinCastManagerOptions(override var map: Map<*, *>) : JStruct { +internal class JBitmovinCastManagerOptions( + override var map: Map<*, *>, +) : JStruct { val applicationId by GetString val messageNamespace by GetString } /** Arguments for [BitmovinCastManager.sendMessage] */ -internal class JBitmovinCastManagerSendMessageArgs(override var map: Map<*, *>) : JStruct { +internal class JBitmovinCastManagerSendMessageArgs( + override var map: Map<*, *>, +) : JStruct { val message by GetString val messageNamespace by GetString } /** Arguments for [Player.create]. */ -internal class JCreatePlayerArgs(override var map: Map<*, *>) : JStruct { +internal class JCreatePlayerArgs( + override var map: Map<*, *>, +) : JStruct { val id by GetString.require() val playerConfig by structGetter(::JPlayerConfig).require() } /** Argument for all [Player] instance methods. */ -internal class JPlayerMethodArg(override var map: Map<*, *>) : JStruct { +internal class JPlayerMethodArg( + override var map: Map<*, *>, +) : JStruct { val asDouble get() = data as Double val asString get() = data as String val asOptionalString get() = data as String? @@ -237,18 +279,24 @@ internal class JPlayerMethodArg(override var map: Map<*, *>) : JStruct { private val dataAsMap get() = data as Map<*, *> } -internal class JPlayerViewCreateArgs(override var map: Map<*, *>) : JStruct { +internal class JPlayerViewCreateArgs( + override var map: Map<*, *>, +) : JStruct { val playerId by GetString.require() val hasFullscreenHandler by GetBool.require() val isFullscreen by GetBool.require() val playerViewConfig by structGetter(::JPlayerViewConfig) } -internal class JPlayerViewConfig(override var map: Map<*, *>) : JStruct { +internal class JPlayerViewConfig( + override var map: Map<*, *>, +) : JStruct { val pictureInPictureConfig by structGetter(::JPictureInPictureConfig) } -internal class JPictureInPictureConfig(override var map: Map<*, *>) : JStruct { +internal class JPictureInPictureConfig( + override var map: Map<*, *>, +) : JStruct { val isEnabled by GetBool.require() val shouldEnterOnBackground by GetBool.require() } @@ -276,7 +324,9 @@ private inline fun getter(crossinline build: (I) -> O) = (thisRef.map[kProp.name] as I?)?.let(build) } -private open class JsonPropertyDelegate(val build: (I) -> O) : GetterSetter { +private open class JsonPropertyDelegate( + val build: (I) -> O, +) : GetterSetter { override fun getValue( thisRef: JStruct, property: KProperty<*>, diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonToNative.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonToNative.kt index ab410acc..c40a3402 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonToNative.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/json/JsonToNative.kt @@ -38,7 +38,8 @@ internal fun JSourceConfig.toNative() = } internal fun JSourceMetadata.toNative() = - SourceMetadata.Builder() + SourceMetadata + .Builder() .apply { cdnProvider?.let { setCdnProvider(it) } isLive?.let { setIsLive(it) } @@ -76,55 +77,61 @@ internal fun JPlayerConfig.toNative() = } internal fun JAnalyticsConfig.toNative(): AnalyticsConfig = - AnalyticsConfig.Builder(licenseKey = licenseKey).apply { - adTrackingDisabled?.let { setAdTrackingDisabled(it) } - backendUrl?.let { setBackendUrl(it) } - randomizeUserId?.let { setRandomizeUserId(it) } - retryPolicy?.let { setRetryPolicy(it) } - }.build() + AnalyticsConfig + .Builder(licenseKey = licenseKey) + .apply { + adTrackingDisabled?.let { setAdTrackingDisabled(it) } + backendUrl?.let { setBackendUrl(it) } + randomizeUserId?.let { setRandomizeUserId(it) } + retryPolicy?.let { setRetryPolicy(it) } + }.build() internal fun JDefaultMetadata.toNative(): DefaultMetadata = - DefaultMetadata.Builder().apply { - cdnProvider?.let { setCdnProvider(it) } - customData?.let { setCustomData(it.toNative()) } - customUserId?.let { setCustomUserId(it) } - customData?.let { setCustomData(it.toNative()) } - }.build() + DefaultMetadata + .Builder() + .apply { + cdnProvider?.let { setCdnProvider(it) } + customData?.let { setCustomData(it.toNative()) } + customUserId?.let { setCustomUserId(it) } + customData?.let { setCustomData(it.toNative()) } + }.build() internal fun JCustomData.toNative(): CustomData = - CustomData.Builder().apply { - customData1?.let { setCustomData1(it) } - customData2?.let { setCustomData2(it) } - customData3?.let { setCustomData3(it) } - customData4?.let { setCustomData4(it) } - customData5?.let { setCustomData5(it) } - customData6?.let { setCustomData6(it) } - customData7?.let { setCustomData7(it) } - customData8?.let { setCustomData8(it) } - customData9?.let { setCustomData9(it) } - customData10?.let { setCustomData10(it) } - customData11?.let { setCustomData11(it) } - customData12?.let { setCustomData12(it) } - customData13?.let { setCustomData13(it) } - customData14?.let { setCustomData14(it) } - customData15?.let { setCustomData15(it) } - customData16?.let { setCustomData16(it) } - customData17?.let { setCustomData17(it) } - customData18?.let { setCustomData18(it) } - customData19?.let { setCustomData19(it) } - customData20?.let { setCustomData20(it) } - customData21?.let { setCustomData21(it) } - customData22?.let { setCustomData22(it) } - customData23?.let { setCustomData23(it) } - customData24?.let { setCustomData24(it) } - customData25?.let { setCustomData25(it) } - customData26?.let { setCustomData26(it) } - customData27?.let { setCustomData27(it) } - customData28?.let { setCustomData28(it) } - customData29?.let { setCustomData29(it) } - customData30?.let { setCustomData30(it) } - experimentName?.let { setExperimentName(it) } - }.build() + CustomData + .Builder() + .apply { + customData1?.let { setCustomData1(it) } + customData2?.let { setCustomData2(it) } + customData3?.let { setCustomData3(it) } + customData4?.let { setCustomData4(it) } + customData5?.let { setCustomData5(it) } + customData6?.let { setCustomData6(it) } + customData7?.let { setCustomData7(it) } + customData8?.let { setCustomData8(it) } + customData9?.let { setCustomData9(it) } + customData10?.let { setCustomData10(it) } + customData11?.let { setCustomData11(it) } + customData12?.let { setCustomData12(it) } + customData13?.let { setCustomData13(it) } + customData14?.let { setCustomData14(it) } + customData15?.let { setCustomData15(it) } + customData16?.let { setCustomData16(it) } + customData17?.let { setCustomData17(it) } + customData18?.let { setCustomData18(it) } + customData19?.let { setCustomData19(it) } + customData20?.let { setCustomData20(it) } + customData21?.let { setCustomData21(it) } + customData22?.let { setCustomData22(it) } + customData23?.let { setCustomData23(it) } + customData24?.let { setCustomData24(it) } + customData25?.let { setCustomData25(it) } + customData26?.let { setCustomData26(it) } + customData27?.let { setCustomData27(it) } + customData28?.let { setCustomData28(it) } + customData29?.let { setCustomData29(it) } + customData30?.let { setCustomData30(it) } + experimentName?.let { setExperimentName(it) } + }.build() internal fun JStyleConfig.toNative() = StyleConfig( diff --git a/android/src/main/kotlin/com/bitmovin/player/flutter/ui/FlutterPictureInPictureHandler.kt b/android/src/main/kotlin/com/bitmovin/player/flutter/ui/FlutterPictureInPictureHandler.kt index 47ff3073..945e7ea7 100644 --- a/android/src/main/kotlin/com/bitmovin/player/flutter/ui/FlutterPictureInPictureHandler.kt +++ b/android/src/main/kotlin/com/bitmovin/player/flutter/ui/FlutterPictureInPictureHandler.kt @@ -41,7 +41,8 @@ class FlutterPictureInPictureHandler( ?: Rational(16, 9) val params = - PictureInPictureParams.Builder() + PictureInPictureParams + .Builder() .setAspectRatio(aspectRatio) .build()