Coder Social home page Coder Social logo

csharpfritz / fritz.streamtools Goto Github PK

View Code? Open in Web Editor NEW
148.0 9.0 73.0 81.54 MB

Handy tools for managing my live stream, built with ASP.NET Core

License: MIT License

C# 76.56% CSS 0.84% JavaScript 4.41% HTML 17.20% Batchfile 0.15% Dockerfile 0.29% SCSS 0.55%

fritz.streamtools's Introduction

Fritz.StreamTools

Handy tools for managing my a live video stream and outputting video widgets that can be used directly in OBS or other streaming tools.

Build status

Features

The project is intended to be built as a Docker container and configured with a series of environment variables. It is intended to support a single-user, and not run on the public-facing internet.

The following features are supported by this project:

  • A checklist rundown of segments of the show (/rundown) that is updated from another page (/admin)
  • A followers count API that reports the total number of followers: GET /api/Followers
  • A followers count page that can be easily styled and formatted at /Followers/Count
  • A followers goal meter that can be sized and have its goal caption and value set, complete with configuration screen at /Followers/Goal/Configuration Follower Goal Sample

Services Supported

The project supports reading stream metrics from the following services:

  • Mixer
  • Twitch

Contributing

This application was built with ASP.NET Core 2.0 and can be built on Mac, Linux, and Windows. Download the .NET SDK and grab a copy of Visual Studio Code to get started on any platform.

How to contribute

  1. Open new issue or find some interesting,
  2. Fork repository,
  3. Create new branch in your fork from dev,
  4. Code something awesome,
  5. Create pull-request from your branch to our dev branch,
  6. In pull request write what you did and why, if it requires an explanation,
  7. (Optional) Answer questions or correct your code if needed,
  8. Celebrate that you are new Contributor :)

More about forking

Building and running locally

  1. Ensure pre-requisites:
    1. .NET Core 2.1 SDK
    2. Docker
  2. Fork repository
  3. Clone
  4. (Recommended) Open in editor such as Visual Studio or Visual Studio Code
  5. Add GitHub > User and AuthenticationToken to Fritz.StreamTools\appsettings.json (no scopes needed)
  6. Run dotnet build .\Fritz.StreamTools.sln to confirm build success
    1. If error: A compatible SDK version for global.json version, update the version in global.json to match your .NET version.
    2. If error: \Fritz.StreamTools\Test\Test.csproj : error NU1605: Detected package downgrade, update the version numbers to match what is expected based on the error.
  7. Run docker-compose -f "docker-compose.yml" -f "docker-compose.override.yml" up -d --build
  8. Run docker ps to find the port (for example: "32768" in "0.0.0.0:32768->80/tcp")
  9. Browse to http://localhost[port]

Configuration

Google Fonts Api

To use your own Google Fonts Api key without modifying the Fritz.StreamTools\appSettings.json you can place your key in the secrets.json file in the path appropriate for your OS.

The userSecretsId is 78c713a0-80e0-4e16-956a-33cf16f08a02 and can be found in Fritz.StreamTools\Fritz.StreamTools.csproj.

If you are using Visual Studio you can use the integrated User Secrets management UI

The secrets.json file should look like this

{
  "GoogleFontsApi": {
    "Key": "<YOUR API KEY>"
  }
}

Naming guideline for unit tests

  • Create a folder for each "logical class"
  • Create a test class for each feature to test - end with "Should"
  • Test Methods should describe what they are inspecting and what they're given, if anything.. ending with "_Given..." Example: StreamService.CurrentFollowerCountShould.MatchCurrentFollowerCount_GivenOneService

fritz.streamtools's People

Contributors

alexcnichols avatar augustodeveloper avatar bardaky avatar billwagner avatar bravecobra avatar brunojuliao avatar codemancodes avatar crypticenigma00 avatar csharpfritz avatar dependabot-preview[bot] avatar dependabot[bot] avatar devsgarage avatar domfx avatar eonasdan avatar ethomson avatar jbdk avatar joegeary avatar lannonbr avatar leighwaldie avatar londospark avatar parithon avatar patrykolejniczak avatar quackenbushdev avatar seangwright avatar slamidtfyn avatar smabuk avatar staker4 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fritz.streamtools's Issues

Friztbot URL Checking

Could we setup Fritzbot to allow only certain URL's into the chat window.

