# HG changeset patch # User Nicholas Jillings # Date 1472118310 -3600 # Node ID 2305ef6779fe20546d3ab2046fbbf7cb35215007 # Parent 4c83eaacf002cca9e8aa499825a10ab4ccfb2851 Added video support #134 diff -r 4c83eaacf002 -r 2305ef6779fe css/core.css --- a/css/core.css Mon Aug 08 14:26:35 2016 +0200 +++ b/css/core.css Thu Aug 25 10:45:10 2016 +0100 @@ -51,6 +51,12 @@ overflow: auto; } +div#popupContent iframe { + width: 100%; + border: 0px none; + height: 290px; +} + div#popupTitleHolder { width: inherit; min-height: 25px; diff -r 4c83eaacf002 -r 2305ef6779fe js/core.js --- a/js/core.js Mon Aug 08 14:26:35 2016 +0200 +++ b/js/core.js Thu Aug 25 10:45:10 2016 +0100 @@ -810,7 +810,16 @@ this.popupResponse.appendChild(input); this.popupResponse.style.textAlign="center"; this.popupResponse.style.left="0%"; - } + } else if (node.specification.type == "video") { + var video = document.createElement("video"); + video.src = node.specification.url; + this.popupResponse.appendChild(video); + } else if (node.specification.type == "youtube") { + var iframe = document.createElement("iframe"); + iframe.className = "youtube"; + iframe.src = node.specification.url; + this.popupResponse.appendChild(iframe); + } if(this.currentIndex+1 == this.popupOptions.length) { if (this.node.location == "pre") { this.buttonProceed.textContent = 'Start'; diff -r 4c83eaacf002 -r 2305ef6779fe xml/test-schema.xsd --- a/xml/test-schema.xsd Mon Aug 08 14:26:35 2016 +0200 +++ b/xml/test-schema.xsd Thu Aug 25 10:45:10 2016 +0100 @@ -280,6 +280,8 @@ + + @@ -293,6 +295,7 @@ +