Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide empty image when no video is present on QR +PIN auth, Fixes AB#3019283 #2424

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
V.Next
---------
- [PATCH] Provide empty image when no video is present on QR +PIN auth (#2424)

Version 18.1.0
----------
(common4j 15.1.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import android.app.AlertDialog;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Bundle;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -300,6 +301,17 @@ public void onPermissionRequest(final PermissionRequest request) {
}

}

@Override
public Bitmap getDefaultVideoPoster() {
// When not playing, video elements are represented by a 'poster' image.
// The image to use can be specified by the poster attribute of the video tag in HTML.
// If the attribute is absent, then a default poster will be used.
// This method allows the ChromeClient to provide that default image.
// On our case when an invalid QR code is provided, we will return a 10x10 empty image.
// Instead of the default grey playback image. #2424
return Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888);
p3dr0rv marked this conversation as resolved.
Show resolved Hide resolved
}
});
}

Expand Down
Loading