Closed ravenjohn closed 4 years ago
Upon rechecking, it is because pauseRecording
and unpauseRecording
are indeed instance methods, and can only be called on an Output object with a name of Local Recording
. This may merit a discussion, since we cannot simply add Local Recording statically because it may not be installed in the user's XBC outputs. Or maybe we can, we just error out or reject when recording is called when not installed. Again, merits a discussion. :)
Yes, those two methods are, for now, instance methods for Output
instances. However, I think our previous experience with recording-based plugins has shown us some edge cases to consider.
It is impossible to totally remove the Local Recording plugin; the plugin store does not allow this. So you can assume that the plugin is always there, but it could be potentially unconfigured for new users. I think it was stated in JIRA (XBCPLUGINS-1014) that an unconfigured local recording plugin will not appear in the internal method getBroadcastChannelList
, but it is possible to start recording anyway by calling startBroadcast
with the string "Local Recording"
. (This means there could be cases where we cannot get the correct instance of the Output
object for recordings.)
With that in mind, perhaps we should first see if we can actually programmatically pause and unpause even in the unconfigured case, by manually adding "Local Recording"
to the internal functions? If so, it could make sense to consider moving these two special functions as static members of Output
(though at the moment I cannot predict if future XBC changes will require us to rethink that paradigm again).
startBroadcast({ suppressPrestreamDialog: true })
would still show the prestream dialog for the user to configure.Either ways, it should be safe to call pauseRecording
and unpauseRecording
even if pre-stream dialog is visible.
Issue
xjs.Output.unpauseLocalRecording()
andxjs.Output.pauseLocalRecording()
is not working.Version
Proposal
After investigating the source code, I found out that the
pauseRecording
andunpauseRecording
calls are missing the output name when being called.Currently:
See output.ts#L245 and output.ts#L275.
Should be:
Code can be improved by declaring
Local Recording
as a constant/static string.