Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from main (production) #1369

Merged
merged 6 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions common/lib/xmodule/xmodule/js/src/video/01_initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function(VideoPlayer, i18n, moment, _) {

_youtubeApiDeferred = null,
_oldOnYouTubeIframeAPIReady;
const setupOnYouTubeIframeAPIReadyMaxCalls=3;
const setupOnYouTubeIframeAPIReadyMaxCalls=5;

Initialize.prototype = methodsDict;

Expand Down Expand Up @@ -174,30 +174,31 @@ function(VideoPlayer, i18n, moment, _) {
throw new Error('Too many OnYouTubeIframeAPIReady retries after TypeError...giving up.');
}

_oldOnYouTubeIframeAPIReady = window.onYouTubeIframeAPIReady || undefined;
try {
_oldOnYouTubeIframeAPIReady = window.onYouTubeIframeAPIReady || undefined;

window.onYouTubeIframeAPIReady = function() {
window.onYouTubeIframeAPIReady.resolve();
};
window.onYouTubeIframeAPIReady = function() {
window.onYouTubeIframeAPIReady.resolve();
};

try {
window.onYouTubeIframeAPIReady.resolve = _youtubeApiDeferred.resolve;
window.onYouTubeIframeAPIReady.done = _youtubeApiDeferred.done;

if (_oldOnYouTubeIframeAPIReady) {
window.onYouTubeIframeAPIReady.done(_oldOnYouTubeIframeAPIReady);
}
} catch (e) {
console.error('Error while trying to resolve the Deferred object responsible for calling OnYouTubeIframeAPIReady callbacks.');
console.error('window.onYouTubeIframeAPIReady is ' + window.onYouTubeIframeAPIReady);
console.error(e);
if (e instanceof TypeError) {
setupOnYouTubeIframeAPIReady(); // Try again up to defined max calls.
setTimeout(setupOnYouTubeIframeAPIReady, 500); // Try again up to defined max calls.
}
else {
throw e;
}
}
window.onYouTubeIframeAPIReady.done = _youtubeApiDeferred.done;

if (_oldOnYouTubeIframeAPIReady) {
window.onYouTubeIframeAPIReady.done(_oldOnYouTubeIframeAPIReady);
}
};

// If a Deferred object hasn't been created yet, create one now. It will
Expand Down
2 changes: 1 addition & 1 deletion requirements/edx/appsembler.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ django-hijack-admin==2.1.10
honeycomb-beeline==2.12.1

# Patched upstream packages
https://github.com/mitodl/edx-sga/archive/refs/tags/v0.22.0.tar.gz
https://github.com/edx-solutions/xblock-google-drive/archive/589d9f51f9b.tar.gz # v0.2.0 but the repo has no tags
https://github.com/appsembler/edx-ora2/archive/2.7.6-appsembler.1.tar.gz
https://github.com/appsembler/edx-sga/archive/v0.11.0.appsembler2.tar.gz
https://github.com/appsembler/edx-proctoring/archive/v2.4.0-appsembler1.tar.gz

# Tahoe plugins and customizations
Expand Down
Loading