if(representations.iterator().hasNext()){
MediaRepresentation rep = representations.iterator().next();
List<MediaRepresentationPart> parts = rep.getParts();
+ MediaRepresentationPart smallestPart = null;
+ for (MediaRepresentationPart part: parts){
+ if (smallestPart != null){
+ if (smallestPart.getSize() != null && part.getSize() != null) {
+ if (smallestPart.getSize() > part.getSize()){
+ smallestPart = part;
+ }
+ }
+ }else{
+ smallestPart = part;
+ }
+
+ }
URI uri = parts.get(0).getUri();
if (uri == null){
return null;