I'm working on a youtube / rtmp live video app using videoview and samples codes from all over the net so fall i have the app working but I'm facing a problem when i change orientation the live video rotates and expands fine but it doesn't go to a complete full screen, how can i setup a way to go to a complete full screen only when I go into landscape mode?
my main activity.
progressdialog = ProgressDialog.show(this, "", " Cargando vĂdeo por favor espere...", true);
progressdialog.setCancelable(true);
final VideoView vidView = (VideoView)findViewById(R.id.video_view);
String vidAddress = "http://videourl/playlist.m3u8";
Uri vidUri = Uri.parse(vidAddress);
vidView.setVideoURI(vidUri);
MediaController vidControl = new MediaController(this);
vidControl.setAnchorView(vidView);
vidView.setMediaController(vidControl);
vidView.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer arg0) {
progressdialog.dismiss();
vidView.start();
}
});
main xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white" >
<GridView
android:id="@+id/list_playlist"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_below="@+id/video_view"
android:layout_margin="5sp"
android:gravity="center"
android:numColumns="2"
android:scrollbars="none" >
</GridView>
<RelativeLayout
android:id="@+id/layout_ad"
android:layout_width="match_parent"
android:layout_height="50sp"
android:layout_alignParentBottom="true"
android:gravity="center_horizontal" >
</RelativeLayout>
<VideoView
android:id="@+id/video_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"/>