|
10 | 10 | - [SubtitleManager.IsLocked(): bool](#subtitlemanagerislocked-bool) |
11 | 11 | - [SubtitleManager.IsPrivilegedUser(): bool](#subtitlemanagerisprivilegeduser-bool) |
12 | 12 | - [SubtitleManager.IsSyncedURL(): bool](#subtitlemanagerissyncedurl-bool) |
13 | | - - [SubtitleManager.LoadTranslationFile(TextAsset): void](#subtitlemanagerloadtranslationfiletextasset-void) |
| 13 | + - [SubtitleManager.LoadStringsFile(TextAsset): void](#subtitlemanagerloadstringsfiletextasset-void) |
14 | 14 | - [SubtitleManager.ProcessInput(string): void](#subtitlemanagerprocessinputstring-void) |
15 | 15 | - [SubtitleManager.ProcessURLInput(VRCUrl): void](#subtitlemanagerprocessurlinputvrcurl-void) |
16 | 16 | - [SubtitleManager.RegisterCallbackReceiver(UdonSharpBehaviour): void](#subtitlemanagerregistercallbackreceiverudonsharpbehaviour-void) |
|
19 | 19 | - [SubtitleManager.SetLocal(bool): void](#subtitlemanagersetlocalbool-void) |
20 | 20 | - [SubtitleManager.SetLocked(bool): void](#subtitlemanagersetlockedbool-void) |
21 | 21 | - [SubtitleManager.SetTimeOffset(float): void](#subtitlemanagersettimeoffsetfloat-void) |
| 22 | + - [SubtitleManager.SetOverlayHandler(SubtitleOverlayHandler): void](#subtitlemanagersetoverlayhandlersubtitleoverlayhandler-void) |
22 | 23 | - [SubtitleManager.SetVideoPlayers(BaseVRCVideoPlayer\[\]): void](#subtitlemanagersetvideoplayersbasevrcvideoplayer-void) |
| 24 | + - [SubtitleManager.SynchronizeSettings(SubtitleControlHandler|null): void](#subtitlemanagersynchronizesettingssubtitlecontrolhandlernull-void) |
23 | 25 | - [SubtitleManager.SynchronizeSubtitles(): void](#subtitlemanagersynchronizesubtitles-void) |
24 | 26 | - [SubtitleManager.UnregisterCallbackReceiver(UdonSharpBehaviour): void](#subtitlemanagerunregistercallbackreceiverudonsharpbehaviour-void) |
25 | 27 | - [SubtitleControlHandler](#subtitlecontrolhandler) |
@@ -99,10 +101,10 @@ Check if URL was synced or not |
99 | 101 |
|
100 | 102 | - If this returns `false` and `SubtitleManager.IsSynchronized()` is `true` then subtitles from pasted text are used |
101 | 103 |
|
102 | | -### SubtitleManager.LoadTranslationFile(TextAsset): void |
| 104 | +### SubtitleManager.LoadStringsFile(TextAsset): void |
103 | 105 |
|
104 | 106 | Load translation from JSON file (hardcoded status messages only). |
105 | | -You can also assign a file to `SubtitleManager.translationFile` variable in the inspector which will be loaded on start. |
| 107 | +You can also assign a file to `SubtitleManager.stringsFile` variable in the inspector which will be loaded on start. |
106 | 108 | _You will have to use a 3rd-party tool to translate the interface part of the prefab._ |
107 | 109 |
|
108 | 110 | <details> |
@@ -182,6 +184,7 @@ public class CallbackReceiver : UdonSharpBehaviour |
182 | 184 | | `OnUSharpVideoSubtitlesLockChange` | Lock state has changed (on/off) | |
183 | 185 | | `OnUSharpVideoSubtitlesTimeOffsetChange` | Time offset value has changed | |
184 | 186 | | `OnUSharpVideoSubtitlesVideoPlayerChange` | Video player reference has changed | |
| 187 | +| `OnUSharpVideoSubtitlesOverlayChange` | Overlay handler reference has changed | |
185 | 188 | | `OnUSharpVideoSubtitlesOwnershipChange` | Owner has changed | |
186 | 189 | | `OnUSharpVideoSubtitlesSettingsUpdate` | User has changed any setting (called by `SubtitleControlHandler` and `SetTimeOffset()`) | |
187 | 190 |
|
@@ -210,14 +213,23 @@ Change lock state, must be executed by the Master |
210 | 213 |
|
211 | 214 | ### SubtitleManager.SetTimeOffset(float): void |
212 | 215 |
|
213 | | -Set time offset value |
| 216 | +Set time offset value |
| 217 | +You should also call `SubtitleManager.SynchronizeSettings()` after to push the changes to the UI |
| 218 | + |
| 219 | +### SubtitleManager.SetOverlayHandler(SubtitleOverlayHandler): void |
| 220 | + |
| 221 | +Set overlay handler to use |
214 | 222 |
|
215 | 223 | ### SubtitleManager.SetVideoPlayers(BaseVRCVideoPlayer[]): void |
216 | 224 |
|
217 | 225 | Use this to change the video player references that the subtitles are synced with |
218 | 226 |
|
219 | 227 | - Does nothing when using **USharpVideo** |
220 | 228 |
|
| 229 | +### SubtitleManager.SynchronizeSettings(SubtitleControlHandler|null): void |
| 230 | + |
| 231 | +Use this to update settings on all connected instances of `SubtitleControlHandler` |
| 232 | + |
221 | 233 | ### SubtitleManager.SynchronizeSubtitles(): void |
222 | 234 |
|
223 | 235 | Re-synchronizes the subtitles globally, only the person who loaded them can do this (or the master after the synchronization is finished) - this can change when that person leaves the instance or lock state changes - check the `SubtitleManager.gameObject` owner in this case |
@@ -254,6 +266,8 @@ Toggle settings popup, use this to show and hide the popup using separate button |
254 | 266 |
|
255 | 267 | ### Styling methods |
256 | 268 |
|
| 269 | +You should call `SubtitleManager.SynchronizeSettings()` after making styling changes on the overlay to push the changes to the UI |
| 270 | + |
257 | 271 | <details> |
258 | 272 | <summary>List of styling methods</summary> |
259 | 273 |
|
|
0 commit comments