diff --git a/pom.xml b/pom.xml index eb0c89d..feb9db0 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ ch.srgssr playfff - 25 + 26 jar pfff diff --git a/src/main/resources/deeplink/v1/parsePlayUrl.js b/src/main/resources/deeplink/v1/parsePlayUrl.js index b25d624..5502863 100644 --- a/src/main/resources/deeplink/v1/parsePlayUrl.js +++ b/src/main/resources/deeplink/v1/parsePlayUrl.js @@ -1,6 +1,6 @@ // parsePlayUrl -var parsePlayUrlVersion = 25; +var parsePlayUrlVersion = 26; var parsePlayUrlBuild = "mmf"; if(! console) { @@ -252,6 +252,24 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) { } } + /** + * Catch embed media urls + * + * Ex: https://www.rts.ch/play/embed?urn=urn:rts:video:580545 + * Ex: https://www.rts.ch/play/embed?urn=urn:rts:video:580545&startTime=60 + */ + if (pathname.endsWith("/embed")) { + var mediaURN = queryParams["urn"]; + if (mediaURN) { + var startTime = queryParams["startTime"]; + return openMediaURN(server, bu, mediaURN, startTime); + } + else { + // Returns default TV homepage + return openTvHomePage(server, bu); + } + } + /** * Catch live TV urls * @@ -609,6 +627,16 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) { return openPage(server, bu, "tv:home", null, null); } + /** + * Catch legacy bowser urls + * + * Ex: https://www.srf.ch/play/legacy-browser + *. Ex: https://www.rsi.ch/play/legacy-browser + */ + if (pathname.endsWith("/legacy-browser")) { + return openPage(server, bu, "tv:home", null, null); + } + /** * Catch play help urls * diff --git a/src/main/resources/deeplink/v2/parsePlayUrl.js b/src/main/resources/deeplink/v2/parsePlayUrl.js index f2c3285..c4a0b82 100644 --- a/src/main/resources/deeplink/v2/parsePlayUrl.js +++ b/src/main/resources/deeplink/v2/parsePlayUrl.js @@ -1,6 +1,6 @@ // parsePlayUrl -var parsePlayUrlVersion = 25; +var parsePlayUrlVersion = 26; var parsePlayUrlBuild = "mmf"; if(! console) { @@ -224,6 +224,24 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) { } } + /** + * Catch embed media urls + * + * Ex: https://www.rts.ch/play/embed?urn=urn:rts:video:580545 + * Ex: https://www.rts.ch/play/embed?urn=urn:rts:video:580545&startTime=60 + */ + if (pathname.endsWith("/embed")) { + var mediaURN = queryParams["urn"]; + if (mediaURN) { + var startTime = queryParams["startTime"]; + return openMediaURN(server, bu, mediaURN, startTime); + } + else { + // Returns default TV homepage + return openTvHomePage(server, bu); + } + } + /** * Catch live TV urls * @@ -574,6 +592,16 @@ function parseForPlayApp(scheme, hostname, pathname, queryParams, anchor) { return openTvHomePage(server, bu); } + /** + * Catch legacy bowser urls + * + * Ex: https://www.srf.ch/play/legacy-browser + *. Ex: https://www.rsi.ch/play/legacy-browser + */ + if (pathname.endsWith("/legacy-browser")) { + return openTvHomePage(server, bu); + } + /** * Catch play help urls *