Prepares release 1.2.4
This commit is contained in:
parent
1a96f4a3c7
commit
b17881f504
|
@ -7,8 +7,8 @@ android {
|
||||||
applicationId "fr.gouv.etalab.mastodon"
|
applicationId "fr.gouv.etalab.mastodon"
|
||||||
minSdkVersion 15
|
minSdkVersion 15
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
versionCode 20
|
versionCode 21
|
||||||
versionName "1.2.3"
|
versionName "1.2.4"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
|
Binary file not shown.
|
@ -53,6 +53,8 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
private ProgressBar pbar;
|
private ProgressBar pbar;
|
||||||
|
private static boolean isVideoFullscreen;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -105,7 +107,6 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
FrameLayout webview_container = (FrameLayout) findViewById(R.id.webview_container);
|
FrameLayout webview_container = (FrameLayout) findViewById(R.id.webview_container);
|
||||||
final ViewGroup videoLayout = (ViewGroup) findViewById(R.id.videoLayout); // Your own view, read class comments
|
final ViewGroup videoLayout = (ViewGroup) findViewById(R.id.videoLayout); // Your own view, read class comments
|
||||||
|
|
||||||
|
|
||||||
MastalabWebChromeClient mastalabWebChromeClient = new MastalabWebChromeClient(webView, webview_container, videoLayout);
|
MastalabWebChromeClient mastalabWebChromeClient = new MastalabWebChromeClient(webView, webview_container, videoLayout);
|
||||||
mastalabWebChromeClient.setOnToggledFullscreen(new ToggledFullscreenCallback() {
|
mastalabWebChromeClient.setOnToggledFullscreen(new ToggledFullscreenCallback() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -146,6 +147,7 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy(){
|
public void onDestroy(){
|
||||||
|
isVideoFullscreen = false;
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -177,20 +179,19 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private class MastalabWebChromeClient extends WebChromeClient implements MediaPlayer.OnPreparedListener, MediaPlayer.OnCompletionListener, MediaPlayer.OnErrorListener {
|
private class MastalabWebChromeClient extends WebChromeClient implements MediaPlayer.OnCompletionListener, MediaPlayer.OnErrorListener {
|
||||||
|
|
||||||
private FrameLayout videoViewContainer;
|
private FrameLayout videoViewContainer;
|
||||||
private CustomViewCallback videoViewCallback;
|
private CustomViewCallback videoViewCallback;
|
||||||
|
|
||||||
private ToggledFullscreenCallback toggledFullscreenCallback;
|
private ToggledFullscreenCallback toggledFullscreenCallback;
|
||||||
private boolean isVideoFullscreen;
|
|
||||||
private WebView webView;
|
private WebView webView;
|
||||||
private View activityNonVideoView;
|
private View activityNonVideoView;
|
||||||
private ViewGroup activityVideoView;
|
private ViewGroup activityVideoView;
|
||||||
private View loadingView;
|
|
||||||
|
|
||||||
MastalabWebChromeClient(WebView webView, FrameLayout webviewContainer, ViewGroup videoLayout){
|
MastalabWebChromeClient(WebView webView, FrameLayout webviewContainer, ViewGroup videoLayout){
|
||||||
this.isVideoFullscreen = false;
|
isVideoFullscreen = false;
|
||||||
this.webView = webView;
|
this.webView = webView;
|
||||||
this.activityNonVideoView = webviewContainer;
|
this.activityNonVideoView = webviewContainer;
|
||||||
this.activityVideoView = videoLayout;
|
this.activityVideoView = videoLayout;
|
||||||
|
@ -259,7 +260,6 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
// android.widget.VideoView (typically API level <11)
|
// android.widget.VideoView (typically API level <11)
|
||||||
android.widget.VideoView videoView = (android.widget.VideoView) focusedChild;
|
android.widget.VideoView videoView = (android.widget.VideoView) focusedChild;
|
||||||
// Handle all the required events
|
// Handle all the required events
|
||||||
videoView.setOnPreparedListener(this);
|
|
||||||
videoView.setOnCompletionListener(this);
|
videoView.setOnCompletionListener(this);
|
||||||
videoView.setOnErrorListener(this);
|
videoView.setOnErrorListener(this);
|
||||||
} else {
|
} else {
|
||||||
|
@ -336,14 +336,6 @@ public class WebviewActivity extends AppCompatActivity {
|
||||||
return super.getVideoLoadingProgressView();
|
return super.getVideoLoadingProgressView();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video will start playing, only called in the case of android.widget.VideoView (typically API level <11)
|
|
||||||
@Override
|
|
||||||
public void onPrepared(MediaPlayer mp) {
|
|
||||||
if (loadingView != null) {
|
|
||||||
loadingView.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Video finished playing, only called in the case of android.widget.VideoView (typically API level <11)
|
// Video finished playing, only called in the case of android.widget.VideoView (typically API level <11)
|
||||||
@Override
|
@Override
|
||||||
public void onCompletion(MediaPlayer mp) {
|
public void onCompletion(MediaPlayer mp) {
|
||||||
|
|
Loading…
Reference in New Issue