Both work.
Which should be used?
A radio stream would be considered what?
I don’t believe there is buffering involved with that.
http://hi5.1980s.fm/;
oncanplay
The canplay event is fired when the user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
player.oncanplay = function () {
if (value.value !== "") {
canPlay = true;
playPauseIcon(true);
}
};
oncanplaythrough
The canplaythrough event is fired when the user agent can play the media and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
player.oncanplaythrough = function () {
if (value.value !== "") {
canPlay = true;
playPauseIcon(true);
}
};