Skip to content

Commit 7048b70

Browse files
committed
Hide video on presenter if the user has notes
If the user passes --notes, hide the video at the presenter screen and add the video controls to the presentation screen.
1 parent 3502b75 commit 7048b70

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/classes/action/movie.vala

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,14 +617,21 @@ namespace pdfpc {
617617

618618
var largest_rect = video_confs.last().rect;
619619

620+
bool notes_mode = (Options.notes_position != null) ? true : false;
621+
n = 0;
620622
foreach (var conf in video_confs) {
623+
// if --notes passed, hide the video on the presenter screen
624+
if (notes_mode && conf.display_num == 0) {
625+
continue;
626+
}
627+
621628
Gst.Element sink = Gst.ElementFactory.make("gtksink", @"sink$n");
622629
Gtk.Widget video_area;
623630
sink.get("widget", out video_area);
624631
Gst.Element queue = Gst.ElementFactory.make("queue", @"queue$n");
625632
bin.add_many(queue, sink);
626633
tee.link(queue);
627-
if (conf.display_num == 0) {
634+
if ((conf.display_num == 0 && !notes_mode) || (conf.display_num != 0 && notes_mode)) {
628635
Gst.Element ad_element = this.add_video_control(queue, bin, conf.rect, largest_rect);
629636
ad_element.link(sink);
630637

0 commit comments

Comments
 (0)