title: How to initialise exoplayer to play dash(.mpd) videos
body: <p>I have the playlist of dash videos and this was the code I used to play the media when the version was 2.7.3. Now I have updated to 2.9.5, I'm facing issues.</p>
  
  <p><strong>My init and mediasource methods :</strong> </p>
  
  <pre><code>private void initializePlayer() {
         if (player == null) {
    // a factory to create an AdaptiveVideoTrackSelection
    TrackSelection.Factory adaptiveTrackSelectionFactory =
            new AdaptiveTrackSelection.Factory(BANDWIDTH_METER);
  
    player = ExoPlayerFactory.newSimpleInstance(
            new DefaultRenderersFactory(this),
            new DefaultTrackSelector(adaptiveTrackSelectionFactory),
            new DefaultLoadControl());
    player = ExoPlayerFactory.newSimpleInstance(new DefaultRenderersFactory(this),
            new DefaultTrackSelector(), new DefaultLoadControl());
    playerView.setPlayer(player);
    player.addListener(new PlayerEventListener());
          /*player.setPlayWhenReady(playWhenReady);
          player.seekTo(currentWindow, playbackPosition);*/
  }
  
  playListMediaSources = buildPlayListMediaSource(serialURLs);
  
  concatenatingMediaSource = new ConcatenatingMediaSource(playListMediaSources);
  
  player.prepare(concatenatingMediaSource, true, false);
  player.setPlayWhenReady(playWhenReady);
  player.seekTo(currentWindow, playbackPosition);
      }
  
  
  
  private MediaSource buildMediaSource(Uri uri) {
  
    /*  DefaultExtractorsFactory defaultExtractorsFactory = new DefaultExtractorsFactory();
      DefaultHttpDataSourceFactory defaultHttpDataSourceFactory = new DefaultHttpDataSourceFactory("user-agent");*/
  
          DataSource.Factory manifestDataSourceFactory =
                  new DefaultHttpDataSourceFactory("ua");
          DashChunkSource.Factory dashChunkSourceFactory =
                  new DefaultDashChunkSource.Factory(
                          new DefaultHttpDataSourceFactory("ua", BANDWIDTH_METER));
          return new DashMediaSource.Factory(dashChunkSourceFactory,
                  manifestDataSourceFactory).createMediaSource(uri);
      }
  
  
      private MediaSource[] buildPlayListMediaSource(String[] serialURLs) {
  
  
          MediaSource[] mediaSources = new MediaSource[serialURLs.length];
          Uri uri;
          for (int i = 0; i &lt; serialURLs.length; i++) {
              uri = Uri.parse(serialURLs[i]);
              mediaSources[i] = buildMediaSource(uri);
          }
          return mediaSources;
      }
  </code></pre>
  
  <p><strong>I modified my init code to this :</strong></p>
  
  <pre><code> private void initializePlayer() {
          if (player == null) {
  
              TrackSelection.Factory adaptiveTrackSelectionFactory = new AdaptiveTrackSelection.Factory();
  
             player = ExoPlayerFactory.newSimpleInstance(this,
                      new DefaultRenderersFactory(this),
                      new DefaultTrackSelector(adaptiveTrackSelectionFactory),
                      new DefaultLoadControl());
              player = ExoPlayerFactory.newSimpleInstance(this,new DefaultRenderersFactory(this),
                      new DefaultTrackSelector(), new DefaultLoadControl());
  
  
          }
  
  
              if (serialURLs != null) {
  
                  playListMediaSources = buildPlayListMediaSource(serialURLs);
                  concatenatingMediaSource = new ConcatenatingMediaSource(playListMediaSources);
                  player.prepare(concatenatingMediaSource, true, false);
                  player.setPlayWhenReady(playWhenReady);
                  player.seekTo(currentWindow, playbackPosition);
      }
      }
  </code></pre>
  
  <p>But failed to play the video. My guess is I have to make some changes in Media sources methods as well, but I'm unable to figure out the changes. With my current code, the log shows the following  error : </p>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: ExoPlayerImplInternal:Handler
      Process: com.packagename, PID: 2731
      java.lang.AbstractMethodError: abstract method "void com.google.android.exoplayer2.source.BaseMediaSource.prepareSourceInternal(com.google.android.exoplayer2.upstream.TransferListener)"
          at com.google.android.exoplayer2.source.BaseMediaSource.prepareSource(BaseMediaSource.java:140)
          at com.google.android.exoplayer2.ExoPlayerImplInternal.prepareInternal(ExoPlayerImplInternal.java:398)
          at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:285)
          at android.os.Handler.dispatchMessage(Handler.java:101)
          at android.os.Looper.loop(Looper.java:164)
          at android.os.HandlerThread.run(HandlerThread.java:65)
  </code></pre>
  
  <p>I'm adding this text to avoid mostly code error. Any help is appreciated. Thanks in advance.</p>