YouTube in SuperMemo stopped working

From SuperMemopedia
Jump to navigation Jump to search

Summary

As of Dec 1, 2017, SuperMemo 17 for Windows, version 17.3, uses the new YouTube API in incremental video script. This means that all posts related to problems with upgrading to new YouTube API are no longer relevant. The posts will be retained for archiving purposes, and for users of older versions of SuperMemo.

SuperMemo 17.3 uses a script named YouTube.htm in place of the old yt.htm which you can now delete (folder \bin). The new script is a stub that runs the actual script from supermemory.info server.

Privacy: We do not collect user data while running the script. The change of execution mode was caused by a bug in YouTube API for which we received no feedback from Google support in 12 months. The dependence on the server can be changed with one parameter in the script. You can run this script from your own server.

If you want to use new YouTube API in older SuperMemos, you will need to substitute your yt.htm script with the new version (see: Workaround). There are few minor issues with handling keyboard shortcuts though. Those hiccups have only be fully resolved in version 17.3.

As of Jul 1, 2018, SuperMemo 15 Freeware, version 15.5, uses the new YouTube API

For more see: Incremental Video

Intro

YouTube-based incremental video stopped working in all SuperMemos that implement it. The problem occurred in late 2016 due to a change in YouTube API.

Workaround

You need to replace the YouTube script file from your SuperMemo bin folder. The file is named [supermemo]/bin/yt.htm.

You can download the new version from here: http://supermemo.org/users/youtube/yt.htm

Note that you cannot just click the file above as it will redirect the script to supermemory.info. You need to download the target. For example, in Internet Explorer, righ-click the link and use Save Target As.

Important! Due to minor changes in behavior, in some contexts, you will experience minor problems that can only be resolved by downloading SuperMemo ver. 17.3. Before you download the patch, you should be able to resume learning. If you see any error messages, please click Report and mail it.

New script (Jul 9, 2017)

We are testing a script replacement that would run a script from supermemo.org/supermemory.info and restore full incremental video functionality:

http://supermemo.org/users/youtube/yt.htm (to save use Save Target As in the browser due to redirection from supermemo.org to supermemory.info)

The only weakness of the new solution is the dependence on our server. This comes from lack of response from YouTube/Google in reference to the bug in their API.

To make the new script working, you will need to substitute yt.htm in your SuperMemo folder.

This will let you start your work, however, minor updates to SuperMemo will also need to be made due to a different shortcut handling in the new script.

The news script will include supermemo.org/supermemory.info address with the location of the core script. We hope this will make it possible to place the script on any server of your choice in case supermemo.org/supermemory.info server was to become unavailable.

Use the new script? (Jul 9, 2017)

Great news about the new script and kudos to SM support for taking the time to do this and I look forward to also getting the option to place the script on my own server. When it comes to the new script, is it "operational" i.e we can download it now and use it in the latest build of SM17? Yoe wrote above "This will let you start your work, however, minor updates to SuperMemo will also need to be made due to a different shortcut handling in the new script.", are these changes done already or when will they be done so we can start using it? Thanks

usable

The script of Jul 9, 2017 is usable in SuperMemo. You can download, substitute yt.htm on your disk and see. However, in some contexts, SuperMemo receives shortcuts sent to the script and this can result in minor disruptions (e.g. the need to clear an error message). Update to SuperMemo 17 will be posted soon to overcome most of those problems.

YouTube API bug (Oct 2016)

As of Oct 27, 2016, we are still having a problem with new YouTube API that does not work in local files (as in SuperMemo). There are two pathways to restoring incremental video functionality:

  • pestering YouTube to fix the bug (there have not been any response from Google team in months)
  • binding users to supermemo.org server to run YouTube API

In the meantime we work on a Vimeo replacement that does not show problems like YouTube API.

Problems with YouTube (Aug 2016)

On Aug 11, 2016, YouTube-based incremental video stopped working in all SuperMemos. By Aug 29, 2016, the problem has resolved spontaneously. The most likely explanation of the problem is changes to handling deprecated YouTube API at Google. The most likely cause of the reversal are (1) bug fixes or (2) user pressure.

Switching back to YouTube player version 2 would help initially, as was the case in the present glitch (see: workarounds).

We will spare no effort to re-implement incremental video with IFrame Player API. We are also working on a parallel approach for Vimeo.

Some unresolved issues are listed here. If you are familiar with the subject, you can contribute your knowledge as well as help exert pressure on YouTube developers to fix bugs in their new API.

See also:

First problem report

MJU wrote, Aug 11, 2016, 12:46 CET (midday)'

I cannot use incremental video any more. SuperMemo tells me to "Watch on YouTube". When I click the link, I go to the main YouTube page, not to the video I want to watch. Do I need to change some settings? In SuperMemo? Windows?

I use SuperMemo 17 (latest) in Windows 10 (updated) with Internet Explorer (updated).

First Hints

