Comments (2)
it don't work as there isn't any property as Controlls position that i could set as RESIZE_MODE_FILL in horizontal orientation.
from media.
`
@composable
fun XpPlayer() {
val context = LocalContext.current
fun buildCustomDrmSessionManager(): DrmSessionManager {
val userAgent = "1"
val dataSourceFactory = DefaultHttpDataSource.Factory().setUserAgent(userAgent)
.setDefaultRequestProperties(mapOf("X-AxDRM-Message" to ""))
val drmCallback: MediaDrmCallback = HttpMediaDrmCallback("", dataSourceFactory)
val exoMediaDrmProvider: ExoMediaDrm.Provider = FrameworkMediaDrm.DEFAULT_PROVIDER
return DefaultDrmSessionManager.Builder()
.setUuidAndExoMediaDrmProvider(C.WIDEVINE_UUID, exoMediaDrmProvider).build(drmCallback)
}
fun buildDrmMediaItemWithDrmConfig(): MediaItem {
return MediaItem.fromUri("https://travelxp.s.llnwi.net/watch1/61025c11781ce3c543f5abcd/manifest_v4.mpd")
}
val customDrmSessionManager = buildCustomDrmSessionManager()
val mediaSourceFactory =
DefaultMediaSourceFactory(context).setDrmSessionManagerProvider { customDrmSessionManager }
val loadControl = DefaultLoadControl.Builder().setBufferDurationsMs(
10000, 20000, 2000, 10000
).build()
val exoPlayer = remember {
ExoPlayer.Builder(context, mediaSourceFactory).setLoadControl(loadControl).build().also {
it.playWhenReady = true
}.apply {
setMediaItem(buildDrmMediaItemWithDrmConfig())
prepare()
}
}
DisposableEffect(Unit) {
onDispose {
exoPlayer.release()
}
}
AndroidView(modifier = Modifier
.border(2.dp, Color.Red)
.width(800.dp).aspectRatio(16/9f),
factory = {
PlayerView(context).apply {
useController = true
resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FILL
player = exoPlayer
setShowBuffering(PlayerView.SHOW_BUFFERING_WHEN_PLAYING)
hideController()
layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT)
}
})
}`
this is the code of my player. i put this code in my main activity. when i make player to be full screen then it is okay and then playback speed and audio selection dialog opens inside the player but when i make player with som height and width as in code then these dialogs(playback speed and audio selection) opens outside of the player. these are screen shotls related to this,
from media.
Related Issues (20)
- Rename setShowPlayButtonIfPlaybackIsSuppressed in MediaSession.Builder
- i'm facing an issue regarding the media3 exo player controlls position in a horizoantal tab . HOT 1
- Add charles/fiddler... proxy block when playing hls media
- Player does not upscale LL Stream once it get to lowest resolution HOT 6
- Video is cut on the edge when using Compose and uses RESIZE_MODE_ZOOM - Only Android 14 HOT 1
- [CMCD] Too many buffer starvation reports HOT 5
- Equalizer support
- ERROR_CODE_IO_UNSPECIFIED error on HLS stream HOT 11
- TTML subtitles - Opacity not compliant with TTML specification HOT 6
- [Transformer] Overlay rotation around the X and Y axles HOT 2
- How to set defaultPositionUs of a Window in the Timeline? HOT 2
- Non-Exoplayer TimeBar with Exoplayer Function
- Freezes and OutOfMemoryError in ExoPlayer HOT 1
- Video loaded from resources is stuck at BUFFERING state
- llegalArgumentException error in PlaybackStatsListener
- Pausing media and then destroying app holds notification, and at the same time the media buttons do not respond HOT 10
- ExoPlayer.setVideoEffects causes freezes etc HOT 6
- Automatically play when network is restored HOT 2
- Black screen when capturing some video
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from media.