
How can I setup to the lowest quality available when playing my video?
Im using the api this way:
<script src="//content.jwplatform.com/libraries/J3r19of7.js"> </script>
<script> var playerInstance = jwplayer("jwreban");
playerInstance.setup({
playlist: "//cdn.jwplayer.com/v2/playlists/w8QCHyYE?format=mrss",
width: "100%",
aspectratio: "1:1"
});
function shufflePlaylist(playlist) {
var currentIndex = playlist.length, tempValue, randomIndex;
while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * playlist.length);
currentIndex -= 1;
tempValue = playlist[currentIndex];
playlist[currentIndex] = playlist[randomIndex];
playlist[randomIndex] = tempValue;
}
return playlist;
}
playerInstance.on("ready", function() {
var playlistObj = playerInstance.getPlaylist();
playerInstance.load(shufflePlaylist(playlistObj));
});
jwplayer().onReady(function(event) {
jwplayer().onQualityLevels(function(event) {
jwplayer().setCurrentQuality(0);
});
});
</script>
How can i set the script when the video is played to be the lowest quality to save bandwidth?
So far ive seen its something like
jwplayer().setCurrentQuality(0);
But where or how it needs to be configured in my instance?