Skip to content

Commit

Permalink
remove default to false for isLive in youbora config (#35)
Browse files Browse the repository at this point in the history
* remove default to false for isLive in youbora config so incase this is not passed in config it will be calculated internally

* add missing @OverRide
  • Loading branch information
giladna authored Jan 19, 2020
1 parent 64ecd01 commit 41734f2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,17 @@ public void unregisterListeners() {
}


@Override
public Long getBitrate() {
return this.lastReportedBitrate;
}

@Override
public Long getThroughput() {
return this.lastReportedThroughput;
}

@Override
public String getRendition() {
return lastReportedRendition;
}
Expand Down Expand Up @@ -364,10 +367,12 @@ public String getHouseholdId() {
return houseHoldId;
}

@Override
public Double getPlayhead() {
return (lastReportedMediaPosition != null && lastReportedMediaPosition >= 0) ? lastReportedMediaPosition : 0;
}

@Override
public String getResource() {
//log.d("getResource = " + lastReportedResource);
return lastReportedResource;
Expand All @@ -389,6 +394,7 @@ public Integer getDroppedFrames() {
// return lastPlayrate
// }

@Override
public String getTitle() {
if (mediaConfig == null || mediaConfig.getMediaEntry() == null) {
return "unknown";
Expand All @@ -397,6 +403,7 @@ public String getTitle() {
}
}

@Override
public Boolean getIsLive() {
Boolean isLive = Boolean.FALSE;
if (mediaConfig != null && mediaConfig.getMediaEntry() != null && (player == null || player.getDuration() <= 0)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ private JsonObject getMediaJsonObject() {
}

mediaEntry.addProperty("resource", media.getResource() != null ? media.getResource() : "");
mediaEntry.addProperty("isLive", media.getIsLive() != null ? media.getIsLive() : Boolean.FALSE);
mediaEntry.addProperty("isLive", media.getIsLive());
mediaEntry.addProperty("isDVR", media.getIsDVR() != null ? media.getIsDVR() : Boolean.FALSE);
mediaEntry.addProperty("title", media.getTitle() != null ? media.getTitle() : "");
mediaEntry.addProperty("title2", media.getTitle2() != null ? media.getTitle2() : "");
mediaEntry.addProperty("title2", media.getTitle2() != null ? media.getTitle2() : "");
if (media.getDuration() != null) {
mediaEntry.addProperty("duration", media.getDuration());
}
Expand Down

0 comments on commit 41734f2

Please sign in to comment.