I believe you are referring to the Frame Animation time line option to loop forever or some number of times. You can also set the delay times for frames in that panel. To script things like that you will need to use Action manager scripting code. You should be able to install Adobe Scriptlistener Plug-in into Photoshop and look at the Action manager codes it logs when you change the looping setting and set frames delays. It will be easier to use the code logged then learning how to code action manager script code.
Adobe's DOM does not cover all of Photoshop features. You need to use Action manager code to use many of Photoshop features in scripts..