Hi guys, sorry if this is a known issue or something of the sort, I googled a lot of different possible ways to describe this problem and found nothing.
I have this 2016 twine game in which [if you wanna see it is called Rainy Day by Thaisa, I can’t add the link] I used a javascript script to play audio from. This is the script:
if(typeof YouTubeTunes == "undefined"){
$('body').append('<div id="youtubetunes"></div>');
var YouTubeTunes = {
play: function(id){
console.log('YouTubeTunes:' + id);
if(this.current != id){
this.current = id;
var container = $('#youtubetunes');
container.empty();
container.append('<iframe width="1" height="1" src="https://www.youtube.com/embed/'+id+'?rel=0&autoplay=1&controls=0&showinfo=0&loop=1&playlist='+id+'" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen ></iframe>');
} else {
console.log('already playing');
}
},
stop: function(){
$('#youtubetunes').empty();
this.current = "";
console.log('stopped youtubetunes');
}
};
window.YouTubeTunes = YouTubeTunes;
}
And this is what I add to the passages:
<img src="!@#$" onerror="YouTubeTunes.play('J0rb56Wegq4');" />
The audio play continuously while the player explore the passages until they get somewhere that I ask for a change, using the same passage code with a different URL.
Simple, straightforward it worked for years.
Until when I went visiting last month and the sounds weren’t playing anymore. I didn’t think much of it, thought it could be something related to permissions or the youtube ads and decided to test new ways of implementing local files. Mind you, I’m out of the scene for a while so I need to research a bit. But when I got down to testing, what do you know, the code still works: when opening the story locally, the sound still opens and plays normally. I was a bit baffled and logged in itch.io and what? The sounds worked when I’m logged in too, with the menu on top. But when I open an incognito window, it doesn’t again.
I’m still planning on changing the audio system to local files so unexpected things like that don’t happen anymore [and if you have any suggestions i’d love to hear them, I’m using harlowe] but I’m also pretty goddamn curious of what the hell is going on here for this inconsistency to happen. Do you guys have any clues?
Thanks in advance for reading this wall of text.
Twine Version:
[browser version on twinery]