02

Download Panopto Playlist Videos Bookmarklet

I always thought bookmarklets were cool. I still think they are cool. I like the idea of little tiny tools that live in a place reserved for something else entirely. Alan has 89 posts mentioning bookmarklets. That’s also a clue that they’re interesting. What drove this was that Panopto removing the RSS feed option in their newest version. Our people used it as part of a bulk download process to get the videos out for captioning or something like that. I don’t really know the details but it is apparently a hassle to get the videos one by one. I looked around a bit at the Panopto API but I always get annoyed by having to deal with oauth if the information is public. I’ll probably go back to this later as the bookmarklet is more than bit awkward to explain. This does rely on you being logged in and the videos being set to allow downloads. The pattern here is that there is a table with a particular class (session-list). Each row of that table (that we want) has a data attribute containing the session ID of the video. That session ID can be added to a URL pattern to get the download. And the little window.open function opens the download URL. To make it work as a bookmarklet […]

16

Panopto API meets WordPress

Imagine you have some longer training videos but it’d be useful to provide discrete chunks. You might also want to provide some additional contextual information for particular video portions. Well, we wanted to be able to do that.1 This example uses the Panopto embed API and the Advanced Custom Fields repeater field to make this possible. It’s kind of fun and would be relatively easy to expand to take videos from other video hosts that have APIs (like YouTube). You can play with the example here or just watch the video below. Patterns that I like Data Attributes I like to use data attributes in scenarios like this where I have some pretty simple variables that I’ll get via PHP but will be using in javascript. My navigation buttons are a good example of this. They end up looking like this on the HTML side. The javascript can use those data attributes (jump, end, row) in ways that feel straight forward to me. The example below is a simplified version that shows how I’d get the start time2 URL Parameters Getting and setting data in the URL is often really useful. I do it with both javascript and PHP. In this case, we’ll look at javascript versions. I use the getting option described in this article and show below. With […]