File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
assets/src/js/frontend/learning-area/lesson Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -305,9 +305,11 @@ class LessonPlayer {
305305 * Send to tutor backend about video playing time in this interval
306306 */
307307 const intervalSeconds = 10 ;
308- this . syncInterval = setInterval ( ( ) => {
309- this . syncTime ( ) ;
310- } , intervalSeconds * 1000 ) ;
308+ if ( tutorConfig . tutor_pro_url ) {
309+ this . syncInterval = setInterval ( ( ) => {
310+ this . syncTime ( ) ;
311+ } , intervalSeconds * 1000 ) ;
312+ }
311313
312314 /**
313315 * Unmute automatically after first user interaction
@@ -340,7 +342,9 @@ class LessonPlayer {
340342 this . player . on ( 'pause' , ( ) => {
341343 if ( this . syncInterval ) clearInterval ( this . syncInterval ) ;
342344
343- this . syncTime ( ) ;
345+ if ( tutorConfig . tutor_pro_url ) {
346+ this . syncTime ( ) ;
347+ }
344348 } ) ;
345349
346350 this . player . on ( 'ended' , ( event : Plyr . PlyrEvent ) => {
You can’t perform that action at this time.
0 commit comments