Follow Us:      
       

828 East Desert Hills Drive
Saint George, Utah 84790
T: 435.674.0885
F: 435.674.2606

Video Test

Attempt 1

 

var reqURL = “https://api.rss2json.com/v1/api.json?rss_url=” + encodeURIComponent(“https://www.youtube.com/feeds/videos.xml?channel_id=”); function loadVideo(iframe) { $.getJSON(reqURL + iframe.getAttribute(‘cid’), function(data) { var videoNumber = (iframe.getAttribute(‘vnum’) ? Number(iframe.getAttribute(‘vnum’)) : 0); console.log(videoNumber); var link = data.items[videoNumber].link; id = link.substr(link.indexOf(“=”) + 1); iframe.setAttribute(“src”, “https://youtube.com/embed/” + id + “?controls=0&autoplay=1”); } ); } var iframes = document.getElementsByClassName(‘latestVideoEmbed’); for (var i = 0, len = iframes.length; i < len; i++) { loadVideo(iframes[i]); }

Attempt 2

[script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”][/script] [script] var reqURL = “https://api.rss2json.com/v1/api.json?rss_url=” + encodeURIComponent(“https://www.youtube.com/feeds/videos.xml?channel_id=”); function loadVideo(iframe) { $.getJSON(reqURL + iframe.getAttribute(‘cid’), function(data) { var videoNumber = (iframe.getAttribute(‘vnum’) ? Number(iframe.getAttribute(‘vnum’)) : 0); console.log(videoNumber); var link = data.items[videoNumber].link; id = link.substr(link.indexOf(“=”) + 1); iframe.setAttribute(“src”, “https://youtube.com/embed/” + id + “?controls=0&autoplay=1”); } ); } var iframes = document.getElementsByClassName(‘latestVideoEmbed’); for (var i = 0, len = iframes.length; i < len; i++) { loadVideo(iframes[i]); } [/script]
Mission Statement
Desert Hills High School is a community of lifelong learners held to high standards of academic scholarship, integrity, self-discipline and citizenship.

Contact Us

28 East Desert Hills Drive
Saint George, Utah 84790
T: 435.674.0885
F: 435.674.2606