Skip to content

Commit e3bd587

Browse files
committed
fix: android - null check on getPosterImage()
1 parent efe5383 commit e3bd587

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

android/src/main/java/com/matejdr/brightcoveimaplayer/BrightcoveIMAPlayerPosterView.java

+6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ private void loadImage(Video video) {
8181
this.imageView.setImageResource(android.R.color.transparent);
8282
return;
8383
}
84+
85+
if (video.getPosterImage() == null) {
86+
this.imageView.setImageResource(android.R.color.transparent);
87+
return;
88+
}
89+
8490
String url = video.getPosterImage().toString();
8591
if (url == null) {
8692
this.imageView.setImageResource(android.R.color.transparent);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-brightcove-ima-player",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"description": "React Native implementation of Brightcove Player native SDK",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

0 commit comments

Comments
 (0)