From 691fad2363030e104cb1978cbd79de9a4fc58687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Runkel?= Date: Mon, 21 Sep 2020 13:43:57 +0200 Subject: [PATCH 1/4] Upgrade cast-sdk for ios to 4.5.0 --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 82b0ced..30458a9 100644 --- a/plugin.xml +++ b/plugin.xml @@ -35,7 +35,7 @@ - + -- GitLab From 124030ec103b085955dc28f862d38f0b6f910a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Runkel?= Date: Mon, 21 Sep 2020 13:59:52 +0200 Subject: [PATCH 2/4] Upgrade cast-sdk for ios to 4.5.0 --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 30458a9..dbd9cab 100644 --- a/plugin.xml +++ b/plugin.xml @@ -35,7 +35,7 @@ - + -- GitLab From 3631c1572c99c3a0ae090d18a5cffc9bfbf7bb43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Runkel?= Date: Wed, 23 Sep 2020 12:09:36 +0200 Subject: [PATCH 3/4] Do not set Position in LIVE Streams --- src/ios/ChromecastPlugin.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ios/ChromecastPlugin.m b/src/ios/ChromecastPlugin.m index d2e9c1c..3869610 100644 --- a/src/ios/ChromecastPlugin.m +++ b/src/ios/ChromecastPlugin.m @@ -278,7 +278,11 @@ static const BOOL kDebugLoggingEnabled = NO; } BOOL autoPlay = [mediaJson[@"autoplay"] boolValue]; GCKMediaLoadOptions *options = [[GCKMediaLoadOptions alloc] init]; - options.playPosition = position; + + if ([mediaJson[@"live"] boolValue] != YES) { + options.playPosition = position; + } + options.autoplay = autoPlay; return options; } -- GitLab From 9f5989a90b9998c84ecc8d7e018c56483e52ba4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Runkel?= Date: Wed, 23 Sep 2020 12:30:07 +0200 Subject: [PATCH 4/4] Do not set Position in LIVE Streams --- src/android/Cast.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/android/Cast.java b/src/android/Cast.java index a46e1bc..83e5838 100644 --- a/src/android/Cast.java +++ b/src/android/Cast.java @@ -330,10 +330,13 @@ public class Cast extends CordovaPlugin { position = 0L; } - return new MediaLoadOptions.Builder() - .setPlayPosition(position) - .setAutoplay(media.optBoolean("autoplay", false)) - .build(); + MediaLoadOptions.Builder builder = new MediaLoadOptions.Builder(); + builder.setAutoplay(media.optBoolean("autoplay", false)); + if (!media.optBoolean("live", false) { + builder.setPlayPosition(position); + } + + return builder.build(); } private MediaInfo getMediaInfo(JSONObject media) { -- GitLab