|
|
|
@ -30,31 +30,24 @@ import android.widget.Toast;
|
|
|
|
|
import android.widget.VideoView;
|
|
|
|
|
|
|
|
|
|
import com.google.android.exoplayer2.DefaultLoadControl;
|
|
|
|
|
import com.google.android.exoplayer2.ExoPlaybackException;
|
|
|
|
|
import com.google.android.exoplayer2.ExoPlayer;
|
|
|
|
|
import com.google.android.exoplayer2.ExoPlayerFactory;
|
|
|
|
|
import com.google.android.exoplayer2.LoadControl;
|
|
|
|
|
import com.google.android.exoplayer2.Player;
|
|
|
|
|
import com.google.android.exoplayer2.SimpleExoPlayer;
|
|
|
|
|
import com.google.android.exoplayer2.Timeline;
|
|
|
|
|
import com.google.android.exoplayer2.extractor.DefaultExtractorsFactory;
|
|
|
|
|
import com.google.android.exoplayer2.extractor.ExtractorsFactory;
|
|
|
|
|
import com.google.android.exoplayer2.source.ExtractorMediaSource;
|
|
|
|
|
import com.google.android.exoplayer2.source.MediaSource;
|
|
|
|
|
import com.google.android.exoplayer2.source.TrackGroupArray;
|
|
|
|
|
import com.google.android.exoplayer2.trackselection.AdaptiveTrackSelection;
|
|
|
|
|
import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
|
|
|
|
import com.google.android.exoplayer2.trackselection.TrackSelection;
|
|
|
|
|
import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
|
|
|
|
|
import com.google.android.exoplayer2.trackselection.TrackSelector;
|
|
|
|
|
import com.google.android.exoplayer2.ui.PlayerControlView;
|
|
|
|
|
import com.google.android.exoplayer2.ui.PlayerView;
|
|
|
|
|
import com.google.android.exoplayer2.ui.SimpleExoPlayerView;
|
|
|
|
|
import com.google.android.exoplayer2.upstream.BandwidthMeter;
|
|
|
|
|
import com.google.android.exoplayer2.upstream.DefaultBandwidthMeter;
|
|
|
|
|
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
|
|
|
|
|
|
|
|
|
import network.loki.messenger.R;
|
|
|
|
|
import org.thoughtcrime.securesms.attachments.AttachmentServer;
|
|
|
|
|
import org.thoughtcrime.securesms.logging.Log;
|
|
|
|
|
import org.thoughtcrime.securesms.mms.PartAuthority;
|
|
|
|
@ -64,6 +57,8 @@ import org.thoughtcrime.securesms.video.exo.AttachmentDataSourceFactory;
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
|
|
import network.loki.messenger.R;
|
|
|
|
|
|
|
|
|
|
public class VideoPlayer extends FrameLayout {
|
|
|
|
|
|
|
|
|
|
private static final String TAG = VideoPlayer.class.getSimpleName();
|
|
|
|
|