We have seen reports from customers who get the following error message on iPhones using Safari:
“A problem repeatedly occurred on [URL]"
The problem is due to performance-heavy content that results in a memory crash on iOS.
If you have lots of embedded content on your site, you can optimize it by reloading only the iframe that is actually playing. You can manually add the following code to in5.config.js to reload the iframe when it changes visibility from visible to hidden:
$(window).on('load', function(){
function respondToVisibility(element, callback) {
var observer = new IntersectionObserver((entries, observer) => {
entries.forEach(entry => {
callback(entry.intersectionRatio > 0);
});
});
observer.observe(element);
}
$('iframe').each(function(_,el){
respondToVisibility(el, visible => {
var j = $(el);
if (visible) {
j.addClass('iframe-visible');
} else if (j.hasClass('iframe-visible')) {
j.removeClass('iframe-visible');
if (stopIFrameOnNewPage || j.parents('.mso')) {
var src = j.attr('src');
j.attr('src', '');
if(j.attr('data-src')) j.siblings('.cover').show();
else j.attr('src', src);
}
}
})
})
});
You'll also need to manually remove the following function from in5.config.js:
function stopIframe(targ){
$(targ).find('iframe').each(function(index,elem){
var j = $(elem), src = j.attr('src');
j.attr('src', '');
if(j.attr('data-src')) j.siblings('.cover').show();
else j.attr('src', src);
});
}
and its usages:
if(stopIFrameOnNewPage) { stopIframe($prevActive); };
and reformulate the following condition
from:
if(targState.parents('.activePage').length || targState.parents('.fixed-item-wrap').length) { stopIframe($otherStates); }
else{ var hideMSO=targState.parents('.mso[data-hidestart="1"]'); hideMSO.length&&hideMSO.addClass('hidden'); }
to:
if(!targState.parents('.activePage').length && !targState.parents('.fixed-item-wrap').length) { var hideMSO=targState.parents('.mso[data-hidestart="1"]'); hideMSO.length&&hideMSO.addClass('hidden'); }
To manually modify the code yourself, you can do the following:
- Open the in5.config.js file in a text editor such as TextEdit (macOS) or Notepad (Windows) or in an IDE such as Dreamweaver which is available if you have the full Adobe Creative Cloud subscription.
- Make the changes mentioned above.
- Save the changes.
If you're still having trouble, please send us both of the following to troubleshoot:
- Your InDesign file or a sample file that recreates the issue
- Your html5_output folder
You can send them here: