Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with movie players and scenes. #12

Open
fred-dev opened this issue Feb 16, 2020 · 1 comment
Open

Issues with movie players and scenes. #12

fred-dev opened this issue Feb 16, 2020 · 1 comment

Comments

@fred-dev
Copy link

fred-dev commented Feb 16, 2020

I am having some issues using the current master of OF on OSX 10.15.3.
When I have an ofVideoPlayer or ofxHapPlayer in a scene the renderer acts very strangely, when I leave the scene the last played frame of video will stay, but at a different size. The scene manager will also not go to next and previous scene properly, I can go to the scene with a movie in it once but not again, not using previous and next scene and not by calling gotoScene with either the name or the numerical ID.

Here is a sample scene I have been using to test.


pragma once

#include <ofxAppUtils.h>
#include "ofxHapPlayer.h"
class MovieScene : public ofxFadeScene {

	public:

		// set the scene name through the base class initializer
		MovieScene() : ofxFadeScene("Movie"){
			setSingleSetup(true); // call setup each time the scene is loaded
			setFade(1000, 1000); // 1 second fade in/out
		}

		// scene setup
		void setup() {
            vid.load("SampleHap.mov");
            //vid.stop();
		}

		// called when scene is entering, this is just a demo and this
		// implementation is not required for this class
		void updateEnter() {
		
			// called on first enter update
			if(isEnteringFirst()) {
				ofLogNotice("MovieScene") << "update enter";
			}
		
			// fade scene calculates normalized alpha value for us
			ofxFadeScene::updateEnter();
			
			// finished entering?
			if(!isEntering()) {
				ofLogNotice("MovieScene") << "update enter done";
                vid.setPosition(0);
                vid.play();
			}
		}

		// normal update
		void update() {
            vid.update();
		}

		// called when scene is exiting, this is just a demo and this
		// implementation is not required for this class
		void updateExit() {
            vid.stop();
		}

		// draw
		void draw() {
            vid.draw(0,0);
		}
		
		// cleanup
		void exit() {
		
		}

    ofxHapPlayer vid;
};
@danomatika
Copy link
Owner

Off the top of my head, I'm not sure why this would be causing an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants