From 475c3cb18102de8e80d48cf6abe824a721eaaa0c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Date: Wed, 7 Feb 2024 22:50:09 +0100 Subject: [PATCH] Update ParsePlayUrl JS to version 37 with first support for micro pages (#85) --- src/main/resources/deeplink/v1/parsePlayUrl.js | 11 ++++++++++- src/main/resources/deeplink/v2/parsePlayUrl.js | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/main/resources/deeplink/v1/parsePlayUrl.js b/src/main/resources/deeplink/v1/parsePlayUrl.js index 1e142be..b9e5190 100644 --- a/src/main/resources/deeplink/v1/parsePlayUrl.js +++ b/src/main/resources/deeplink/v1/parsePlayUrl.js @@ -1,6 +1,6 @@ // parsePlayUrl -var parsePlayUrlVersion = 36; +var parsePlayUrlVersion = 37; var parsePlayUrlBuild = "mmf"; if (!console) { @@ -746,6 +746,15 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) { return openURL(server, bu, scheme, hostname, pathname, queryParams, anchor); } + /** + * Catch play micro pages urls + * + * Ex: https://www.srf.ch/play/tv/micropages/test-?pageId=3c2674b9-37a7-4e76-9398-bb710bd135ee + */ + if (pathname.includes("/micropages/")) { + return openURL(server, bu, scheme, hostname, pathname, queryParams, anchor); + } + /** * Catch play parameters urls * diff --git a/src/main/resources/deeplink/v2/parsePlayUrl.js b/src/main/resources/deeplink/v2/parsePlayUrl.js index e6e6623..f3545c1 100644 --- a/src/main/resources/deeplink/v2/parsePlayUrl.js +++ b/src/main/resources/deeplink/v2/parsePlayUrl.js @@ -1,6 +1,6 @@ // parsePlayUrl -var parsePlayUrlVersion = 36; +var parsePlayUrlVersion = 37; var parsePlayUrlBuild = "mmf"; if (!console) { @@ -711,6 +711,15 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) { return openURL(server, bu, scheme, hostname, pathname, queryParams, anchor); } + /** + * Catch play micro pages urls + * + * Ex: https://www.srf.ch/play/tv/micropages/test-?pageId=3c2674b9-37a7-4e76-9398-bb710bd135ee + */ + if (pathname.includes("/micropages/")) { + return openURL(server, bu, scheme, hostname, pathname, queryParams, anchor); + } + /** * Catch play parameters urls *