How to use setEffect function

i am going to use setEffect for desktop sharing but i can’t figure out how to use this when ever i pass desktop track stream attribute as setEffect parameter so it gave error e.isEnabled is not a function shown in fig(1.1) that was really appreciable if any one help me
image
fig(1.1)