this could be related to changes in YouTube API

  • this could also be related to recent Windows 10 anniversary upgrade (or security updates)
  • the message "Watch on YouTube" is by YouTube, not by SuperMemo
  • you can click the open book icon ("go to source") on the navigation bar to go to the video on YouTube

You will get more information as soon as it becomes available

Old Workarounds (summer 2016)

For a single video

Click Edit icon on the learnbar, choose Player version, change from 3 (or 0) to 2.

For all videos

  • edit \bin\yt.htm file
  • change version=3 to version=2

For files where the player was previously set manually, this will have no effect and you will need to change the version individually (or set it to 0 to return the default choice).

Windows Versions

This problem also occurs in Windows Vista. It is rather the change in YouTube API that will require changes to SuperMemo (all versions with incremental video).

SuperMemo 16

Comments: IV still works fine in Supermemo 16 on Windows 7 and 8 so not sure it's the API or possibly a change the older Supermemo could handle. When it comes to possible API changes or changes which would mean Supermemo couldn't be used for IV anymore, I use IV extensively and loosing this would really be a big problem and I for one (probably others as well) would be glad to chip in on Supermemo spending some time on fixing it and keeping the IV alive in Supermemo.

Internet Explorer 11

Microsoft say they introduced some changes to Internet Explorer 11 in the recent Windows update. On my PC, for example, it asked again for permissions to access clipboard, so I had to reverse at least one of their settings changes.

Ideas for a solution

YouTube-based incremental video: YouTube IFrame Player API doesn't work in IE in a local environment

Temporary resolution

the problem resolved spontaneously on Aug 29, 2016. This warning still remains in player version 3 (not in version 2):

The YouTube Flash API was officially deprecated on January 27th, 2015.

Picture

g.s. wrote:

i have a have a problem with the videos elements in supermemo, they don't load, nor change at all. I have reinstalled supermemo and created other colections but it always come to this. So i am unable to use videos in supermemos:

https://postimg.org/image/5qwkm951l/

youtube-based incremental video stopped working


Similar/related problem

When trying to perform any of the "mark, start, stop" operations this error appears and whether clicking yes or no it makes no difference, the operation is not performed, making it impossible to use it:

error in youtube-based incremental video

Problem resolved spontaneously by Aug 29, 2016.

I still have problem with youtube incremental video. Supermemo say me about problem with script in line 553. I have W10 and IE11. Version in yt.htm is set to 2.

Replicated Problem 20 DEC 2016

I encounter this exact same issue when importing a YouTube video and clicking any of the buttons. The same dialog is displayed. It is clearly looking for a Javascript function that is not available. This is occurring on SuperMemo 16 on Windows 10 with IE 11.

Manual workaround (until the bug is fixed)

This is a manual workaround that may help some users. This essentially is the video equivalent of incremental reading a PDF. As a recent user of SuperMemo I saw the warnings about the YT integration issues and have chosen not to use incremental video as implemented in SuperMemo. Instead I create elements that contain the text extracts I want to capture and include a timestamped short URL in the text. This URL can be easily generated by YT by right-clicking on the video and selecting Copy video URL at current time. Then paste this URL into the text of the element anywhere desired. You can also manually write in the element the duration or stop time and then just paste the link into your browser and watch the video to the designated time if desired. You can even copy snippets of the video screen and paste them into the element (in image components/etc) as desired. I've found this to be very effective and have been able to extract information from videos without using the bundled IV features at all.

This isn't the integrated solution previously available in SuperMemo but it completely avoids tying SuperMemo to an external dependency that changes without consideration of impact to SuperMemo. SuperMemo is supposed to be a lifelong learning tool. As such it should in all cases minimize or eliminate external dependencies as much as possible to ensure external components do not risk the learning process. There is talk of moving to Vimeo but that doesn't address future changes to the Vimeo API. What happens when Google or another major company buys Vimeo and changes the API?

User's own solution

I do not fully understand why I would need video extracts. They are an overkill for me. I mostly listen to lectures. I listen to TED lectures, but also lectures at various places that do not support YouTube format. My simple method is to import the video as a link only and mark my last viewing point in HTML text (e.g. "resume at 16:23"). I usually listen in 10-20 min. portions. This is why overhead cost is little. I can benefit from intervals, priorities, annotations, pictures, etc. To me this is a fully blown incremental learning process like defined at supermemo.com. When I need to add items, I do. I do not need lecture extracts to illustrate those texts.

Follow up: This is essentially the exact same process I mentioned above, for exactly the same uses, but on re-reading it isn't as clearly worded as your description. This is by far the best approach I've found, and with software that can bind a hotkey to let the user quickly take a screen snippet and paste it into an image component there is really no reason to integrate YouTube the way SuperMemo does. As you said, we can process videos incrementally just as well without worrying about SuperMemo getting in the way. And we can use videos from anywhere. I highly recommend this process to anyone, it is very fast and easy to use.

Also, you can right-click on a YouTube video and get a URL that will take you to that exact time, so you can just paste a new link into the element instead of typing in the time. Then just copy the link next time and paste it into your browser and it will take you to that exact second and start playing again.