catch Video View error

madru

Active Member
Licensed User
Longtime User
Good day,

is it possible to overwrite the VideoView error message "Cannot play video | Sorry, this video cannot be played" in B4A ….like in Java?



THX :)
 

madru

Active Member
Licensed User
Longtime User
OK, or can we attach a setOnErrorListener event ?

B4X:
    this.videoView.setOnErrorListener(new MediaPlayer.OnErrorListener()
    {
      public boolean onError(MediaPlayer paramMediaPlayer, int paramInt1, int paramInt2)
      {
        Log.d("hasta", "Media PLayer Error");
        if (paramInt2 == -61)
          Player.this.finish();
        while (true)
        {
          return true;
          Toast.makeText(Player.this, "Sorry, this video cannot be played", 0).show();
        }
      }
    });
 
Last edited:
Upvote 0

RJB

Active Member
Licensed User
Longtime User
Hi,
old question I know, but did anyone ever find/ implement a way around this error message problem?
 
Upvote 0
Top