Skip to content

avirias/AudioFocus-Player-Android

Repository files navigation

AudioFocus-Player-Android

Download

A Wrapper over the Android Media Player Library that Plays a Media with Audio focus

Overview of Audio Focus Player library

  • Audio Focus player can be used to play any Media with Audio Focus
  • This library can be used to play a media with a Uri
  • Supports android versions above Android Oreo 8.0 ( API level 26 )
  • This library has a simple interface just Like Media Player API in android

Using Audio Focus Player Library in your Android application

Add this in your build.gradle

implementation 'com.avirias.audiofocus:audiofocus:1.0.0'

Then initialize it in onCreate() Method of Activity or Fragment :

AudioFocusPlayer audioFocusPlayer = new AudioFocusPlayer(context);

Initializing it with some customization

// Set a Datasource 
audioFocusPlayer.setDataSource(yourMediaUri);

Play or Pause it

// Play the Media 
audioFocusPlayer.play();

// Pause the Media 
audioFocusPlayer.pause();

About

MediaPlayer with Audio Focus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages