Problems with YouTube in SuperMemo 19

From SuperMemopedia
Jump to navigation Jump to search

Summary

  • new incremental video script for YouTube is available (Dec 19, 2023)(for details see below)
  • the issues with speed and downtime at SuperMemopedia and SuperMemo Guru have been resolved (Dec 18, 2023)(not a single downtime complaint by Jan 4, 2024)
  • incremental video, SuperMemopedia, SuperMemo Guru, SuperMemo Beta, and few others have been clocked to be from 2.0 to 4.5 times faster now
  • the guaranteed uptime should also increase substantially, however, this could not be measured (Dec 19, 2023 - Jan 9, 2024, 100.00% uptime, no complaints)

Servers upgrade

There were many complaints on frequent downtime of SuperMemo Guru, SuperMemopedia, and incremental video. Hopefully, these will no longer occur, or at least, occur asynchronously. The wikis have been moved to separate faster servers. Incremental video script was also migrated. If there is a rush on some of SuperMemo Guru articles, the other services will remain unaffected. The new script for using YouTube should also be usable in older SuperMemos.

Incremental video upgrade

Introduction

Here is the new YouTube script dated Dec 19, 2023. If that version date shows up in SuperMemo, you will know you are using the new server:

https://youtube.supermemo.org/YouTube.html

Notes:

  • The file should be placed in the \bin subfolder of SuperMemo folder and named as the old file used in SuperMemo: yt.htm, iv.htm, youtube.htm, or similar
  • Use Save link as (in Edge)(or equivalent), not Open link in new tab/window
  • If you are not sure how, you can copy and paste this code (Dec 2023) into the incremental video script file
  • If you prefer to copy and paste one line of code (to switch servers) (see below: Brute force)
  • If you use the newest SuperMemo 19, you will have no work to do (see below: SuperMemo 19)

Brute force

In the YouTube script (youtube.htm or youtube.html in SuperMemo's \[BIN] subfolder), using a text editor, replace http://supermemory.info/iv/yt2.htm with https://youtube.supermemo.org/. Make sure to leave ? at the end of the URL

Before:

After:

SuperMemo 19

To upgrade the script in SuperMemo:

  • download SuperMemo 19
  • make sure it is SuperMemo version 19.03 dated Dec 19, 2023 or later
  • make sure the script in incremental video is dated Dec 19, 2023 or later (bottom of the control panel)

If the above does not ensure the upgrade, delete youtube.htm and youtube.html files from SuperMemo's \bin folder and restart SuperMemo.

Older SuperMemos

  • download the new script from https://youtube.supermemo.org/YouTube.html by right-clicking on the link and choosing Save link as... from the browser context menu
  • replace your current script file in the \[BIN] folder without changing its name: iv.htm, yt.htm, youtube.htm, or youtube.html

Original problem report

Henrik wrote:

I have just upgraded to SuperMemo 19, and one big reason for that was being able to use my Youtube collection again (it hasn't worked for a long time as it wasn´t possible to import new videos) and I have a couple of minor problems.

  • once in a while the Youtube doesn´t load in Supermemo i.e all I see is a blank white screen where the video should be (no error messages at all) and when this happens, it happens for ALL videos i.e it is not something with one particular video. My internet connection works fine so is not that. When this happens it doesn´t matter what I do, I have tried restarting Supermemo and restarting my computer etc. etc. but nothing works and I have to wait (10 minutes yesterday and 10 minutes today) and then all of a sudden it works again. I wonder, is this possibly that Supermemo tries to read the Youtube script from the Supermemo servers and if that isn´t possible, it freeze and this error happens? The reason I ask this is, at the same time when I had this issue today, I couldn´t access SupermemoPedia or SupermemoGuru either i.e it could be the Supermemo servers not being able to handle workload or whatever. I also remember having similar issues in the past where I got instructions on how to host the Youtube script on my own server and that solved some similar problems I had. If this is the error I think it is, can you please provide instructions on how to host my own Supermemo 19 script on my own server? It is not possible to work with Supermemo videos when this happens all the time.
  • I experience the load of Youtube videos i.e when I move from one video to the next in my learning, is considerably slower than in Supermemo 18. Could this be a related error i.e the Supermemo servers are slow or overloaded or whatever and because of that, it takes more time to load videos or is this something else?

If these issues are not the things I write about above, are they reported as bugs and if so, is a fix in the works?

Original reply (before servers upgrade)

  • you are right that SuperMemopedia and YouTube scripts are hosted on the same server and if there is a server downtime, you may need to use the reference button to access the video from SuperMemo
  • server problems are rather rare, they should not trouble you too much when learning, esp. that once the script loads you can process the video. If problems persist, we might move scripts to less troubled servers (e.g. SuperMemo Guru is notorious for being swamped when an article become popular for some reason, which can affect the quality of service at SuperMemopedia)
  • the speed of loading YouTube in SuperMemo rather did not change
  • December 2023 update: problem solved, see Summary at the top

Download locally

Can't the scripts be saved locally, rather than hosted on SuperMemo servers? If SuperMemo were to migrate servers again, or shut down their servers, that would make IV unusable. Harvey R. 18:57, 9 January 2024 (UTC)

Comment

There was a change in YouTube API that made 2009 solutions unworkable. It was about script security. If there is a workaround available, it will sure be implemented.

Technical

It has to be served on a server. It can be a local server but the new IFRAME API doesn't make it possible to run it on from the local hard drive like the old script.