When you're doing if( $("video").prop('muted', true) )
you're both setting the property to true
and then ask if it's true.
Changing the condition to if( $("video").prop('muted') )
solves the problem - Here's an example.
Also note this will work on all videos on a page so if you have more than one player it might get confusing.