You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use of_0.9.8 and Windows10, in the use of the video player to open 11 video, but no matter how I can only play the first four videos. After the video settings play () still can not play, and the program will run after a number of crashes. Can you help me, thank you. @arturoc
This is my code:
//--------------------------------------------------------------voidofApp::setup(){
for (int i = 0; i < 11; i++) {
vp.push_back(ofVideoPlayer());
vp[i].load(ofToString(i + 1) + ".mp4");
vp[i].play();
vp[i].setPaused(true);
}
for (int i = 0; i < 11; i++) {
ofLogNotice() << ofToString(vp[i].isPlaying());
}
num = 0;
}
//--------------------------------------------------------------voidofApp::update() {
if (vp[num].isPlaying()) {
vp[num].update();
}
else {
vp[num].play();
}
}
//--------------------------------------------------------------voidofApp::draw() {
if (vp[num].isPlaying()) {
vp[num].draw(0, 0);
}
string str = "num: " + ofToString(num);
str += "\n isplaying: " + ofToString(vp[num].isPlaying());
str += "\n isPaused: " + ofToString(vp[num].isPaused());
ofDrawBitmapStringHighlight(str, 100, 100);
}
//--------------------------------------------------------------voidofApp::keyPressed(int key){
if (key == '1'){
vp[num].setPaused(false);
vp[num].update();
}
if (key == '2') {
vp[num].setPaused(true);
if (++num >= 11) {
num = 10;
}
vp[num].setPaused(false);
vp[num].update();
}
if (key == '3') {
vp[num].setPaused(true);
if (num-- <= 0) {
num = 0;
}
vp[num].setPaused(false);
vp[num].update();
}
}
The text was updated successfully, but these errors were encountered:
bakercp
changed the title
OfVideoPlayer open video is greater than four, but can only play the first four
ofVideoPlayer: Cannot play more than 4 videos, even when more are loaded.
May 22, 2017
Use of_0.9.8 and Windows10, in the use of the video player to open 11 video, but no matter how I can only play the first four videos. After the video settings
play ()
still can not play, and the program will run after a number of crashes. Can you help me, thank you. @arturocThis is my code:
The text was updated successfully, but these errors were encountered: