From b32741eaff6e3d6eef652b8a2413c92f534d91de Mon Sep 17 00:00:00 2001 From: Elad Gil Date: Thu, 2 Jul 2020 16:20:11 +0300 Subject: [PATCH 1/3] support new urls.intent event. c bump sample app 11. --- samples/helloeko/build.gradle | 2 +- sdk/src/main/java/com/eko/sdk/EkoPlayer.kt | 2 +- sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/helloeko/build.gradle b/samples/helloeko/build.gradle index a354e53..7c1bd46 100644 --- a/samples/helloeko/build.gradle +++ b/samples/helloeko/build.gradle @@ -10,7 +10,7 @@ android { applicationId "com.eko.sdktest" minSdkVersion 21 targetSdkVersion 28 - versionCode 10 + versionCode 11 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/sdk/src/main/java/com/eko/sdk/EkoPlayer.kt b/sdk/src/main/java/com/eko/sdk/EkoPlayer.kt index d78f5c7..83dfb92 100644 --- a/sdk/src/main/java/com/eko/sdk/EkoPlayer.kt +++ b/sdk/src/main/java/com/eko/sdk/EkoPlayer.kt @@ -94,7 +94,7 @@ class EkoPlayer : FrameLayout { private fun onJSEvent(type: String, args: JSONArray?) { if (coverShown && type == "eko.canplay") { removeCover() - } else if (type == "eko.urls.openinparent") { + } else if (type == "eko.urls.intent") { val url = args?.getJSONObject(0)?.getString("url") ?: return // event is malformed so we return if (urlListener != null) { diff --git a/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt b/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt index da5d49b..38c4ccb 100644 --- a/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt +++ b/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt @@ -24,7 +24,7 @@ class EkoProjectLoader { throw EkoPlayerError(EkoPlayerError.TYPE.MALFORMED_RESPONSE, "URL not found - Missing embed url in response") } - var url = "${json.getString("embedUrl")}/?embedapi=1.0&sharemode=proxy" + var url = "${json.getString("embedUrl")}/?embedapi=1.0&sharemode=proxy&urlmode=proxy" config.params.forEach { entry -> url += "&${entry.key}=${entry.value}" } From 327e68818f498bfafb26a3d944211c0b1ccbec51 Mon Sep 17 00:00:00 2001 From: Elad Gil Date: Wed, 22 Jul 2020 14:52:10 +0300 Subject: [PATCH 2/3] changed urlmode to urlsmode --- sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt b/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt index 38c4ccb..1f75ea9 100644 --- a/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt +++ b/sdk/src/main/java/com/eko/sdk/EkoProjectLoader.kt @@ -24,7 +24,7 @@ class EkoProjectLoader { throw EkoPlayerError(EkoPlayerError.TYPE.MALFORMED_RESPONSE, "URL not found - Missing embed url in response") } - var url = "${json.getString("embedUrl")}/?embedapi=1.0&sharemode=proxy&urlmode=proxy" + var url = "${json.getString("embedUrl")}/?embedapi=1.0&sharemode=proxy&urlsmode=proxy" config.params.forEach { entry -> url += "&${entry.key}=${entry.value}" } From 8ea60ad7ee19def648de65199f250b87cba68667 Mon Sep 17 00:00:00 2001 From: Elad Gil Date: Wed, 22 Jul 2020 14:52:29 +0300 Subject: [PATCH 3/3] v bump sample app 12 --- samples/helloeko/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/helloeko/build.gradle b/samples/helloeko/build.gradle index 7c1bd46..52e06e5 100644 --- a/samples/helloeko/build.gradle +++ b/samples/helloeko/build.gradle @@ -10,7 +10,7 @@ android { applicationId "com.eko.sdktest" minSdkVersion 21 targetSdkVersion 28 - versionCode 11 + versionCode 12 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" }