Is there any way to automatically get the audiodelay to set in the videoplayer? It is really annoying to fix it manually every time.
Exoplayer (google native player used in yt) is using the getLatency method, not part of the public SDK (https://github.com/google/ExoPlayer/blob/b5beb32618ac99adc58b537031a6f7c3dd761b9a/library/core/src/main/java/com/google/android/exoplayer2/audio/AudioTrackPositionTracker.java#L172) so I cant replicate this in due to xamarin not including this method in the c# wrapper
var method = typeof(AudioTrack).GetMethod("getLatency"); // => null
(Tried stuff from https://developer.amazon.com/docs/fire-tv/audio-video-synchronization.html#section1-2)
I also tried to find the native bindings the android audiotrack in vlc to get getTimestamp or getPlaybackHeadPosition, but I was unsucessfull.
Is there any way to get the audiodelay caused by bluetooth headphones in xamarin.forms on android?
Is there any way to get the android AudioTrack from libvlc (if that is even used)?
You can't. LibVLC does not offer to detect the latency caused by an external speaker.
Your best bet is to manually sync it with SetAudioDelay
(or write a libvlc plugin with that feature).
EDIT: Being told by a core dev that latency is handled on all platforms except Android. You might want to test it. In any case, it may happen in a future libvlc android version.