feature(subtitles): add frog_subtitles addon
This commit is contained in:
16
addons/frog_subtitles/nodes/VideoStreamSubtitles.cs
Normal file
16
addons/frog_subtitles/nodes/VideoStreamSubtitles.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Godot;
|
||||
|
||||
namespace Frog;
|
||||
|
||||
public partial class VideoStreamSubtitles : StreamSubtitles
|
||||
{
|
||||
[Export] private VideoStreamPlayer? player;
|
||||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (this.player.Visible && this.player.IsPlaying())
|
||||
{
|
||||
this.UpdateContent(this.player.StreamPosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user