onMetaData, which occurs each time the player receives the media metadata.īy listening for these events, you can have more control over the playback process and enable your app to support data in custom formats (media metadata).onPlayerEvent, which reports the result of a seek operation to a new playback position.onPlayerStateChanged, which reports the playback state change.onPositionChanged, which reports the current playback progress.Call the registerPlayerObserver method in the AgoraMediaPlayerKit interface to register a player observer object ( playerObserver), and listen for the following playback events:.Implement the MediaPlayerObserver interface and instantiate a MediaPlayerObserver object.To play different media resources simultaneously, you should create multiple instances. Implementation Play media resources locally Īfter integrating the MediaPlayer Kit, follow these steps to implement the local playback function.Ĭreate an instance of AgoraMediaPlayerKit. Compile the source code of the RtcChannelPublishHelper to generate the aar file, copy the generated aar file to the app/libs directory.You still need to use Jcenter if you integrate the MediaPlayer Kit below v1.2.9.Īdd the following line in the /app/adle file of your project: Only applies to MediaPlayer Kit v1.2.9 and later. Method 1: Automatically integrate the MediaPlayer Kit with JitPack Integrate the MediaPlayer Kit Ĭhoose either of the following methods to integrate the MediaPlayer Kit into your project. Follow the on-screen instructions, if any, to install the plug-ins. Minimum API level: The minimum API level of the projectĬlick Finish.Language: The programming language of the project, for example, Java.Project location: The path to save the project.Package name: The name of the project package, for example, io.diaplayer.
0 Comments
Leave a Reply. |