clifg / movienight Goto Github PK
View Code? Open in Web Editor NEWThis project forked from zorchenhimer/movienight
Single instance video streaming server with integrated chat.
License: MIT License
This project forked from zorchenhimer/movienight
Single instance video streaming server with integrated chat.
License: MIT License
¯_(ツ)_/¯
At least jpg would be nice. Why is it currently only png and gif?
Sometimes that might be nice to limit, but we should be able to turn it off.
// Limit the rate of duplicate messages. Ignore mods and admins.
// Only checks the last message.
if strings.TrimSpace(strings.ToLower(msg)) == cl.lastMsg &&
time.Now().Before(cl.nextDuplicate) &&
cl.CmdLevel == common.CmdlUser {
err := cl.SendChatData(common.NewChatMessage("", "",
common.ParseEmotes("You already sent that PeepoSus"),
common.CmdlUser,
common.MsgCommandResponse))
if err != nil {
common.LogErrorf("Unable to send slowdown for chat: %v", err)
}
return
}
In chatclient.go
Would be nice to have that happen automatically, at least on merges to master
This is especially important for mobile clients. When someone locks their phone or navigates from the mobile browser, the websocket gets closed, which drops them from the chat. If possible, we should keep them "in" the chat for a period of time and when they come back, reconnect with the same name and play the messages they missed.
Some notes:
We can definitely break this down though and not do the buffering just so we can test the drop/reconnect functionality. Buffering some messages should be relatively easy to add after that.
show it next to their name. Helps to show allegiance to a certain contestant or w/e
Looks like flvjs has some config settings we can check out to see if we can get better performance. Here's a small change I found in someone else's fork that we could experiment with (from video.js):
var videoElement = document.getElementById("videoElement");
var flvPlayer = flvjs.createPlayer({
type: "flv",
url: "/live",
isLive: true,
}, {
enableStashBuffer: false,
});
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
Similar to the "WrappedEmotesOnly" flag that exists for only showing emotes when they're wrapped in colons, we could have a flag that will only highlight user names when preceded with an @ symbol
Also look into if we should only highlight if it's @username instead.
Apparently everyone has the same colors across all chats, so there must already be a user/color map somewhere that we can use for this
Calling Broadcast()
when messages of type common.DTChat
are in the queue causes a deadlock due to the call of GetNames()
in replaceColorizedName
. One example of falling into this case is when reloading the player for all users because it queues a message to cr.queue
.
Reloading player:
cl.belongsTo.AddCmdMsg(common.CmdRefreshPlayer, nil)
Broadcast function:
case msg := <-cr.queue:
cr.clientsMtx.Lock()
for _, client := range cr.clients {
go send(msg, client)
}
cr.clientsMtx.Unlock()
case msg := <-cr.modqueue:
cr.clientsMtx.Lock()
for _, client := range cr.clients {
if client.CmdLevel >= common.CmdlMod {
go send(msg, client)
}
}
And then we can make bachelor/whatever themed messages.
Like instead of You cannot change someone else's color. PeepoSus
it should pull from a config file and we would use something like You can't change someone else's color. Stay in your lane.
We should be able to have bigger emotes. At least gifs should be bigger
To ensure they're highlighted
Making it an emoji would be cool and easy.
Like a rose for bach
This is almost certainly a deadlock because we're trying to read the list of names in the chat.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.