@@ -25,7 +25,6 @@ import androidx.compose.runtime.remember
25
25
import androidx.compose.runtime.setValue
26
26
import androidx.compose.ui.Alignment
27
27
import androidx.compose.ui.Modifier
28
- import androidx.compose.ui.geometry.Size
29
28
import androidx.compose.ui.platform.LocalContext
30
29
import androidx.compose.ui.platform.LocalInspectionMode
31
30
import androidx.compose.ui.viewinterop.AndroidView
@@ -34,7 +33,6 @@ import androidx.media3.common.MediaItem
34
33
import androidx.media3.common.Player
35
34
import androidx.media3.common.Player.STATE_READY
36
35
import androidx.media3.common.Timeline
37
- import androidx.media3.common.VideoSize
38
36
import androidx.media3.exoplayer.ExoPlayer
39
37
import androidx.media3.ui.AspectRatioFrameLayout
40
38
import androidx.media3.ui.PlayerView
@@ -56,7 +54,6 @@ import io.element.android.libraries.mediaviewer.impl.local.player.seekToEnsurePl
56
54
import io.element.android.libraries.mediaviewer.impl.local.player.togglePlay
57
55
import io.element.android.libraries.mediaviewer.impl.local.rememberLocalMediaViewState
58
56
import kotlinx.coroutines.delay
59
- import me.saket.telephoto.zoomable.ZoomableContentLocation
60
57
import me.saket.telephoto.zoomable.zoomable
61
58
import kotlin.time.Duration.Companion.seconds
62
59
@@ -154,18 +151,6 @@ private fun ExoPlayerMediaVideoView(
154
151
isReady = playbackState == STATE_READY ,
155
152
)
156
153
}
157
-
158
- override fun onVideoSizeChanged (videoSize : VideoSize ) {
159
- // Ensure that the user cannot zoom/move outside of the video bounds
160
- localMediaViewState.zoomableState.setContentLocation(
161
- ZoomableContentLocation .scaledInsideAndCenterAligned(
162
- Size (
163
- videoSize.width.toFloat(),
164
- videoSize.height.toFloat(),
165
- )
166
- )
167
- )
168
- }
169
154
}
170
155
}
171
156
0 commit comments