title: setDataSource failed status 0xFFFFFFEA on Android Studio
body: <p>I have a problem with a Fragment I made in Android Studio that displays a video and I can manipulate the preview using onTouch, but it's giving me this error in DataSource and I tried several ways to fix it but I shouldn't be focusing on the right place, can anyone help me? This is my onCreateView:</p>
  <pre><code> videoFile = &quot;/storage/emulated/0/Android/data/com.aquiles.autopixprototipo/files/Pictures/autopix/1HGCV1F10MA008296/360_VID20220113_163919.mp4&quot;;
  
   videoView = view.findViewById(R.id.video_view);
  
   File videoPath = new File(videoFile);
  
   Uri uri = Uri.fromFile(videoPath);
  
   videoView.setVideoURI(uri);
  
   videoView.seekTo(1);
   DisplayMetrics displayMetrics = new DisplayMetrics();
   getActivity().getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
  
   int screenHeight = displayMetrics.heightPixels;
   int screenWidth = displayMetrics.widthPixels;
  
   int maxX = (screenWidth / 2);
   int maxY = (screenHeight / 2);
  
   MediaMetadataRetriever retriever = new MediaMetadataRetriever();
   final AssetFileDescriptor afd = getResources().openRawResourceFd(R.raw.video);
  
   retriever.setDataSource(videoFile);
  
   String durationString = retriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION);
   int duration = Integer.parseInt(durationString);
   float changeRate = (screenHeight * 35)/2134;
  </code></pre>
  <p>Error:</p>
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
      Process: com.aquiles.autopixprototipo, PID: 9445
      java.lang.RuntimeException: setDataSource failed: status = 0xFFFFFFEA
          at android.media.MediaMetadataRetriever.setDataSource(Native Method)
          at android.media.MediaMetadataRetriever.setDataSource(MediaMetadataRetriever.java:75)
          at com.aquiles.autopixprototipo.fragment.Video360View.onCreateView(Video360View.java:118)
          at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2963)
          at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:518)
          at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
          at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
          at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2106)
          at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
          at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
          at android.os.Handler.handleCallback(Handler.java:883)
          at android.os.Handler.dispatchMessage(Handler.java:100)
          at android.os.Looper.loop(Looper.java:214)
          at android.app.ActivityThread.main(ActivityThread.java:7356)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
  I/Process: Sending signal. PID: 9445 SIG: 9
  </code></pre>