Play() methods plays from the beginning and doesn't work after play and SeekTo issue
See original GitHub issueI have this code:
private async void Play(fileUri) {
// e.g., fileUri = "http://somesite.com/someaudio.mp3";
await CrossMediaManager.Current.Play(fileUri);
}
And always I play the audio, it loads the audio through HTTP all again and plays from beginning. What’s the right way to handle the player?
Also, I have this:
private async void Pause(object obj) {
await CrossMediaManager.Current.Pause();
}
If I play a sound, pause it and play it again, it plays like a second and stops, I don’t know the reason.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Play() methods plays from the beginning and doesn't work ...
@jmartine2 I found the SeekTo method, but it only works after the player is already set. For example, in the if block below,...
Read more >android - MediaPlayer seekTo doesn't work
I've just experienced the same issue. The solution was to use MediaPlayer.OnSeekCompleteListener . However in my case there weren't any problems ...
Read more >MediaPlayer
Quickly bring your app to life with less code, using a modern declarative approach to UI, and the simplicity of Kotlin. ... Start...
Read more >YouTube Player API Reference for iframe Embeds
Embed a YouTube player in your application. ... then call the playVideoAt() function, the player will start playing at the beginning of the...
Read more >YouTube Embedded Players and Player Parameters
Overview. This document explains how to embed a YouTube player in your application and also defines the parameters that are available in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m honestly not sure. As I said, my only experience is with seeking while the media is already playing. Maybe someone else knows.
Here’s what I do:
When starting a song for the first time:
Pause:
CrossMediaManager.Current.Pause();
Resume:
await CrossMediaManager.Current.PlaybackController.Play();