# Help with text and video

**URL:** <https://discourse.processing.org/t/help-with-text-and-video/2104>\
**Category:** Coding Questions\
**Created:** [July 26, 2018, 5:58pm UTC](https://discourse.processing.org/t/help-with-text-and-video/2104 "2018-07-26T17:58:21Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [July 28, 2018, 3:36am UTC](https://discourse.processing.org/t/help-with-text-and-video/2104/9 "2018-07-28T03:36:58Z")

</div>

```auto
/**
 * Hacked Movie isPlaying() (v1.0)
 * GoToLoop (2018/Jul/28)
 * Discourse.Processing.org/t/help-with-text-and-video/2104/9
 */

import processing.video.Movie;
Movie vid;

void setup() {
  frameRate(30);
  textSize(050);
  textAlign(CENTER, BASELINE);
  fill(#FFFF00);

  vid = new Movie(this, "transit.mov") {
    @Override public boolean hasBufferSink() {
      return playing;
    }
  };

  vid.play();
  while (vid.width == 0 | vid.height == 0) delay(10);

  getSurface().setSize(vid.width, vid.height); // P3
  //size(vid.width, vid.height); // P2
}

void draw() {
  if (vid.hasBufferSink()) background(vid);
  else {
    background((color) random(#000000));
    text("Playback has finished!", width>>1, height>>1);
  }
}

void movieEvent(final Movie m) {
  m.read();
}

```

---

_[View the full topic](https://discourse.processing.org/t/help-with-text-and-video/2104)._
