Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 904 Bytes

File metadata and controls

32 lines (26 loc) · 904 Bytes

HTTP Request Modification

In order to modify an HTTP Request with NexPlayer :

  1. Add the following code:
mNexPlayer.setProperty(NexProperty.ENABLE_MODIFY_HTTP_REQUEST, 1);

After init but before calling open in order to set the property ENABLE_MODIFY_HTTP_REQUEST to enabled.

  1. The following override code must also be included for onModifyHttpRequest:
@Override
public String onModifyHttpRequest(NexPlayer mp, int nRequestLength, Object in\_obj) {
	String strData = "";
	try {
		Log.d(LOG\_TAG, "HTTP\_REQUEST : requestLength :"+nRequestLength+".");
		strData = (String)in\_obj;
		Log.d(LOG\_TAG, "HTTP\_REQUEST DATA :" + strData);
		Log.d(LOG\_TAG, "HTTP\_REQUEST DATA SET END!!! strData.length:"+strData.length()+".");
		return strData;
	}
	catch(Exception e) {
		e.printStackTrace();
	}
	return strData;
}

See onModifyHttpRequest for more information.