Skip to content

Commit

Permalink
Add teletext transparency functions
Browse files Browse the repository at this point in the history
  • Loading branch information
caprica committed May 11, 2024
1 parent 131081e commit 6109ce9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/main/java/uk/co/caprica/vlcj/player/base/TeletextApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
package uk.co.caprica.vlcj.player.base;

import static uk.co.caprica.vlcj.binding.lib.LibVlc.libvlc_video_get_teletext;
import static uk.co.caprica.vlcj.binding.lib.LibVlc.libvlc_video_get_teletext_transparency;
import static uk.co.caprica.vlcj.binding.lib.LibVlc.libvlc_video_set_teletext;
import static uk.co.caprica.vlcj.binding.lib.LibVlc.libvlc_video_set_teletext_transparency;

/**
* Behaviour pertaining to teletext.
Expand Down Expand Up @@ -58,4 +60,21 @@ public void setKey(TeletextKey key) {
libvlc_video_set_teletext(mediaPlayerInstance, key.intValue());
}

/**
* Set whether the teletext background should be transparent.
*
* @param transparent <code>true</code> for transparent background, otherwise <code>false</code>
*/
public void setTransparency(boolean transparent) {
libvlc_video_set_teletext_transparency(mediaPlayerInstance, transparent ? 1 : 0);
}

/**
* Get whether the teletext background is transparent.
*
* @return <code>true</code> if background transparent, otherwise <code>false</code>
*/
public boolean getTransparency() {
return libvlc_video_get_teletext_transparency(mediaPlayerInstance) == 1;
}
}

0 comments on commit 6109ce9

Please sign in to comment.