Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
a905e06
preliminary export of course material as cc
poussy Jan 22, 2020
de42f0f
change export course material button text
poussy Jan 22, 2020
84b7f80
revert lecture.details.html
poussy Jan 22, 2020
6dfa807
preliminary solution to export video to feedbackFruit
poussy Mar 4, 2020
8f5f4ca
wip
poussy Mar 6, 2020
eae259e
wip
poussy Mar 17, 2020
333a8c1
change export course button text
poussy Mar 25, 2020
c9fd29a
set messages indicating the video export started and finished
poussy Mar 25, 2020
cca58a5
adjust export course text in en and sv
poussy Mar 25, 2020
0b7da7a
adjust export course button test in en and sv
poussy Mar 25, 2020
aa76aba
remove trial code
poussy Mar 31, 2020
da72f29
remove video upload SCAL-2160
poussy Apr 2, 2020
fca07f4
SL shutting down banner
poussy Apr 3, 2020
40ade77
set the close banner icon positioning responsive
poussy Apr 15, 2020
e3c83c2
add the future page
poussy Apr 15, 2020
91973ce
update future page text
poussy Apr 15, 2020
22b440c
put export video to fbf under details
poussy Apr 15, 2020
a1dc927
clean up
poussy Apr 15, 2020
ae2e3b5
clean up
poussy Apr 15, 2020
8307c2d
remove logs
poussy Apr 15, 2020
c91708a
put missed e at word package , the export course cc button text
poussy Apr 15, 2020
8d18c71
fix container name of banner
poussy Apr 15, 2020
ec9f8bc
Merge pull request #458 from rekrevs/feature/export_course_cc
poussy Apr 15, 2020
955841e
Merge pull request #460 from rekrevs/feature/export_video_fbFruits
poussy Apr 15, 2020
fa18edb
Merge pull request #461 from rekrevs/feature/warning_banners_and_uplo…
poussy Apr 15, 2020
292d25f
fix css banner bug
poussy Apr 16, 2020
e55bc6a
lenting
poussy Apr 16, 2020
aeecab0
lenting
poussy Apr 16, 2020
bf4e081
lenting
poussy Apr 16, 2020
81decf9
lenting
poussy Apr 16, 2020
d270e0f
lenting
poussy Apr 16, 2020
b4f7a8e
Merge pull request #462 from rekrevs/feature/warning_banners_and_uplo…
poussy Apr 16, 2020
24323a4
fix bug at banner at home page
poussy Apr 16, 2020
0cf8f5b
Merge pull request #463 from rekrevs/feature/warning_banners_and_uplo…
poussy Apr 16, 2020
729f9c4
fix slow banner icons loading
poussy Apr 20, 2020
9a7a5cc
Merge pull request #464 from rekrevs/feature/warning_banners_and_uplo…
poussy Apr 20, 2020
968a0da
set the email and links of future page clickable
poussy Apr 22, 2020
16dd33f
access future page without login
poussy Apr 22, 2020
070c894
update feedbackFruit to FeedbackFruits
poussy Apr 22, 2020
48d83a0
Merge pull request #465 from rekrevs/feature/warning_banners_and_uplo…
poussy Apr 22, 2020
cd70d18
Merge pull request #466 from rekrevs/feature/export_video_fbFruits
poussy Apr 22, 2020
70a2768
add option to send to all except utrecht at system wide email
poussy Apr 22, 2020
3d0fcc3
Merge pull request #467 from rekrevs/feature/send_to_all__except_utrecht
poussy Apr 22, 2020
a8d6d20
comment FBF and update grunt file version
poussy May 10, 2020
d46f43e
set gruntfile version to 39
poussy May 10, 2020
e8f022a
update future page
poussy May 12, 2020
07600be
update banner text
poussy May 12, 2020
b145336
update banner text at landing page
poussy May 12, 2020
e403135
update grunfile version to 40
poussy May 12, 2020
9ec01c5
lecture details with export to FBF added
poussy May 13, 2020
ffefd9e
update future page
poussy May 13, 2020
633171e
update gruntfile to version 41
poussy May 13, 2020
16e2efd
add button for export to canvas along fbf
poussy May 15, 2020
cdc7c9f
pop up on start exporting to canvas wz fbf
poussy May 19, 2020
68a85b4
add button export course as text
poussy Jun 5, 2020
3f4ed94
set grunfile version to 42
poussy Jun 5, 2020
b63569e
Merge pull request #471 from rekrevs/feature/export_course_as_text
poussy Jul 17, 2020
321becb
update the export to canvas with fbf export dialogue
poussy Jul 17, 2020
e9b2bef
wip
poussy Jul 17, 2020
79d53c8
fix export to canvas bug
poussy Jul 17, 2020
b1b66aa
fix merge conflicts
poussy Jul 17, 2020
0da39a4
Merge pull request #472 from rekrevs/merge_fbf_into_canvas
poussy Jul 17, 2020
1cc1fda
fix pop up on export video to fbf bug
poussy Aug 12, 2020
c517b68
fix the export video fialogue
poussy Aug 12, 2020
3916e92
fix send lect to fbf bug
poussy Aug 12, 2020
efb34a7
wip
poussy Aug 12, 2020
18fa6e7
fix bug
poussy Aug 12, 2020
165c724
final fix for send lecture to fbf bug
poussy Aug 12, 2020
c4b1f35
fix export course to canvas dialogue bug
poussy Aug 12, 2020
22fa44e
fix clickhijascking vulnerabiliy
poussy Dec 15, 2020
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
Empty file added -d
Empty file.
8 changes: 4 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function(grunt) {
},
livereload: {
options: {
livereload: '<%= connect.options.livereload %>'
livereload: true//'<%= connect.options.livereload %>'
},
files: [
'<%= yeoman.app %>/{,*/}*.html',
Expand All @@ -56,9 +56,9 @@ module.exports = function(grunt) {
},
connect: {
options: {
port: 9000,
port: 3001,
// Change this to '0.0.0.0' to access the server from outside.
hostname: '0.0.0.0',
hostname: 'localhost',
livereload: 35729
},
livereload: {
Expand Down Expand Up @@ -486,7 +486,7 @@ module.exports = function(grunt) {
debug: true,
ga_token: "",
host: '',
version: '4.4.38 (' + new Date().toUTCString() + ')',
version: '4.4.42 (' + new Date().toUTCString() + ')',
instruction_manual: 'external_documents/Manual - Using Scalable Learning v.3.22.pdf',
flipped_manual: 'external_documents/Manual - Flipped Teaching v.1.0.pdf',
teacher_welcome_video: "https://www.youtube.com/watch?v=tqE7wRQCgmU",
Expand Down
34 changes: 29 additions & 5 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@
<!-- endbuild -->
<link rel="stylesheet" href="styles/externals/foundation-icons/foundation-icons.css">
<link rel='stylesheet prefetch' href='https://netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.min.css'>
</head>
<style>
body {
display : none
}
</style>
</head>


<body>
Expand All @@ -55,8 +60,20 @@
<![endif]-->
<div ui-view="landing"></div>
<span ng-if="!('landing'| includedByState) && !('home'| includedByState) ">
<header>
<main-navigation user="current_user" teacher-courses="current_teacher_courses" student-courses="current_student_courses"></main-navigation>
<header>
<main-navigation user="current_user" teacher-courses="current_teacher_courses"
student-courses="current_student_courses"></main-navigation>
<div id='banner_container'>
<div id='banner_content'>
<i class="fas fa-exclamation-triangle" style="color:white"></i>
ScalableLearning will be shutting down at the end of December 2020.
For information on how to export your course to other platforms please click <a href='#/future' style="color: white !important;
text-decoration: underline;"> here</a>.
</div>
<div id='close_banner'>
<i class="fas fa-times-circle" ng-click='closeBanner()'></i>
</div>
</div>
</header>
<div id="main" role="main">
<div class="header">
Expand Down Expand Up @@ -95,7 +112,7 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
</script>

<script src="https://kit.fontawesome.com/fb66b677a5.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
- <!-- build:js({.tmp,app}) scripts/externals.js -->
<script src="bower_components/fastclick/lib/fastclick.js"></script>
Expand Down Expand Up @@ -298,6 +315,7 @@
<script src="scripts/controllers/teacher/in_class/inclass_display_ctrl.js"></script>

<script src="scripts/controllers/teacher/help/teacher_getting_started_ctrl.js"></script>
<script src="scripts/controllers/teacher/help/future_ctrl.js"></script>
<script src="scripts/controllers/teacher/help/lti_help_ctrl.js"></script>

<script src="scripts/controllers/student/course_list/enroll_modal_ctrl.js"></script>
Expand Down Expand Up @@ -346,5 +364,11 @@
else
self.location = "ie.html"
}
</script>
if(self == top) {
document.getElementsByTagName("body")[0].style.display = 'block';
}
else{
top.location = self.location;
}
</script>
</html>
9 changes: 8 additions & 1 deletion app/locals/translation_en.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ var translation_en={
change_password_confirmation: "You have successfully changed your password.",
confirm_change_email: "You have successfully changed your email.",
export_course: "Your anonymized course data will be emailed to you shortly." ,
export_course_cc:"Your course material will be emailed to you shortly as canvas common cartridge package",
export_course_text:"Your course material will be emailed to you shortly as text file",
export_student:"Your student list will be emailed to you shortly.",
export_school_administration: "Statistics will be exported to CSV and sent to your Email.",
another_marker: "There is another marker at the same time",
Expand Down Expand Up @@ -635,6 +637,7 @@ var translation_en={
student_cancelled:'{{name}} cancelled the invitation',
},
editor:{
export_video: "Export video to FeedbackFruits",
explanation: "Explanation",
quiz_question: "Quiz Question",
quiz_time: "Quiz Time",
Expand Down Expand Up @@ -674,6 +677,7 @@ var translation_en={
title:"@:global.title",
annotation:"Annotation",
tooltip:{
export_video:"Click on this button to create a copy of this lecture on feedbackFuit on your account",
invisible: "Not currently visible to students.",
visible_quiz: "Published: visible to students.",
invisible_quiz:"Unpublished: not visible to students.",
Expand Down Expand Up @@ -1005,7 +1009,10 @@ var translation_en={
button:{
add_teacher: "Add Teacher",
remove_teacher: "Remove Teacher",
export_as: "Export anonymized course data",
export_as: "Export Anonymized Course Data",
export_as_canvas: "Export Course to Canvas Package",
export_as_canvas_fbf: "Export Course to Canvas Package with FeedbackFruits lectures",
export_as_text: "Export Course Text",
invite: "Invite to Join",
send_email_reminder: "Send email reminders",
},
Expand Down
4 changes: 3 additions & 1 deletion app/locals/translation_sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,7 @@ var translation_sv={
student_cancelled:'{{name}} avbrutit inbjudan.',
},
editor:{
export_video: "Exportera videon FeedbackFruits",
explanation: "Förklaring",
quiz_question: "Quiz-fråga",
quiz_time: "Quiz-tidpunkt",
Expand Down Expand Up @@ -1000,7 +1001,8 @@ var translation_sv={
button:{
add_teacher: "Lägg till lärare",
remove_teacher: "Ta bort lärare",
export_as: "Exportera anonymiserade kursdata",
export_as: "Exportera Anonymiserade Kursdata",
export_as_canvas: "Exporterar kurs till Canvas Package",
invite: "Bjud in",
send_email_reminder: "Skicka ett mail påminnelser",
},
Expand Down
5 changes: 5 additions & 0 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ angular.module('scalearAngularApp')
templateUrl: '/views/teacher/help/teacher_getting_started.html',
controller: 'TeacherGettingStartedCtrl'
})
.state('future', {
url: '/future',
templateUrl: '/views/future.html',
controller: 'FutureCtrl'
})
.state('preview', {
url: '/preview',
params : { course_id: null, module_id: null, lecture_id: null,quiz_id:null,time:null, prevState:null },
Expand Down
3 changes: 3 additions & 0 deletions app/scripts/controllers/index_ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ angular.module('scalearAngularApp')

$scope.changeLanguage($translate.use());

$scope.closeBanner = function(){
angular.element('#banner_container').remove()
}
//Google Analytics
ga('create', scalear_api.ga_token);
ga('send', 'pageview');
Expand Down
40 changes: 38 additions & 2 deletions app/scripts/controllers/teacher/course/course_information_ctrl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('scalearAngularApp')
.controller('teacherCourseInformationCtrl', ['$scope', '$state', '$translate', '$log', '$window', 'Page', 'ScalearUtils', 'ContentNavigator', 'ErrorHandler', '$location', 'CourseModel', 'TeacherModel', '$modal', function($scope, $state, $translate, $log, $window, Page, ScalearUtils, ContentNavigator, ErrorHandler, $location, CourseModel, TeacherModel, $modal) {
.controller('teacherCourseInformationCtrl', ['$scope', '$state', '$translate', '$log', '$window', 'Page', 'ScalearUtils', 'ContentNavigator', 'ErrorHandler', '$location', 'CourseModel', 'TeacherModel', '$modal','Course', function($scope, $state, $translate, $log, $window, Page, ScalearUtils, ContentNavigator, ErrorHandler, $location, CourseModel, TeacherModel, $modal,Course) {

$window.scrollTo(0, 0);
$scope.in_delete = false;
Expand Down Expand Up @@ -69,7 +69,43 @@ angular.module('scalearAngularApp')
}
})
}

$scope.sendCourseToTeacherMail = function(fbf) {
checkToExport(fbf, $scope.course.id)
}
function checkToExport(fbf, course_id) {
$modal.open({
templateUrl: '/views/teacher/course_editor/export_modal.html',
controller: ['$scope', '$rootScope', '$modalInstance', function ($scope, $rootScope, $modalInstance) {
$scope.course_export_dialogue = fbf.with_fbf == true? true:false
$scope.canvas = fbf.with_fbf == false? true:false
console.log(' $scope.course_export_dialogue', $scope.course_export_dialogue)
console.log('$scope.canvas',$scope.canvas)
$scope.cancelExport = function () {
$modalInstance.close();
}
$scope.beginExport = function () {
$modalInstance.close();
Course.sendCourseToTeacherMail({
course_id: course_id,
export_lec_2_fbf: fbf.with_fbf,
}, function (response) {
if (response.notice) {
ErrorHandler.showMessage($translate.instant("error_message.export_course_cc"), 'errorMessage', 4000, 'success');
}
})
}
}]
});
}
$scope.sendCourseTextToTeacherMail = function () {
Course.sendCourseTextToTeacherMail({
course_id: $scope.course.id
},function(response){
if(response.notice) {
ErrorHandler.showMessage($translate.instant("error_message.export_course_text"), 'errorMessage', 4000, 'success');
}
})
}
//teachers part
function getTeachers() {
TeacherModel.getTeachers().then(function(value) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('scalearAngularApp')
.controller('lectureDetailsCtrl', ['$stateParams', '$scope', '$state', '$log', '$rootScope', '$modal', '$filter', 'ItemsModel', 'DetailsNavigator', 'CourseEditor', 'LectureModel','VideoQuizModel', 'MarkerModel', 'ScalearUtils','VimeoModel','VideoInformation',function($stateParams, $scope, $state, $log, $rootScope, $modal, $filter, ItemsModel, DetailsNavigator, CourseEditor, LectureModel, VideoQuizModel, MarkerModel, ScalearUtils, VimeoModel, VideoInformation) {
.controller('lectureDetailsCtrl', ['$stateParams', '$scope', '$state', '$log', '$rootScope', '$modal', '$filter', 'ItemsModel', 'DetailsNavigator', 'CourseEditor', 'LectureModel','VideoQuizModel', 'MarkerModel', 'ScalearUtils','VimeoModel','VideoInformation','Lecture','ErrorHandler',function($stateParams, $scope, $state, $log, $rootScope, $modal, $filter, ItemsModel, DetailsNavigator, CourseEditor, LectureModel, VideoQuizModel, MarkerModel, ScalearUtils, VimeoModel, VideoInformation, Lecture, ErrorHandler) {

$scope.lecture = ItemsModel.getLecture($stateParams.lecture_id)
$scope.url_old = $scope.lecture.url
Expand Down Expand Up @@ -117,11 +117,43 @@ angular.module('scalearAngularApp')
$rootScope.$broadcast("delete_online_marker", marker)
}



function checkToExportVideo (course_id,lecture_id) {
console.log("here======>")
$modal.open({
templateUrl: '/views/teacher/course_editor/export_modal.html',
controller: ['$scope', '$modalInstance', function ($scope, $modalInstance) {
$scope.video_export_dialogue = true
$scope.course_export_dialogue = false
$scope.exportVideo = function (course_id,lecture_id) {
Lecture.exportLectureToFeedbackFruit({
course_id: course_id,
lecture_id: lecture_id
},{}
,function(response){
angular.element('#export_button_2_fbf')[0].disabled = false
if (response.notice){
ErrorHandler.showMessage("video export to feedbackFruit accomplished", 'errorMessage', 4000, 'success');
} else {
ErrorHandler.showMessage("video export failed", 'errorMessage', 4000, 'error');
}
})
};
$scope.confirmExport = function(){
$modalInstance.close();
$scope.exportVideo(course_id,lecture_id)
}
}]
});
}
$scope.checkToExportVideo = function() {
checkToExportVideo($scope.lecture.course_id,$scope.lecture.id)
}
function checkToTrim(url,lecture) {
$modal.open({
templateUrl: '/views/teacher/course_editor/trim_modal.html',
controller: ['$scope', '$rootScope', '$modalInstance', function ($scope, $rootScope, $modalInstance) {
console.log('url:', url)
$scope.hideKeepTrimBtn = url == 'none' ? true : false
$scope.trim = function () {
var isVimeo = VideoInformation.isVimeo(lecture.url)
Expand All @@ -130,7 +162,6 @@ angular.module('scalearAngularApp')
lecture.duration = duration
lecture.start_time = 0
lecture.end_time = lecture.duration
console.log(duration)
lecture.update().then(function () {
$rootScope.$broadcast("update_module_time", lecture.group_id)
$rootScope.$broadcast("start_trim_video")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('scalearAngularApp')
.controller('lectureMiddleCtrl', ['$state', '$stateParams', '$scope', '$translate', '$log', '$rootScope', '$timeout', '$q', 'DetailsNavigator', 'ngDialog', 'ItemsModel', 'VideoQuizModel', 'ScalearUtils', 'MarkerModel', '$urlRouter', 'VideoInformation', 'VimeoModel', 'MobileDetector', function ($state, $stateParams, $scope, $translate, $log, $rootScope, $timeout, $q, DetailsNavigator, ngDialog, ItemsModel, VideoQuizModel, ScalearUtils, MarkerModel, $urlRouter, VideoInformation, VimeoModel, MobileDetector) {
.controller('lectureMiddleCtrl', ['$state', '$stateParams', '$scope', '$translate', '$log', '$rootScope', '$timeout', '$q', 'DetailsNavigator', 'ngDialog', 'ItemsModel', 'VideoQuizModel', 'ScalearUtils', 'MarkerModel', '$urlRouter', 'VideoInformation', 'VimeoModel', 'MobileDetector', 'Lecture', 'ErrorHandler',function ($state, $stateParams, $scope, $translate, $log, $rootScope, $timeout, $q, DetailsNavigator, ngDialog, ItemsModel, VideoQuizModel, ScalearUtils, MarkerModel, $urlRouter, VideoInformation, VimeoModel, MobileDetector,Lecture,ErrorHandler) {

$scope.lecture = ItemsModel.getLecture($stateParams.lecture_id)
ItemsModel.setSelectedItem($scope.lecture)
Expand Down Expand Up @@ -60,10 +60,10 @@ angular.module('scalearAngularApp')
msg: "error_message.got_some_errors"
}
$scope.hide_alerts = true;

setUpShortcuts()
setUpEventsListeners()

$scope.lecture_player.events.onMeta = function() {
// update duration for all video types.
var total_duration = $scope.lecture_player.controls.getDuration()
Expand Down Expand Up @@ -690,5 +690,5 @@ angular.module('scalearAngularApp')
removeShortcuts()
listnerDeleteVideo()
})

}]);
7 changes: 7 additions & 0 deletions app/scripts/controllers/teacher/help/future_ctrl.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* istanbul ignore next */
'use strict';

angular.module('scalearAngularApp')
.controller('FutureCtrl', ['$scope', '$location', '$anchorScroll','$rootScope','Page', 'scalear_api','$translate', function ($scope, $location, $anchorScroll, $rootScope,Page, scalear_api, $translate) {
$rootScope.subheader_message = $translate.instant('ScalableLearning Future')
}]);
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ angular.module('scalearAngularApp')
};
}]).directive('detailsUrl', ['$timeout', '$translate','$filter','ScalearUtils','$rootScope' ,'$modal',function($timeout, $translate, $filter,ScalearUtils,$modal,$rootScope) {
return {
template: '<a id="inserted_url" ng-click="show()" onshow="selectField()" ng-mouseover="overclass = \'fi-pencil size-14\'" ng-mouseleave="overclass= \'\'" editable-textarea="value" e-rows="5" e-cols="100" e-form="textBtnForm" blur="submit" onbeforesave="validate()(column,$data)" onaftersave="saveData()" ng-class="{video_input_disabled:transcoding}" ng-class={"text-italic":value=="none"}>{{ text || "http://" }} <i ng-class="overclass"></i></a>'+
"</br><div ng-hide='videoUploaded || is_link'><div>or</div>"+
"<div id='drop_zone' ng-class='{video_input_disabled:transcoding}' ngf-drop-disabled='transcoding' ngf-drop='showConsentModal($files)' style='border-style: dashed;font-size: 0.875rem'>Drag video here to upload.</div></div>",

template: '<a id="inserted_url" ng-click="show()" onshow="selectField()" ng-mouseover="overclass = \'fi-pencil size-14\'" ng-mouseleave="overclass= \'\'" editable-textarea="value" e-rows="5" e-cols="100" e-form="textBtnForm" blur="submit" onbeforesave="validate()(column,$data)" onaftersave="saveData()" ng-class="{video_input_disabled:transcoding}" ng-class={"text-italic":value=="none"}>{{ text || "http://" }} <i ng-class="overclass"></i></a>',
// "</br><div ng-hide='videoUploaded || is_link'><div>or</div>"+
// "<div id='drop_zone' ng-class='{video_input_disabled:transcoding}' ngf-drop-disabled='transcoding' ngf-drop='showConsentModal($files)' style='border-style: dashed;font-size: 0.875rem'>Drag video here to upload.</div></div>",
restrict: 'E',
scope: {
showUploadModal:"&",
Expand Down
3 changes: 2 additions & 1 deletion app/scripts/directives/youtube_directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ angular.module('scalearAngularApp')
if (player_controls.getSpeeds().indexOf(speed) != -1) {
player.media.setSpeed(speed)
}
} else {
}
else {
player.video.playbackRate = speed
}

Expand Down
10 changes: 6 additions & 4 deletions app/scripts/externals/popcorn.HTMLVimeoVideoElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
self.dispatchEvent( "canplay" );
self.dispatchEvent( "canplaythrough" );
}

self.pause = function() {
impl.paused = true;
if( !playerReady ) {
Expand Down Expand Up @@ -317,7 +317,7 @@
}
}

function onStateChange( event ) {
function onStateChange( event ) {
if( event.origin !== VIMEO_HOST ) {
return;
}
Expand All @@ -332,9 +332,10 @@
if ( data.player_id != playerUID ) {
return;
}

// Methods
switch ( data.method ) {

case "getCurrentTime":
onCurrentTime( parseFloat( data.value ) );
break;
Expand All @@ -347,7 +348,8 @@
}

// Events
switch ( data.event ) {
switch ( data.event ) {

case "loadProgress":
self.dispatchEvent( "progress" );
updateDuration( parseFloat( data.data.duration ) );
Expand Down
Loading