Skip to content
Snippets Groups Projects
Commit 69a8f5f8 authored by Thomas Guillem's avatar Thomas Guillem
Browse files

LibVLC: send initial encodings from registerAudioPlugV21

Get the already existing audio plug sticky intent (if exists) and process it.
parent 33b7cc10
No related branches found
No related tags found
No related merge requests found
......@@ -439,7 +439,9 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
private void registerAudioPlugV21(boolean register) {
if (register) {
final IntentFilter intentFilter = new IntentFilter(AudioManager.ACTION_HDMI_AUDIO_PLUG);
mLibVLC.mAppContext.registerReceiver(mAudioPlugReceiver, intentFilter);
final Intent stickyIntent = mLibVLC.mAppContext.registerReceiver(mAudioPlugReceiver, intentFilter);
if (stickyIntent != null)
mAudioPlugReceiver.onReceive(mLibVLC.mAppContext, stickyIntent);
} else {
mLibVLC.mAppContext.unregisterReceiver(mAudioPlugReceiver);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment