#pragma once
#include "ofVideoBaseTypes.h"
#include "ofTexture.h"
#include "ofPixels.h"
class ofxEmscriptenVideoPlayer: public ofBaseVideoPlayer {
public:
ofxEmscriptenVideoPlayer();
~ofxEmscriptenVideoPlayer();
bool load(std::string name);
void close();
void update();
void play();
void stop();
bool isFrameNew() const;
ofPixels & getPixels();
const ofPixels & getPixels() const;
ofTexture * getTexture();
float getWidth() const;
float getHeight() const;
bool isPaused() const;
bool isLoaded() const;
bool isPlaying() const;
bool setPixelFormat(ofPixelFormat pixelFormat);
ofPixelFormat getPixelFormat() const;
float getPosition() const;
float getSpeed() const;
float getDuration() const;
bool getIsMovieDone() const;
void setPaused(bool bPause);
void setPosition(float pct);
void setVolume(float volume);
void setLoopState(ofLoopType state);
void setSpeed(float speed);
void setFrame(int frame);
int getCurrentFrame() const;
int getTotalNumFrames() const;
ofLoopType getLoopState() const;
void firstFrame();
void nextFrame();
void previousFrame();
void setUsePixels(bool usePixels);
private:
int id;
ofTexture texture;
ofPixels pixels;
bool gotFirstFrame;
bool usePixels;
};
Comments