Hello, Has anyone worked with AVPlayer? - I'm tryi...
# compose-ios
g
Hello, Has anyone worked with AVPlayer? - I'm trying to get the
clickable
event from Box., but does not work like Android.
Copy code
Box(
        modifier = Modifier
            .fillMaxSize()
            .background(Color.Black)
            .testTag("VideoPlayer-Player")
            .clickable {
                viewModel.showControls = !viewModel.showControls
                println("🎯 Touch screen detected! -> Box ")
            }
    ) {
        PlayerView(
            avPlayerViewController = avPlayerViewController,
            modifier = Modifier.fillMaxSize(),
            onTouchScreen = {  }
        )
    }
r
https://github.com/rschattauer/compose_multiplatform I hope my repo helps. I do show controls on click :)
g
Hi @Richard Thank you for your response., your integration looks really solid and examples super helpfully., But for my integration I'm using personalized controls instead of the playbackControls from AVPlayer., My issue is the toggle behavior to display and hide my own controls from compose. blob nervous
Hey @Richard I found the approach that I want for, let me share the code: Now I can visualize the "Touch screen" message in the log, L142 <- handleTab @ObjCAction L162 <- UITapGestureRecognizer to attach the @ObjCAction
🫡 1
u