Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ssai sessions #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ public HTTPSampleResult downloadUri(URI uri) {
throw new SamplerInterruptedException();
}
try {
return sample(uri.toURL(), "GET", false, 0);

return sample(uri.normalize().toURL(), "GET", false, 0);
} catch (MalformedURLException e) {
throw new IllegalArgumentException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.blazemeter.jmeter.videostreaming.core.exception.PlaylistDownloadException;
import com.blazemeter.jmeter.videostreaming.core.exception.PlaylistParsingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
Expand Down Expand Up @@ -71,6 +72,15 @@ public MediaRepresentation findMatchingVariant(List<MediaRepresentation> variant
if (awaitMillis > 0) {
timeMachine.awaitMillis(awaitMillis);
}

List<String> locations = manifest.getLocations();
if (locations != null && !locations.isEmpty()) {
try {
masterUri = new URI(locations.get(0));
} catch (URISyntaxException e) {
e.printStackTrace();
}
}
manifest = downloadPlaylist(masterUri, p -> MASTER_TYPE_NAME,
Manifest::fromUriAndBody);
mediaPlayback.updateManifest(manifest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,8 @@ public Instant getAvailabilityStartTime() {
return time != null ? time.toInstant() : Instant.MIN;
}

public List<String> getLocations() {
return mpd.getLocations();
}

}