diff --git a/android/src/main/java/com/jiguang/jverify/JverifyPlugin.java b/android/src/main/java/com/jiguang/jverify/JverifyPlugin.java index 95dc2c0..79d2e5f 100644 --- a/android/src/main/java/com/jiguang/jverify/JverifyPlugin.java +++ b/android/src/main/java/com/jiguang/jverify/JverifyPlugin.java @@ -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"); @@ -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); diff --git a/example/android/app/src/main/res/drawable-hdpi/logo_cm.png b/example/android/app/src/main/res/drawable-hdpi/logo_cm.png new file mode 100644 index 0000000..af9787e Binary files /dev/null and b/example/android/app/src/main/res/drawable-hdpi/logo_cm.png differ diff --git a/example/android/app/src/main/res/drawable-hdpi/logo_ct.jpg b/example/android/app/src/main/res/drawable-hdpi/logo_ct.jpg new file mode 100644 index 0000000..fbed52e Binary files /dev/null and b/example/android/app/src/main/res/drawable-hdpi/logo_ct.jpg differ diff --git a/example/android/app/src/main/res/drawable-hdpi/logo_cu.jpg b/example/android/app/src/main/res/drawable-hdpi/logo_cu.jpg new file mode 100644 index 0000000..7fcd994 Binary files /dev/null and b/example/android/app/src/main/res/drawable-hdpi/logo_cu.jpg differ diff --git a/example/android/app/src/main/res/drawable-hdpi/main_bg.png b/example/android/app/src/main/res/drawable-hdpi/main_bg.png new file mode 100644 index 0000000..1e35906 Binary files /dev/null and b/example/android/app/src/main/res/drawable-hdpi/main_bg.png differ diff --git a/example/android/app/src/main/res/drawable-hdpi/main_v_bg.png b/example/android/app/src/main/res/drawable-hdpi/main_v_bg.png new file mode 100644 index 0000000..c37a9d2 Binary files /dev/null and b/example/android/app/src/main/res/drawable-hdpi/main_v_bg.png differ diff --git a/example/android/app/src/main/res/raw/main_vi.mp4 b/example/android/app/src/main/res/raw/main_vi.mp4 new file mode 100644 index 0000000..c348ad7 Binary files /dev/null and b/example/android/app/src/main/res/raw/main_vi.mp4 differ diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index 0be2a44..d28e2e1 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -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" diff --git a/example/lib/main.dart b/example/lib/main.dart index d97f565..27f69d3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -291,6 +291,9 @@ class _MyAppState extends State { /// 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; diff --git a/lib/jverify.dart b/lib/jverify.dart index 15925c6..ac24006 100644 --- a/lib/jverify.dart +++ b/lib/jverify.dart @@ -458,6 +458,8 @@ class JVUIConfig { /// 授权页背景图片 String? authBackgroundImage; String? authBGGifPath; // 授权界面gif图片 only android + String? authBGVideoPath; // 授权界面video + String? authBGVideoImgPath; // 授权界面video的第一频图片 /// 导航栏 int? navColor; @@ -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,