X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=video.rst;h=c41099d6e8aa2db0f4eb38d621acf35dae0c807a;hb=8e3c22eaf1cc06eaedaa7442d67c59dc1ad0e0ca;hp=4e7c41ec1c45ee949154e4890819130916c66de8;hpb=0995ee628cce53bdaf02c5da2b49e9821cfe7b48;p=nageru-docs diff --git a/video.rst b/video.rst index 4e7c41e..c41099d 100644 --- a/video.rst +++ b/video.rst @@ -74,7 +74,24 @@ stream is broken and hasn't reconnected yet). Controlling video playback -------------------------- -TODO +Themes have some programmatic control over video playback. In particular, +if you want to make a video start from the beginning, you can do:: + + video:rewind() + +which will instantly make it start from the first frame again. This can be +useful if you e.g. want the video to start when you're switching to it, +or if you're not really using it to loop (e.g. as a transition marker). + +You can also change its rate, e.g. by:: + + video:change_rate(2.0) + +This will make it play at twice its usual speed. Your rate should not be +negative nor exactly zero. You can set a rate to e.g. 1e-6 if you want to +in practice stop the video; once you change it back to normal speed, +the next frame will resume playing. + Integration with CasparCG -------------------------