mute youtube videos if a specified word is found in the subtitles.
function mute() { // mute the video } var player = document.getElementById("youtube-player"); var subtitles = player.getSubtitles(); var word = "pizza"; if (subtitles.contains(word)) { mute(); }