title: How to setDataSource in Fragment
body: <p>This is the code but I keep getting an error on <code>setDataSource</code>, it works without an error when it's not in a fragment, so can someone please tell me how I can make it work?</p>
  
  <pre><code>try {
      player.setAudioStreamType(AudioManager.STREAM_MUSIC);
      player.setDataSource(this, Uri.parse("http://www.example.com/example.mp4"));
      player.setOnPreparedListener(this);
  } catch (IllegalArgumentException e) {
      e.printStackTrace();
  } catch (SecurityException e) {
      e.printStackTrace();
  } catch (IllegalStateException e) {
      e.printStackTrace();
  } catch (IOException e) {
      e.printStackTrace();
  }
  </code></pre>