diff --git a/modules/src/xibo-player.js b/modules/src/xibo-player.js index bb5cefbd70..8c038404fd 100644 --- a/modules/src/xibo-player.js +++ b/modules/src/xibo-player.js @@ -49,14 +49,20 @@ const XiboPlayer = function() { // or if we are not in preview and have empty data on Widget (like text) // do not run ajax use that data instead if (String(currentWidget.url) !== 'null') { + let ajaxOptions = { + method: 'GET', + url: currentWidget.url, + }; + + // We include dataType for ChromeOS player consumer + if (window.location && window.location.pathname === '/pwa/') { + ajaxOptions.dataType = 'json'; + } + // else get data from widget.url, // this will be either getData for preview // or new json file for v4 players - $.ajax({ - method: 'GET', - url: currentWidget.url, - dataType: 'json', - }).done(function(data) { + $.ajax(ajaxOptions).done(function(data) { // The contents of the JSON file will be an object with data and meta // add in local data. if (localData) {