restructure project for part 2
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Windows.Media.Control;
|
||||
|
||||
namespace Hyperbar.Widget.MediaController.Windows;
|
||||
|
||||
public class MediaControllerFactory(IServiceScopeFactory<MediaController> serviceScopeFactory) :
|
||||
IFactory<GlobalSystemMediaTransportControlsSession, MediaController?>
|
||||
{
|
||||
public MediaController? Create(GlobalSystemMediaTransportControlsSession value)
|
||||
{
|
||||
if (serviceScopeFactory.Create(value) is MediaController mediaController)
|
||||
{
|
||||
return mediaController;
|
||||
}
|
||||
|
||||
return default;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user