Files
edx-platform/xmodule/js/spec/video_helper.js
2022-06-20 18:20:06 +05:00

17 lines
544 B
JavaScript

(function() {
'use strict';
// Stub window.Video.loadYouTubeIFrameAPI()
window.Video.loadYouTubeIFrameAPI = jasmine.createSpy('window.Video.loadYouTubeIFrameAPI').and.returnValue(
function(scriptTag) {
var event = document.createEvent('Event');
if (fixture === 'video.html') {
event.initEvent('load', false, false);
} else {
event.initEvent('error', false, false);
}
scriptTag.dispatchEvent(event);
}
);
}).call(this);