// Path: chat-message-adapter/src/main/java/com/quickblox/ui/kit/chatmessage/adapter/media/AudioController.java
// public class AudioController implements MediaController {
//     private SingleMediaManager mediaManager;
//     private EventMediaController eventMediaController;
// 
//     public AudioController(SingleMediaManager mediaManager, EventMediaController eventMediaController) {
//         this.mediaManager = mediaManager;
//         this.eventMediaController = eventMediaController;
//     }
// 
//     @Override
//     public void onPlayClicked(QBPlaybackControlView view, Uri uri) {
//         eventMediaController.onPlayerInViewInit(view);
//         mediaManager.playMedia(view, uri);
//     }
// 
//     @Override
//     public void onPauseClicked() {
//         mediaManager.pauseMedia();
//     }
// 
//     @Override
//     public void onStopAnyPlayback() {
//         mediaManager.stopAnyPlayback();
//     }
// 
//     @Override
//     public void onStartPosition() {
//         mediaManager.onStartPosition();
//     }
// 
// }
// 
// Path: chat-message-adapter/src/main/java/com/quickblox/ui/kit/chatmessage/adapter/media/utils/ExoPlayerEventListenerImpl.java
// public class ExoPlayerEventListenerImpl implements Player.EventListener {
//     @Override
//     public void onTimelineChanged(Timeline timeline, Object manifest) {
// 
//     }
// 
//     @Override
//     public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) {
// 
//     }
// 
//     @Override
//     public void onLoadingChanged(boolean isLoading) {
// 
//     }
// 
//     @Override
//     public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
// 
//     }
// 
//     @Override
//     public void onRepeatModeChanged(int repeatMode) {
// 
//     }
// 
//     @Override
//     public void onPlayerError(ExoPlaybackException error) {
// 
//     }
// 
//     @Override
//     public void onPositionDiscontinuity() {
// 
//     }
// 
//     @Override
//     public void onPlaybackParametersChanged(PlaybackParameters playbackParameters) {
// 
//     }
// }


import android.content.Context;
import android.net.Uri;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.android.exoplayer2.ExoPlayer;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.ui.PlaybackControlView;
import com.quickblox.ui.kit.chatmessage.adapter.R;
import com.quickblox.ui.kit.chatmessage.adapter.media.AudioController;
import com.quickblox.ui.kit.chatmessage.adapter.media.utils.ExoPlayerEventListenerImpl;
package com.quickblox.ui.kit.chatmessage.adapter.media.view;



/**
 * Created by roman on 8/1/17.
 */

public class QBPlaybackControlView extends PlaybackControlView {
    private static String TAG = QBPlaybackControlView.class.getSimpleName();

    private static final int[] STATE_SET_PLAY =
            {R.attr.state_play, -R.attr.state_pause};
    private static final int[] STATE_SET_PAUSE =
            {-R.attr.state_play, R.attr.state_pause};

    private final TextView durationView;
    private final TextView positionView;

    private final View playButton;
    private final View pauseButton;
    private final ImageView iconPlayPauseView;

    private final ComponentListener componentListener;
// Path: chat-message-adapter/src/main/java/com/quickblox/ui/kit/chatmessage/adapter/media/AudioController.java
// public class AudioController implements MediaController {
//     private SingleMediaManager mediaManager;
//     private EventMediaController eventMediaController;
// 
//     public AudioController(SingleMediaManager mediaManager, EventMediaController eventMediaController) {
//         this.mediaManager = mediaManager;
//         this.eventMediaController = eventMediaController;
//     }
// 
//     @Override
//     public void onPlayClicked(QBPlaybackControlView view, Uri uri) {
//         eventMediaController.onPlayerInViewInit(view);
//         mediaManager.playMedia(view, uri);
//     }
// 
//     @Override
//     public void onPauseClicked() {
//         mediaManager.pauseMedia();
//     }
// 
//     @Override
//     public void onStopAnyPlayback() {
//         mediaManager.stopAnyPlayback();
//     }
// 
//     @Override
//     public void onStartPosition() {
//         mediaManager.onStartPosition();
//     }
// 
// }
// 
// Path: chat-message-adapter/src/main/java/com/quickblox/ui/kit/chatmessage/adapter/media/utils/ExoPlayerEventListenerImpl.java
// public class ExoPlayerEventListenerImpl implements Player.EventListener {
//     @Override
//     public void onTimelineChanged(Timeline timeline, Object manifest) {
// 
//     }
// 
//     @Override
//     public void onTracksChanged(TrackGroupArray trackGroups, TrackSelectionArray trackSelections) {
// 
//     }
// 
//     @Override
//     public void onLoadingChanged(boolean isLoading) {
// 
//     }
// 
//     @Override
//     public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
// 
//     }
// 
//     @Override
//     public void onRepeatModeChanged(int repeatMode) {
// 
//     }
// 
//     @Override
//     public void onPlayerError(ExoPlaybackException error) {
// 
//     }
// 
//     @Override
//     public void onPositionDiscontinuity() {
// 
//     }
// 
//     @Override
//     public void onPlaybackParametersChanged(PlaybackParameters playbackParameters) {
// 
//     }
// }


// Path: chat-message-adapter/src/main/java/com/quickblox/ui/kit/chatmessage/adapter/media/view/QBPlaybackControlView.java
import android.content.Context;
import android.net.Uri;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.android.exoplayer2.ExoPlayer;
import com.google.android.exoplayer2.Player;
import com.google.android.exoplayer2.ui.PlaybackControlView;
import com.quickblox.ui.kit.chatmessage.adapter.R;
import com.quickblox.ui.kit.chatmessage.adapter.media.AudioController;
import com.quickblox.ui.kit.chatmessage.adapter.media.utils.ExoPlayerEventListenerImpl;

package com.quickblox.ui.kit.chatmessage.adapter.media.view;



/**
 * Created by roman on 8/1/17.
 */

public class QBPlaybackControlView extends PlaybackControlView {
    private static String TAG = QBPlaybackControlView.class.getSimpleName();

    private static final int[] STATE_SET_PLAY =
            {R.attr.state_play, -R.attr.state_pause};
    private static final int[] STATE_SET_PAUSE =
            {-R.attr.state_play, R.attr.state_pause};

    private final TextView durationView;
    private final TextView positionView;

    private final View playButton;
    private final View pauseButton;
    private final ImageView iconPlayPauseView;

    private final ComponentListener componentListener;
    private AudioController mediaController;