I’m getting a strange error code while trying to play video.
I get error code 1 (Which is ERROR_ UNKNOWN) and extra -2005 which has no documentation at all.
How can I possibly know why is this happening?
Thanks
01-09 09:50:36.903: E/MediaPlayer(3062): Error (1,-2005)
Here is the part when I play the video
if(m_videoView.canSeekForward() && seekTo > 0 && seekTo <= m_videoView.getDuration())
m_videoView.seekTo(seekTo);
m_videoView.start();
m_videoView.requestFocus();
m_videoView.setKeepScreenOn(true);
Here is where I get the url for playing
String url = data.replace('\"', ' ').trim();
try
{
URL _url = new URL(url);
_url.toURI();
}
catch(URISyntaxException ex)
{
Log.e("url from media", ex.getMessage() + " for " + url);
SystemUtils.alertMsg(getContext(), "There is a problem with this film right now.\nPlease try again later.");//getContext().getResources().getString(R.string.not_subscribed_msg));
dismiss();
playerLayout.findViewWithTag("progressbar").setVisibility(View.GONE);
return;
}
catch (MalformedURLException e)
{
Log.e("url from media", e.getMessage() + " for " + url);
SystemUtils.alertMsg(getContext(), "There is a problem with this film right now.\nPlease try again later.");//getContext().getResources().getString(R.string.not_subscribed_msg));
dismiss();
playerLayout.findViewWithTag("progressbar").setVisibility(View.GONE);
return;
}
url = url.replace("http", "widevine").replace("16.109", "16.1");
setFilePath(url);
The
-2005error code is likely to beERROR_DRM_DECRYPT(see http://code.metager.de/source/xref/android/4.1.1/frameworks/av/include/media/stagefright/MediaErrors.h#54) on ICS and later.EDIT: It could also be
DRM_ERROR_CANNOT_HANDLEif you’re on Gingerbread or earlier.