Open alexeevit opened 4 years ago
If I use a source with the live: true param it doesn't initialize Callbacks after the config.audio redefining during stream reconnection.
live: true
config.audio
let playCallback = function() { console.log('play'); }; Amplitude.init({ songs: [{ url: "http://igor.torontocast.com:1870/stream", live: true }], callbacks: { play: playCallback } }); Amplitude.play();
play in the console
play
https://jsfiddle.net/alexeevdev/0oazpu51/1/
Actually I'd be glad to add Callbacks.initialize() right after config.audio = new Audio(); but I don't get how to test it with jest 🤣
Callbacks.initialize()
config.audio = new Audio();
Issue description
If I use a source with the
live: true
param it doesn't initialize Callbacks after theconfig.audio
redefining during stream reconnection.Environment
Steps to reproduce the issue
What is expected?
play
in the consoleLink to where the issue can be reproduced
https://jsfiddle.net/alexeevdev/0oazpu51/1/