https://kotlinlang.org logo
#compose
Title
# compose
d

dambakk

10/02/2023, 6:00 AM
Hi! I use
onGloballyPositioned
on a card to calculate some scale and parallax effect and it works great, but when the card contains a media3/exoPlayer
PlayerView
with a video playing,
onGloballyPositioned
on the outer card is invoked continuously. Is that by design? I've added some countermeasure (e.g. check if card is visible on screen) to not do calculations on every invocation, but I just want to know if this should be raised as an issue or not.
c

Chris Fillmore

10/02/2023, 2:17 PM
What is the value of
surface_type
on your PlayerView?
z

Zach Klippenstein (he/him) [MOD]

10/02/2023, 5:40 PM
If that callback is being triggered on every frame that sounds like a bug, or at least something we should try to fix for performance. Please file
👍 1