Skip to content

Commit

Permalink
Move from centralised singleton to imported singletons (#19)
Browse files Browse the repository at this point in the history
* ADAPT-9790 - move to imported singletons

* ADAPT-9790 - bower version

* ADAPT-9790 - bower version

Co-authored-by: Eleanor Heath <[email protected]>
  • Loading branch information
eleanor-heath and Eleanor Heath authored Mar 28, 2022
1 parent 34fe958 commit 626818c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "git",
"url": "git://github.com/adaptlearning/adapt-youtube.git"
},
"version": "2.1.1",
"version": "2.1.2",
"framework": ">=5.8.0",
"homepage": "https://github.com/adaptlearning/adapt-youtube",
"issues": "https://github.com/adaptlearning/adapt-youtube/issues",
Expand Down
6 changes: 4 additions & 2 deletions js/YouTubeView.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import a11y from 'core/js/a11y';
import Adapt from 'core/js/adapt';
import ComponentView from 'core/js/views/componentView';
import log from 'core/js/logging';

export default class YouTubeView extends ComponentView {

Expand All @@ -22,7 +24,7 @@ export default class YouTubeView extends ComponentView {
this.debouncedTriggerGlobalEvent = _.debounce(this.triggerGlobalEvent.bind(this), 1000);
if (window.onYouTubeIframeAPIReady !== undefined) return;
window.onYouTubeIframeAPIReady = () => {
Adapt.log.info('YouTube iframe API loaded');
log.info('YouTube iframe API loaded');
Adapt.youTubeIframeAPIReady = true;
Adapt.trigger('youTubeIframeAPIReady');
};
Expand Down Expand Up @@ -133,7 +135,7 @@ export default class YouTubeView extends ComponentView {
// need slight delay before focussing button to make it work when JAWS is running
// see https://github.com/adaptlearning/adapt_framework/issues/2427
_.delay(() => {
Adapt.a11y.focusFirst(this.$('.youtube__transcript-btn'), { defer: true });
a11y.focusFirst(this.$('.youtube__transcript-btn'), { defer: true });
}, 250);
}

Expand Down

0 comments on commit 626818c

Please sign in to comment.