I think i just figured it out by changing the matching function to == rather than .match
if (image.src == "http://ipaddress:8100/Mjpeg/0?authToken=abccb262-c400-4205-81e4-73ce28134d13") {
image.setAttribute('src', "http://ipaddress:8100/Mjpeg/1?authToken=abccb262-c400-4205-81e4-73ce28134d13");
}
else if (image.src == "http://ipaddress:8100/Mjpeg/1?authToken=abccb262-c400-4205-81e4-73ce28134d13") {
image.setAttribute('src', "http://ipaddress:8100/Mjpeg/2?authToken=abccb262-c400-4205-81e4-73ce28134d13");
}
else if (image.src == "http://ipaddress:8100/Mjpeg/2?authToken=abccb262-c400-4205-81e4-73ce28134d13") {
image.setAttribute('src', "http://ipaddress:8100/Mjpeg/0?authToken=abccb262-c400-4205-81e4-73ce28134d13");
}