Comments (7)
Glad I subscribed to this thread and discovered the createMessage
API too.
https://developer.android.com/media/media3/exoplayer/listening-to-player-events
@tonihei is there a way to keep a reference to the message to change it's setDeleteAfterDelivery
value after sending it?
Usage is the same as OP, I have users who want to be able to repeat A-B section of media, but should also be easily able to remove the repeat at any moment, would be nice to be able to embrace setDeleteAfterDelivery
and not manually resend a message when they are on repeat mode all.
from media.
This is an old user request, but I think as OP the notification and everything should still show the full media value.
Just when then user select repeat mode A-B he can move 2 bars in the player to select the points.
Anyway yes I can resend the message as needed, thanks, wonder how I missed that API.
from media.
ClippingConfiguration also works, but it also alters the duration and timebase of the clipped audio such that it starts at 00:00, and has a duration equal to the clipped segment. This isn't desirable when the clipping is done through a UI based on user selection.
Is this a problem because you are using Media3's default PlayerView
and can't achieve the desired UI? I assume when you are writing your own UI, you can design it in any way you'd like.
Polling mediaPosition can work but is error-prone and leads to verbose code
I wouldn't recommend it for looping, but if you'd like to trigger something at a certain playback position, you can use timed messages:
exoPlayer.createMessage(yourHandler)
.setLooper(player.getApplicationLooper()) // needed if you want to do something with your player here
.setPosition(targetPositionMs)
.send()
from media.
@tonihei We're using our own UI, but adding a clip configuration also modifies duration and seeking behavior. Even if we somehow fake that in our own UI, the notification would still behave in this way.
Interesting about the message -- wasn't aware of this API. For now we actually did handle this via polling but will check that out. Thanks!
from media.
but adding a clip configuration also modifies duration and seeking behavior. Even if we somehow fake that in our own UI,
Yes, you would need to adjust the duration/position yourself in this case.
the notification would still behave in this way
This is interesting, because you can't easily control that even if you wanted to. I can mark it as a feature request to allow this conversion to use the full duration without the clipping. We probably treat it as low priority for now though as you can workaround it yourself it seems. We also need additional metadata about the full item duration which we don't have at the moment.
from media.
@tonihei Definitely, it could be configurable as there are at least two use cases here -- either clipping to a segment and making that the new media, or looping between A and B without clipping.
I think for our use case, the message handler might actually work well since we don't need looping to exact frame positions (I can see how that might be useful for others though). Depends on how much latency there is vs polling -- will have to test!
from media.
@Tolriq: Do you also care about how this clipping is displayed in media notifications? If not, I suspect you are looking for a feature to change the clipping positions at run time (tracked by google/ExoPlayer#3163 still).
To your actual question: the message properties can't be changed after sending it as this is a bit unpredictable. I think you could solve this yourself though by just resending a message when receiving the last one if needed (and always using the default deleterAfterDelivery==false
.
from media.
Related Issues (20)
- Creating a composition with an edited video and an image applies the image on top of the video as an overlay instead of displaying the image after the video HOT 1
- IMA SDK extension that supports HLS streams chunkless preparation flag HOT 5
- Support HLS AES-128 encryption with Key Rotation
- RTSP 265 android.media.MediaCodec$CodecException Decoder failed: c2.exynos.hevc.decoder
- Black screen after exit fullscreen
- Use ExoPlayer to access special metadata in DASH manifest HOT 1
- Will there be a composition preview support in the new 1.4.0 release HOT 1
- Call PrepareSource method Multiple times in LazyMediaSource HOT 3
- AdsMediaSource is causing Exoplayer IMA SDK library extension to not play ads every playback session HOT 2
- Exoplayer EOFException for progressive streams with moov atom at the end of the mp4 file HOT 5
- Incorrect mapping of Metadata to tag fields HOT 6
- play MP4 video fail, which contains 'elst' box and be encrypted by cenc-aes-ctr HOT 1
- Using Media3 Transformer library, Want to get the video duration and size by passing the start and end Milliseconds Out of the complete video file. HOT 6
- MediaMetadata doesn't include some ID3 tags HOT 5
- Forcing the MediaSession to reload metadata/bitmap? HOT 12
- Motorola Moto G20 bug: Offline Widevine DRM playback error gives "Crypto key not available" HOT 3
- Full screen button don't change on auto rotate of device in exo player with jetpack compsoe. HOT 1
- RTMP does not output video HOT 5
- 10bit H265 HVEC video link mkv not working HOT 1
- Document the fact that `desugar_jdk_libs` is required for media3 to work on old API levels HOT 1
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.