AndroidVideoPlayer play videos online
AndroidVideoPlayer plays a video online. The custom SuperVideoPlayer encapsulates the startPlayVideo () Playing video loadAndPlay (String videoUrl, int seekTime) to load and start playing the video. loadVideo (String videoUrl) loads the video, when playVideoAtLastPos () is changed to a definition address, loadMultipleVideo (ArrayList <Video> allVideo) plays multiple videos. Other methods: callback/*** call back after rotating the screen * @ param newConfig */@ Override public void onConfigurationChanged (C Onfiguration newConfig) {super. onConfigurationChanged (newConfig); if (null = mSuperVideoPlayer) return;/***** reset the player Size Based on the screen direction */if (this. getResources (). getConfiguration (). orientation = Configuration. ORIENTATION_LANDSCAPE) {getWindow (). setFlags (WindowManager. layoutParams. FLAG_FULLSCREEN, WindowManager. layoutParams. FLAG_FULLSCREEN); getWindow (). getDecorView (). invalidate (); float height = Densit YUtil. getWidthInPx (this); float width = DensityUtil. getHeightInPx (this); mSuperVideoPlayer. getLayoutParams (). height = (int) width; mSuperVideoPlayer. getLayoutParams (). width = (int) height;} else if (this. getResources (). getConfiguration (). orientation = Configuration. ORIENTATION_PORTRAIT) {final WindowManager. layoutParams attrs = getWindow (). getAttributes (); attrs. flags & = (~ WindowManager. layoutParams. FLAG_FULLSCREEN); getWindow (). setAttributes (attrs); getWindow (). clearFlags (WindowManager. layoutParams. FLAG_LAYOUT_NO_LIMITS); float width = DensityUtil. getWidthInPx (this); float height = DensityUtil. dip2px (this, 230.f); mSuperVideoPlayer. getLayoutParams (). height = (int) height; mSuperVideoPlayer. getLayoutParams (). width = (int) width ;}}/*** restore screen to portrait */private void resetPageToPortrait () {if (getRequestedOrientation () = ActivityInfo. SCREEN_ORIENTATION_LANDSCAPE) {setRequestedOrientation (ActivityInfo. SCREEN_ORIENTATION_PORTRAIT); mSuperVideoPlayer. setPageType (MediaController. pageType. SHRINK );}}