in adddition, ive been trying to debug the problem but im not sure where to put the callback funtions. the code is below:
const player = SLDP.init({
container: playerId,
stream_url: url,
// initial_resolution: '240p',
autoplay: playing,
//occupies 100% of parent element's width / height
width: 'parent',
height: 'parent',
controls: controls,
muted: true,
reconnects: 16,
buffering: 3000,
onpause() {
console.log('pausee');
},
onplay() {
console.log('play');
},
onPause(data: any) {
console.log(url);
console.log(playing);
console.log(data);
},
onError(error: any) {
console.log('error');
console.log(error);
},
onLowBuffer() {
console.log('low buffer');
},
});
thanks!