Hi I’m using openframeworks ofVideoPlayer() function :
http://www.openframeworks.cc/documentation/video/ofVideoPlayer.html
I’ve created a video, but I want to fade it out when it is done. Any idea of how to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
getPosition()andgetDuration()functions of the ofVideoPlayer to determine when you’re near the end of the video. When you want to start fading out the video, start setting the current color to whatever you want to fade to. You’ll probably want to use an interpolation function likeofLerp()to create a smooth transition.If you want to fade out with alpha, make sure you’ve enabled alpha blending with
ofEnableAlphaBlending().