From e8aabdf10342efebf8cd1ca6977c80b6b5f45db7 Mon Sep 17 00:00:00 2001 From: Gilad Nadav Date: Fri, 24 Mar 2023 00:52:35 +0200 Subject: [PATCH] feat(FEC-13065): direct redirection of udp url without opening bp session Co-authored-by: tomasgarba --- .../playkit/plugins/broadpeak/BroadpeakPlugin.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/broadpeakplugin/src/main/java/com/kaltura/playkit/plugins/broadpeak/BroadpeakPlugin.java b/broadpeakplugin/src/main/java/com/kaltura/playkit/plugins/broadpeak/BroadpeakPlugin.java index e8337d0..a20e5a5 100644 --- a/broadpeakplugin/src/main/java/com/kaltura/playkit/plugins/broadpeak/BroadpeakPlugin.java +++ b/broadpeakplugin/src/main/java/com/kaltura/playkit/plugins/broadpeak/BroadpeakPlugin.java @@ -10,6 +10,7 @@ import com.kaltura.playkit.PKLog; import com.kaltura.playkit.PKMediaConfig; import com.kaltura.playkit.PKMediaEntry; +import com.kaltura.playkit.PKMediaFormat; import com.kaltura.playkit.PKMediaSource; import com.kaltura.playkit.PKPlugin; import com.kaltura.playkit.Player; @@ -198,6 +199,13 @@ public void apply(PKMediaEntry mediaEntry, PKMediaEntryInterceptor.Listener list } PKMediaSource source = mediaEntry.getSources().get(0); + if (PKMediaFormat.udp.equals(source.getMediaFormat())) { + // Replace the URL + log.d("Apply New Entry URL for UDP: " + mediaEntry.getName() + " - " + mediaEntry.getId() + " url: " + source.getUrl()); + source.setUrl(source.getUrl()); + listener.onComplete(); + return; + } // Start the session and get the final stream URL session = SmartLib.getInstance().createStreamingSession(); if (session == null) {