try to create small video surface or video view and can change the parameter of view by display matrix
DisplayMetrics displaymetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
int height = displaymetrics.heightPixels;
int width = displaymetrics.widthPixels;
android.widget.FrameLayout.LayoutParams params = (android.widget.FrameLayout.LayoutParams) videoSurface.getLayoutParams();
params.width = width;
params.height=height-80;// -80 for android controls
params.setMargins(0, 0, 0, 50);
So to execute this code you can create your own Custom media controller or you can use set anchor by extending media controller.
1) Here is Custom media controller link Custom media controller
2)extending media controller and set anchor tag set anchor tag
public void setAnchorView(final View view) {
super.setAnchorView(view);
Button fullScreen = new Button(context);
fullScreen.setText("FullScreen");
Log.e("media controller","Set anchorView");
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params.setMargins(view.getWidth(), 0, 5, 20);
params.gravity = Gravity.RIGHT;
addView(fullScreen, params);
fullScreen.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Log.e("media controller","full screen onclick");
Intent i = new Intent("xyxyxyxhx");
context.sendBroadcast(i);
}
});
}