There's an infinite loop bug in the AVPro video player that will crash out the Udon script controlling it.
I've tested against the Live version and confirmed it works without issue, and tested on the current open beta with a stock AVPro video player prefab from the VRChat SDK to confirm the fault is in the AVPro video player and not something I've done in Udon myself.
To reproduce; Play a youtube video. Now play another one, or a twitch stream. It will get very angry and crash out immediately. Looking in the log, it seems like something is broken inside yt-dlp.exe?
2022.09.12 00:45:47 Log - [Video Playback] Attempting to resolve URL 'https://www.youtube.com/watch?v=v2BvjC24tO4'
2022.09.12 00:45:57 Log - NativeProcess.Start: started process id [11400]: C:/Users/[USERNAME]/AppData/LocalLow/VRChat/VRChat\Tools/yt-dlp.exe (...)
2022.09.12 00:45:57 Error - [UdonBehaviour] An exception occurred during Udon execution, this UdonBehaviour will be halted.
VRC.Udon.VM.UdonVMException: The VM encountered an error!
Exception Message:
The VM encountered an error!
Program execution time exceeded max VM time of 10.0 seconds. You may want to check for infinite loops/recursion.
Program Counter was at 380