/// <summary> /// /// </summary> private static void StopRoku() { if (runningProgram == "Roku") { Roku.KeyPress("Home"); } }
// GET: /Action/GoRoku public ActionResult GoRoku() { Roku.KeyPress("Home"); Screen.EnsureScreenOn(); Running.StartStream("Roku"); Receiver.SelectRokuInput(); Receiver.SelectTVOutput(); return(Content("")); }
/// <summary> /// Exit all running programmes /// </summary> /// <param name="keepScreen"></param> /// <returns></returns> public static bool ExitAllPrograms( bool keepScreen = false) { logger.Info("ExitAllPrograms"); lastActive = DateTime.UtcNow; if (spotifyRunning) { Spotify.ExitPlayer(); spotifyRunning = false; } if (runningProgram == "Music" || runningProgram == "Photo") { ExitJRMC(); } if (runningProgram == "Sky") { DesktopClient.SendIR(IRCodes.Codes["Sky.PowerSTB"], "Sky.PowerSTB"); Receiver.SelectComputerInput(); } if (runningProgram == "Roku") { Roku.KeyPress("Home"); Receiver.SelectComputerInput(); } if (!keepScreen) { Receiver.TurnOff(); Screen.SetScreenDisplayMode(0); } else { Screen.EnsureScreenOn(); Receiver.SelectTVOutput(); } bool ok = DesktopClient.ExitAllPrograms(); NothingRunning(); return(ok); }
public ContentResult KeyPress( string id) { Roku.KeyPress(id); return(this.Content("")); }