Skip to content

Commit

Permalink
Add @UnstableApi annotations to Media3 components
Browse files Browse the repository at this point in the history
Annotated PlayerView and ExoPlayer-related classes with @UnstableApi to acknowledge dependency on unstable APIs from Media3. This ensures clarity around the use of experimental or evolving Media3 features.
  • Loading branch information
kdroidFilter committed Jan 28, 2025
1 parent e322cd6 commit 419bce7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.runtime.setValue
import androidx.media3.common.MediaItem
import androidx.media3.common.Player
import androidx.media3.common.PlaybackException
import androidx.media3.common.util.UnstableApi
import androidx.media3.exoplayer.ExoPlayer
import androidx.media3.exoplayer.DefaultRenderersFactory
import androidx.media3.exoplayer.audio.AudioSink
Expand All @@ -26,6 +27,7 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.isActive
import kotlinx.coroutines.launch

@UnstableApi
@Stable
actual open class VideoPlayerState {
private val context = ContextProvider.getContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ package io.github.kdroidfilter.composemediaplayer
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.viewinterop.AndroidView
import androidx.media3.common.util.UnstableApi
import androidx.media3.ui.PlayerView

@UnstableApi
@Composable
actual fun VideoPlayerSurface(playerState: VideoPlayerState, modifier: Modifier) {
AndroidView(
Expand Down

0 comments on commit 419bce7

Please sign in to comment.