Sonya Corcoran LTI = SSO

Discussion created by Sonya Corcoran on Mar 6, 2017
Latest reply on Aug 17, 2017 by JAaron Anderson

The Problem: How can we embed playlists into Canvas? The LTI share link provided allows Single Sign On (SSO) only. This is nice for students/staff but it won't embed videos directly into Canvas.


The Solution: Scrape and embed each video into a Canvas page via an iframe.


How: On the playlist edit page, copy and paste the following into the console.

// Selected all video objects in the playlist DOM
var videos = document.querySelectorAll('.draggable');

var videoIds = [];
// Loops each video object and grabs the videoId and adds it to a video array
$.each(videos, function (i, val) {
var videoId = (val.dataset.itemId);

// Loops the video array and appends the videoId into an iframe
$.each(videoIds, function(i, id) {
console.log(`<p><iframe src="${id}" allowfullscreen="allowfullscreen" webkitallowfullscreen="webkitallowfullscreen" mozallowfullscreen="mozallowfullscreen"></iframe></p>`)

Copy and paste the iframe output into the Rich Text Editor.



If anyone has less hacky ideas/feedback, please let me know. This is just a tiny work around for the meantime. We're planning a robust which not only embeds the playlists but will pull data from Lynda to create bespoke progression dashboards etc.


Stay tuned!