diff --git a/pom.xml b/pom.xml index 17fa8ab..cceed9e 100755 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.blazemeter.jmeter jmeter-bzm-hls - 3.0.1 + 3.0.1-SNAPSHOT Video Streaming Sampler as JMeter plugin @@ -38,9 +38,10 @@ ${jmeter.version} - com.comcast + com.github.comcast hlsparserj - 1.0.0 + + c287e78 com.github.blazemeter diff --git a/src/main/java/com/blazemeter/jmeter/videostreaming/hls/Playlist.java b/src/main/java/com/blazemeter/jmeter/videostreaming/hls/Playlist.java index f090a20..056ae97 100755 --- a/src/main/java/com/blazemeter/jmeter/videostreaming/hls/Playlist.java +++ b/src/main/java/com/blazemeter/jmeter/videostreaming/hls/Playlist.java @@ -31,11 +31,10 @@ public class Playlist { private static final Logger LOG = LoggerFactory.getLogger(Playlist.class); - private IPlaylist playlist; - private final URI uri; private final String body; //This field is only used for comparing objects private final Instant downloadTimestamp; + private IPlaylist playlist; private Playlist(URI uri, String body, Instant downloadTimestamp, IPlaylist playlist) { this.uri = uri; @@ -72,12 +71,7 @@ public MediaStream solveMediaStream(BandwidthSelector bandwidthSelector, } String audioPlayListUri = getRenditionUri("AUDIO", mediaStream.getAudio(), audioLanguageSelector); - /* - Because of a bug in the library, the mediaStream.getSubtitle() method wont return - the subtitlesGroupId but null. Because of it, we are use getTag instead. - */ - String subtitlesGroupId = mediaStream.getTag().getAttributes().get("SUBTITLES"); - String subtitlePlayListUri = getRenditionUri("SUBTITLES", subtitlesGroupId, + String subtitlePlayListUri = getRenditionUri("SUBTITLES", mediaStream.getSubtitle(), subtitleLanguageSelector); return new MediaStream(buildAbsoluteUri(mediaStream.getURI()), (audioPlayListUri != null ? buildAbsoluteUri(audioPlayListUri) : null),