List allowed url's in the config

Docker and 2.1 preview (https hosting)

Hi

I try to catch your videos on YouTube. Not always possible to do it live.

I'm looking at doing some work in 2.1, but struggling with Docker files (and port 443 and Https).

Any chance you could do a brief chat on setting up from scratch?

Thanks

Problem with .gitattributes

The .gitattributes file added in the last commit is causing file modifications on checkout on Windows.

If you take a fresh clone on Windows you start with 32 modified files in branch master, which is not great.

I don't know the correct way to resolve this, or if it is going to be a recurring problem, but thought I would mention it as I spent ages trying to get my fork in line with this repo and kept thinking I was doing something wrong when I had 32 modified files every time!

Fix for saving background colours was dropped

Part of the fix for saving background colours in the FollowerGoalConfiguration page was lost in the refactoring.

Line 206 of GoalConfiguration.js needs to be changed again to reference index 1 of the array.

bgBlendField = newNode.getElementsByTagName('input')[1];

New Merged EventList

It would be great if we could mimic the eventlist from StreamLabs, and include merged events from all sources

ex: Follow on Twitch, Follow on Mixer

Convert usage of XHR to fetch

In the configuration pages for Followers and Follower goal we use the XHR object. It would be nice to use the newer fetch API instead

Feature: A Marquee widget

What about a marquee to display some of the dynamic information displayed on screen? For example, the uptime, the goal progress, number of followers, and the music playing in the background.

Custom colors for follower bar progress

From @kirkdmo:

Would be nice to have the follower goal progress bar change colors (or have an option to do this) as it gets closer to the goal number.

For example

Follower Goal of 500
1 to 100 be red
100 to 200 orange
200 to 300 yellow
400 to 500 green

Feature Suggestion: Add commands via page UI and or Chat

The commands right now are hardcoded, and to add new commands you need to modify the project and rebuild, but sometimes commands are a one time thing in the middle of a stream, or in a particular stream.

So my suggestion is to have a page where you can name the command and have helpers to do common things like read/write to a file, play a sound/video/gif, randomize, send message/whisper to chat/user, set a timer to do a command x times or every x minutes, track a user to do like currency, etc, and maybe you can also code what you want either in the page or by following a set of rules in chat and probably only moderatos and streamer are allow to add, edit or remove commands.

Also streamers may have a particular way they use commands and may have hundreds of them and its way easier to do them in a visual way.

Consider using AutoFixture to improve setup in unit test

Since random values are being used in unit tests, look at using AutoFixture to simplify unit test setup. Here is a link to the project on GitHub:
https://github.com/AutoFixture/AutoFixture

Here is one example how this could be used in a unit test:

[Fact]
public void ShouldCountSeparately() {

	// arrange
	var jeffStreams = _fixture.Create<StreamServiceDouble>();
	var otherStream = _fixture.Create<StreamServiceDouble>();

	// act
	var sut = new Fritz.StreamTools.Services.StreamService(new[] {
		jeffStreams, otherStreamService });
	var count = sut.FollowerCountByService;

	// assert
	Assert.Equal(2, count.Count());
	Assert.Contains(count, c => c.service == jeffStreams.Name);
	Assert.Contains(count, c => c.service == otherStream.Name);
	Assert.Equal(jeffStreams.CurrentFollowerCount, count.First(c => c.service == jeffStreams.Name).count);
	Assert.Equal(otherStream.CurrentFollowerCount, count.First(c => c.service == otherStream.Name).count);


}

Scoreboard?

It would be fun to have a "scoreboard" widget that shows the top 5 Git Committers on our repositories over the last week / month / year / all-time

Name of this project?

It's becoming more than just a rundown of the stream, should we call it something more like "StreamTools"?

Branches, issue labels

Hi everyone,

First of all i'am new here that's why some things may be not obvious to me.
I see that some issues are related to specific branches, there is branch feature_FritzBot which looks the most up-to-date, but there are also feature_SignalR, feature-bot, feature-unittests.
I understand github flow but it is not obvious to me which branch and issue are related to each other.
Another question if the title has the word "Feature" should i create new branch from dev?

I think it would be very helpful to add a section in the readme about "How to contribute" with short word about every main branch, and maybe some labels for issue if they are related which concrete branch, or label for new features etc.

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.