Skip to content
Merged
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
8 changes: 8 additions & 0 deletions android/src/main/java/com/jiguang/jverify/JverifyPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,8 @@ private void layoutOriginOuthView(Map uiconfig, JVerifyUIConfig.Builder builder)
Object authBGGifPath = valueForKey(uiconfig, "authBGGifPath");

Object authBackgroundImage = valueForKey(uiconfig, "authBackgroundImage");
Object authBGVideoPath = valueForKey(uiconfig, "authBGVideoPath");
Object authBGVideoImgPath = valueForKey(uiconfig, "authBGVideoImgPath");

Object navColor = valueForKey(uiconfig, "navColor");
Object navText = valueForKey(uiconfig, "navText");
Expand Down Expand Up @@ -693,6 +695,12 @@ private void layoutOriginOuthView(Map uiconfig, JVerifyUIConfig.Builder builder)
}
}

if (authBGVideoPath != null) {
if (!((String)authBGVideoPath).startsWith("http"))
authBGVideoPath = "android.resource://"+context.getPackageName()+"/raw/"+authBGVideoPath;
builder.setAuthBGVideoPath((String) authBGVideoPath, (String) authBGVideoImgPath);
}

/************** nav ***************/
if (navHidden != null) {
builder.setNavHidden((Boolean) navHidden);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added example/android/app/src/main/res/raw/main_vi.mp4
Binary file not shown.
5 changes: 3 additions & 2 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=D:\Workspace\android\flutter"
export "FLUTTER_APPLICATION_PATH=D:\Workspace\work\work\jverify-flutter-plugin\example"
export "FLUTTER_ROOT=E:\flutter_windows_2.2.3-stable\flutter"
export "FLUTTER_APPLICATION_PATH=E:\Android\jiguang\jverify-flutter-plugin\example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
Expand Down
3 changes: 3 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ class _MyAppState extends State<MyApp> {
///
JVUIConfig uiConfig = JVUIConfig();
// uiConfig.authBGGifPath = "main_gif";
// uiConfig.authBGVideoPath="main_vi";
uiConfig.authBGVideoPath="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4";
uiConfig.authBGVideoImgPath="main_v_bg";

//uiConfig.navHidden = true;
uiConfig.navColor = Colors.red.value;
Expand Down
4 changes: 4 additions & 0 deletions lib/jverify.dart
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,8 @@ class JVUIConfig {
/// 授权页背景图片
String? authBackgroundImage;
String? authBGGifPath; // 授权界面gif图片 only android
String? authBGVideoPath; // 授权界面video
String? authBGVideoImgPath; // 授权界面video的第一频图片

/// 导航栏
int? navColor;
Expand Down Expand Up @@ -579,6 +581,8 @@ class JVUIConfig {
"privacyItem": privacyItem != null ? json.encode(privacyItem) : null,
"authBackgroundImage": authBackgroundImage ??= null,
"authBGGifPath": authBGGifPath ??= null,
"authBGVideoPath": authBGVideoPath ??= null,
"authBGVideoImgPath": authBGVideoImgPath ??= null,
"navColor": navColor ??= null,
"navText": navText ??= null,
"navTextColor": navTextColor ??= null,
Expand Down