diff --git a/app/com/gitpitch/services/VideoService.java b/app/com/gitpitch/services/VideoService.java index c1e94c0..8f6b97d 100644 --- a/app/com/gitpitch/services/VideoService.java +++ b/app/com/gitpitch/services/VideoService.java @@ -69,10 +69,17 @@ public class VideoService { * * Example link: * https://www.youtube.com/embed/mkiDkkdGGAQ + * + * Example link with offset start time: + * https://www.youtube.com/embed/mkiDkkdGGAQ?start=121 */ + + String ifrOps = (videoLink.contains("?")) ? + YTUBE_IFR_OPS_APPEND : YTUBE_IFR_OPS; + return new StringBuffer(YTUBE_DIV_OPEN).append(YTUBE_IFR_OPEN) .append(videoLink) - .append(YTUBE_IFR_OPS) + .append(ifrOps) .append(YTUBE_IFR_CLSE) .append(YTUBE_DIV_CLSE) .toString(); @@ -179,6 +186,7 @@ public class VideoService { private static final String YTUBE_DIV_OPEN = "