Unstable 1.1.14.0
This commit is contained in:
@@ -8,29 +8,28 @@ using Steamworks.Data;
|
||||
namespace Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// Class for utilizing the Steam Video API.
|
||||
/// </summary>
|
||||
public class SteamVideo : SteamClientClass<SteamVideo>
|
||||
{
|
||||
internal static ISteamVideo? Internal => Interface as ISteamVideo;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
internal override bool InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamVideo( server ) );
|
||||
if ( Interface is null || Interface.Self == IntPtr.Zero ) return false;
|
||||
|
||||
InstallEvents();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<BroadcastUploadStart_t>( x => OnBroadcastStarted?.Invoke() );
|
||||
Dispatch.Install<BroadcastUploadStop_t>( x => OnBroadcastStopped?.Invoke( x.Result ) );
|
||||
}
|
||||
|
||||
public static event Action? OnBroadcastStarted;
|
||||
public static event Action<BroadcastUploadResult>? OnBroadcastStopped;
|
||||
|
||||
/// <summary>
|
||||
/// Return true if currently using Steam's live broadcasting
|
||||
/// Return <see langword="true"/> if currently using Steam's live broadcasting
|
||||
/// </summary>
|
||||
public static bool IsBroadcasting
|
||||
{
|
||||
@@ -42,7 +41,7 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If we're broadcasting, will return the number of live viewers
|
||||
/// Returns the number of viewers that are watching the stream, or <c>0</c> if <see cref="IsBroadcasting"/> is <see langword="false"/>.
|
||||
/// </summary>
|
||||
public static int NumViewers
|
||||
{
|
||||
@@ -57,4 +56,4 @@ namespace Steamworks
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user