Both work in the code. Which should be used?
A radio stream would be considered what? http://hi5.1980s.fm/;
oncanplay
https://jsfiddle.net/vhgL96se/142/
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.
The browser 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
https://jsfiddle.net/vhgL96se/144/
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.
The browser estimates it can play the media up to its end without stopping for content buffering.
player.oncanplaythrough = function () {
if (value.value !== "") {
canPlay = true;
playPauseIcon(true);
}
};