diff --git a/scripts/x-api.js b/scripts/x-api.js index fae40eeb..c202227a 100644 --- a/scripts/x-api.js +++ b/scripts/x-api.js @@ -84,7 +84,7 @@ H5P.VideoXAPI = (function ($) { // Variables used in compiling xAPI results. var screenSize = screen.width + 'x' + screen.height; - var playbackSize = (width !== undefined && width !== '') ? width + 'x' + height : 'undetermined'; + var playbackSize = (width !== undefined && width !== '') ? width + 'x' + height : undefined; var playbackRate = rate; var userAgent = navigator.userAgent; var isFullscreen = Document.fullscreenElement !== null || document.mozFullScreen || document.webkitIsFullScreen || false; diff --git a/scripts/youtube.js b/scripts/youtube.js index 854f1263..69930f5f 100644 --- a/scripts/youtube.js +++ b/scripts/youtube.js @@ -194,8 +194,9 @@ H5P.VideoYouTube = (function ($) { */ var getWidthOrHeight = function (returnType) { var quality = self.getQuality(); - var width = ''; - var height = ''; + var width; + var height; + switch (quality) { case 'small': width = '320';