Skip to content

Commit

Permalink
fix: log invalid playerId
Browse files Browse the repository at this point in the history
  • Loading branch information
krocard committed Dec 6, 2023
1 parent 4994562 commit d36c14d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class RNPlayerViewManager(private val context: ReactApplicationContext) : Simple
private fun attachPlayer(view: RNPlayerView, playerId: NativeId, playerConfig: ReadableMap?) {
runOnMainLooperAndLogException {
val player = playerId.let { context.playerModule?.getPlayerOrNull(it) }
?: throw InvalidParameterException("Cannot create a PlayerView, invalid playerId was passed.")
?: throw InvalidParameterException("Cannot create a PlayerView, invalid playerId was passed: $playerId")
val playbackConfig = playerConfig?.getMap("playbackConfig")
val isPictureInPictureEnabled = view.config?.pictureInPictureConfig?.isEnabled == true ||
playbackConfig?.getBooleanOrNull("isPictureInPictureEnabled") == true
Expand Down

0 comments on commit d36c14d

Please sign in to comment.