<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nick C on Medium]]></title>
        <description><![CDATA[Stories by Nick C on Medium]]></description>
        <link>https://medium.com/@nickc_4592?source=rss-bddc5ff15889------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yq2JkHRXysjDCwIdT8jv2w.jpeg</url>
            <title>Stories by Nick C on Medium</title>
            <link>https://medium.com/@nickc_4592?source=rss-bddc5ff15889------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 01:46:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nickc_4592/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The art of Ferris Bueller]]></title>
            <link>https://medium.com/cogapp/the-recent-cogapp-hack-day-presented-the-opportunity-to-work-in-conjunction-with-the-art-institute-df1e3f787c5e?source=rss-bddc5ff15889------2</link>
            <guid isPermaLink="false">https://medium.com/p/df1e3f787c5e</guid>
            <category><![CDATA[ferris-buellers-day-off]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[musetech]]></category>
            <category><![CDATA[coghack]]></category>
            <category><![CDATA[art-institute-of-chicago]]></category>
            <dc:creator><![CDATA[Nick C]]></dc:creator>
            <pubDate>Wed, 26 Apr 2023 15:22:36 GMT</pubDate>
            <atom:updated>2023-04-26T15:24:22.092Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Jf8dovtEZ3H09p67XjQnQg.jpeg" /><figcaption>Ferris Bueller at the Art Institute of Chicago</figcaption></figure><p>The recent Cogapp hack day presented the opportunity to work in conjunction with the <a href="https://www.artic.edu/">Art Institute of Chicago</a>, home to some of the world’s most recognisable works.</p><p>Perhaps equally as exciting for me however, was the fact that <a href="https://www.youtube.com/watch?v=hd2D-83tSyU">one of the most memorable scenes in Ferris Bueller’s Day Off</a>, the 80’s classic, was filmed at the museum, and showed off many of the most famous artworks, such as <a href="https://www.artic.edu/artworks/27992/a-sunday-on-la-grande-jatte-1884">Georges Seurat’s A Sunday on La Grande Jatte</a> and <a href="https://www.artic.edu/artworks/111628/nighthawks">Edward Hopper’s Nighthawks</a>.</p><p>I liked the idea of creating a simple viewer that played the iconic scene from the film, and underneath displayed the names of each piece of art as they appeared, along with a link to the museum’s collection page, dates and the artist’s name.</p><p>As one of Cogapp’s production team, rather than one of its developers, the first challenge I would need to overcome was how to go about building the structure and interface of the player.</p><p>To therefore save myself from a grueling day of battling against my firmly mid-level HTML and Javascript skills, I decided I would get a plan in place and enlist <a href="https://chat.openai.com/">ChatGPT</a> to perform the heavy lifting, allowing me to tweak and adapt its output as I went.</p><p>The team at the Art Institute of Chicago had generously created a spreadsheet with links to all of the works that were shown in the scene, with links to the objects listing page on the Museums website. I also sourced the relevant film segment on YouTube that I could base the project on.</p><p>I soon learned that when using an AI tool like ChatGPT, the key to success is by being as descriptive as possible.</p><p>So my breezy opening pitch of:</p><blockquote>Write me some html that will allow me to link to certain time points in an embedded video.</blockquote><p>…came back with the rather unhelpful, but in retrospect inevitable:</p><pre>&lt;iframe width=&quot;560&quot; height=&quot;315&quot; <br>src=&quot;https://www.youtube.com/embed/VIDEO_ID?start=TIME_IN_SECONDS&quot; <br>frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;</pre><p>Which wasn’t exactly what I was looking for.</p><p>After some exploring I established that YouTube had an API that you could use to determine how far through the video you were.</p><p>With that information in mind, and after a few more rounds of mutual misunderstanding, I had begun to refine my requests to be more specific, and the results duly improved:</p><blockquote>Create an html page that will load the youtube api and show video hd2D-83tSyU. Write some javascript that will show a different html paragraph underneath the video at defined points in the embedded video. The text should refresh automatically.</blockquote><pre><br>&lt;-- Here&#39;s an example HTML page that loads the YouTube API and embeds the video with the ID hd2D-83tSyU. <br>The JavaScript code uses the YouTube API to listen for certain events and update the HTML paragraph underneath the video when those events occur: --&gt;<br><br>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>  &lt;head&gt;<br>    &lt;meta charset=&quot;utf-8&quot;&gt;<br>    &lt;title&gt;YouTube API Example&lt;/title&gt;<br>    &lt;script src=&quot;https://www.youtube.com/iframe_api&quot;&gt;&lt;/script&gt;<br>    &lt;style&gt;<br>      #video-container {<br>        width: 560px;<br>        height: 315px;<br>        margin-bottom: 20px;<br>      }<br>      #text-container {<br>        font-size: 20px;<br>        font-weight: bold;<br>      }<br>    &lt;/style&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>    &lt;div id=&quot;video-container&quot;&gt;&lt;/div&gt;<br>    &lt;div id=&quot;text-container&quot;&gt;Loading...&lt;/div&gt;<br>    &lt;script&gt;<br>      // This code loads the YouTube API and embeds the video<br>      var player;<br>      function onYouTubeIframeAPIReady() {<br>        player = new YT.Player(&#39;video-container&#39;, {<br>          videoId: &#39;hd2D-83tSyU&#39;,<br>          events: {<br>            &#39;onReady&#39;: onPlayerReady,<br>            &#39;onStateChange&#39;: onPlayerStateChange<br>          }<br>        });<br>      }<br>      function onPlayerReady(event) {<br>        event.target.playVideo();<br>      }<br>      function onPlayerStateChange(event) {<br>        if (event.data == YT.PlayerState.PLAYING) {<br>          updateText();<br>          setInterval(updateText, 1000);<br>        }<br>      }<br>      function updateText() {<br>        var currentTime = player.getCurrentTime();<br>        var textContainer = document.getElementById(&#39;text-container&#39;);<br>        if (currentTime &gt;= 10 &amp;&amp; currentTime &lt; 20) {<br>          textContainer.innerHTML = &quot;First paragraph&quot;;<br>        } else if (currentTime &gt;= 30 &amp;&amp; currentTime &lt; 40) {<br>          textContainer.innerHTML = &quot;Second paragraph&quot;;<br>        } else {<br>          textContainer.innerHTML = &quot;&quot;;<br>        }<br>      }<br>    &lt;/script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>The above shows the specified video, and uses the getCurrentTime function to establish the videos progress. Then it uses a simple if statement to establish what to show at what stage of the videos progress, including a text container to show the relevant copy and links needed at that point.</p><p>By then re-watching the video and working out the points at which each artwork appears and for how long, the existing if statement could be expanded for the rest of the video and the required text appeared at each stage.</p><p><a href="https://cogapplabs.github.io/ferris-bueller/">The updated player.</a></p><p>One of the challenges on the day was that using seconds to split up the text to display was not completely accurate, as some of the transitions between phases demonstrate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*KEOTiUd08yJfB67MywU_tw.png" /></figure><p>Further testing showed that it would have been simple to update the player to use milliseconds instead, allowing a much smoother experience.</p><p>Another interesting development for the future would have been to incorporate a <a href="https://iiif.io/">IIIF viewer</a> on the page to get a high resolution, interactive version of the artwork shown next to the video as it progressed.</p><p>The day proved to be a great opportunity to delve into the Art Institute of Chicago’s rich collection, as well as experience first hand just how powerful AI can be as a creation tool, providing you’re able to refine your direction and requests!</p><p>You can <a href="https://cogapplabs.github.io/ferris-bueller">see the final result</a> for yourself, or <a href="https://github.com/CogappLabs/ferris-bueller">view the source code</a> to see exactly how it was done.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df1e3f787c5e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/cogapp/the-recent-cogapp-hack-day-presented-the-opportunity-to-work-in-conjunction-with-the-art-institute-df1e3f787c5e">The art of Ferris Bueller</a> was originally published in <a href="https://medium.com/cogapp">cogapp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>