WowzaPlayer.destroy is not a function

I’m using lastest javascript api of wowzaPlayer.

Why not a function destroy?

Stop a WowzaPlayer instance

The WowzaPlayer.destroy static method deallocates the WowzaPlayer instance that was created with the specified PlayerElement player ID.

destroy ( PlayerElement : string ) : WowzaPlayer

var myPlayer = WowzaPlayer.destroy(‘playerElement’);

(not working)

I changed

var myPlayer = WowzaPlayer.get(‘playerElement’);

if (myPlayer != null) {

myPlayer.destroy();

}

it’s working