A amostra Aviary HTM5L não funciona no iOS Safari (a foto parece continuar carregando)
-
11-12-2019 - |
Pergunta
Peguei o exemplo HTML5 e tentei no iOS Safari.
A foto de amostra aparece, mas continua carregando continuamente e nenhuma ação de edição do Aviary pode ser executada.
Alguém tem uma solução?
Aqui está o código de exemplo diretamente do site do Aviary em http://www.aviary.com/web-documentation
<!-- Load Feather code -->
<script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script>
<!-- Instantiate Feather -->
<script type="text/javascript">
var featherEditor = new Aviary.Feather({
apiKey: '12345678',
apiVersion: 2,
tools: 'all',
appendTo: 'injection_site',
onSave: function(imageID, newURL) {
var img = document.getElementById(imageID);
img.src = newURL;
}
});
function launchEditor(id, src) {
featherEditor.launch({
image: id,
url: src
});
return false;
}
</script>
<div id="injection_site"></div>
<img id="image1" src="http://images.aviary.com/imagesv5/feather_default.jpg"/>
<!-- Add an edit button, passing the HTML id of the image and the public URL ot the image -->
<p><input type="image" src="http://advanced.aviary.com/images/feather/edit-photo.png" value="Edit photo" onclick="return launchEditor('image1', 'http://images.aviary.com/imagesv5/feather_default.jpg');" /></p>
Solução
Entrei em contato com a Aviary em api@aviary.com e eles mencionaram que havia um bug que foi corrigido hoje.Agora está funcionando.
Outras dicas
Você tem que colocar esse código no servidor ativo, o local parece não funcionar aqui.A documentação da web do Aviary diz que "Defina um local em seu servidor para o Aviary enviar um HTTP POST de servidor para servidor".
Apenas no caso de...Você deve adicionar o 'src' completo na foto.Em vez de usarmos "src='/upload/miPhoto.png'" você deve usar "src='http://localhost:8080/project/upload/miPhoto.png'" Espero que isto ajude!