Refactor the code to display the Stream in a Canvas, still doesn't work