Ejemplo n.º 1
0
        public HostService(IHost host)
        {
            _host = host;

            _serenity = host.GetService <IOCCHostSerenity>();
            if (_serenity == null)
            {
                host.ReportFatalError("IOCCHostSerenity service is not available", "Unable to load plugin due to missing host service");
                return;
            }

            _playbackController = host.GetService <IOCCHostPlaybackController>();
            if (_playbackController == null)
            {
                host.ReportFatalError("IOCCHostPlaybackController service is not available", "Unable to load plugin due to missing host service");
                return;
            }

            _hostOverlay = host.GetService <IOCCHostOverlay>();
            if (_hostOverlay == null)
            {
                host.ReportFatalError("IOCCHostOverlay service is not available", "Unable to load plugin due to missing host service");
                return;
            }

            var videoOverlay = host.GetService <IOCCHostVideoOverlay>();

            if (videoOverlay == null)
            {
                host.ReportFatalError("IOCCHostVideoOverlay service is not available", "Unable to load plugin due to missing host service");
                return;
            }

            // Register for video view notifications
            videoOverlay.RegisterForVideoViewNotifications(true);

            // Make sure we register for playback notifications so that we can control
            // and manage our metadata streams.
            //_playbackController.RegisterForVideoPlaybackNotifications(true);

            _hostOverlay.SetOverlayAnchor(AnchorTypes.right, 20, 20, 500);

            LOG.Debug("Successfully created PluginModel instance");
        }
 public void DockRight()
 {
     _overlay?.SetOverlayAnchor(AnchorTypes.right, 5, _pluginWidth, _pluginWidth);
 }