public PluginHostSvc() { _host1 = Utils.I.OCCHost?.GetService <IOCCHostGeneral>(); _overlay = Utils.I.OCCHost?.GetService <IOCCHostOverlay>(); _overlayEx = Utils.I.OCCHost?.GetService <IOCCHostOverlayEx>(); _playback = Utils.I.OCCHost?.GetService <IOCCHostPlaybackController>(); _hostSerenity = Utils.I.OCCHost?.GetService <IOCCHostSerenity>(); _videoOverlay = Utils.I.OCCHost?.GetService <IOCCHostVideoOverlay>(); _playback?.RegisterForVideoPlaybackNotifications(true); _overlay?.RegisterForVideoCellNotifications(true); _videoOverlay?.RegisterForVideoViewNotifications(true); _pluginWidth = 300; }
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"); }