JavaScript Broadcast

Open-source JavaScript projects categorized as Broadcast Edit details

Top 6 JavaScript Broadcast Projects

  • broadcast-channel

    :satellite: BroadcastChannel to send data between different browser-tabs or nodejs-processes :satellite: + LeaderElection over the channels

    Project mention: How to Logout of Multiple Tabs | React Web App | dev.to | 2022-05-20

    Go ahead in your terminal a install this dependency npm i broadcast-channel To learn more about Broadcast Channel API , I encourage you to go on the following links: [https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API] [https://github.com/pubkey/broadcast-channel]

  • TikTok-Chat-Reader

    Website to display chats and gifts in realtime from your TikTok LIVE stream. Demo project for TikTok-Live-Connector library.

    Project mention: How to connect the comments to the words of the game? | reddit.com/r/Tiktokhelp | 2022-04-12

    ​ ​ !< !< ​ !< Level: 1 Score: 0 Attempts: 0 ​ ​ Submit Reset Chats ​ !< ​ >! !< >!!< ​ ​ script.js const userGuess = document.getElementById("user-guess"); const submitBtn = document.getElementById("submit"); const usersWord = document.getElementById("scrambled-word"); const info = document.getElementById("info"); const levelOutput = document.getElementById("level"); const scoreOutput = document.getElementById("score"); const attemptsOutput = document.getElementById("attempts"); const gameContainer = document.getElementById("game-container"); const guessContainer = document.getElementById("guess-container"); const resetBtn = document.getElementById("reset-btn"); ​ ​ ​ let level = 1; let score = 0; let word; let attempts = 0; let correct = 0; ​ const lvlOneWords = [ >! "test"!< ]; ​ const lvlTwoWords = [ >! "test"!< ]; ​ const lvlThreeWords = [ >! "test"!< ]; ​ const lvlFourWords = [ >! "test"!< ]; ​ const lvlFiveWords = [ >! "test"!< ]; ​ const lvlSixWords = [ >! "test"!< ]; ​ const lvlSevenWords = [ >! "test"!< ]; ​ const lvlEightWords = [ >! "test"!< ]; ​ function reset() { >! level = 1;!< >! score = 0;!< >! correct = 0;!< >! attempts = 0;!< >! word = "";!< >! updateBoard();!< >! info.innerHTML = "";!< >! userGuess.value = "";!< } ​ function randomWord(lvl) { >! word = lvl[Math.floor(Math.random() * lvl.length + 1) - 1];!< >! return word;!< } ​ function scrambleWord(word) { >! let letters = word.split("");!< >! let currentIndex = letters.length,!< temporaryValue, randomIndex; ​ >! // While there remain elements to shuffle...!< >! while (0 !== currentIndex) {!< // Pick a remaining element... randomIndex = Math.floor(Math.random() * currentIndex); currentIndex -= 1; ​ // And swap it with the current element. temporaryValue = letters[currentIndex]; letters[currentIndex] = letters[randomIndex]; letters[randomIndex] = temporaryValue; >! }!< ​ >! return letters.join(" ");!< } function updateBoard() { >! scoreOutput.innerHTML = score;!< >! levelOutput.innerHTML = level;!< >! attemptsOutput.innerHTML = attempts;!< } ​ function checkAnswer(guess) { >! console.log(`Correct: ${correct}`);!< >! if (correct == 3) {!< level += 1; correct = 0; >! }!< ​ >! if (attempts == 3) {!< guessContainer.classList.toggle("hidden"); info.innerHTML = "Sorry. You are out of chances. Retry ";!< reset(); >! }!< ​ >! if (guess === word) {!< info.innerHTML = "aCORRECT";!< score += 1; correct += 1; attempts = 0; setLevel(); >! } else {!< info.innerHTML = "Bzzzt! That's not right!";!< score -= 1; attempts += 1; >! }!< ​ >! updateBoard();!< } ​ function setLevel() { >! if (level == 1) {!< randomWord(lvlOneWords); >! } else if (level == 2) {!< randomWord(lvlTwoWords); >! } else if (level == 3) {!< randomWord(lvlThreeWords); >! } else if (level == 4) {!< randomWord(lvlFourWords); >! } else if (level == 5) {!< randomWord(lvlFiveWords); >! } else if (level == 6) {!< randomWord(lvlSixWords); >! } else if (level == 7) {!< randomWord(lvlSevenWords); >! } else if (level == 8) {!< randomWord(lvlEightWords); >! } else if (level == 9) {!< info.innerHTML = "You Win! Great job! You can reset or keep playing.";!< >! }!< ​ >! console.log(`Word: ${word}`);!< >! usersWord.innerHTML = scrambleWord(word);!< } ​ ​ ​ submitBtn.addEventListener("click", function(e) { >! checkAnswer(userGuess.value.toLowerCase());!< >! userGuess.value = "";!< }); ​ ​ ///////// ​ ///// ​ ​ window.addEventListener( >! "keypress",!< >! function(e) {!< if (e.keyCode == 13) { checkAnswer(userGuess.value.toLowerCase()); userGuess.value = ""; } >! },!< >! false!< ); ​ resetBtn.addEventListener("click", function(e) { >! reset();!< >! setLevel();!< >! guessContainer.classList.remove("hidden");!< >! userGuess.value = "";!< }); ​ setLevel(); ​ style.css /* http://meyerweb.com/eric/tools/css/reset/ >! v2.0 | 20110126!< >! License: none (public domain)!< */ /* line 6, ../sass/partials/_normalize.scss */ html1, body1, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { >! margin: 0;!< >! padding: 0;!< >! border: 0;!< >! font-size: 100%;!< >! font: inherit;!< >! vertical-align: baseline;!< } ​ /* HTML5 display-role reset for older browsers */ /* line 27, ../sass/partials/_normalize.scss */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { >! display: block;!< } ​ /* line 31, ../sass/partials/_normalize.scss */ body { >! line-height: 1;!< } ​ /* line 34, ../sass/partials/_normalize.scss */ ol, ul { >! list-style: none;!< } ​ /* line 37, ../sass/partials/_normalize.scss */ blockquote, q { >! quotes: none;!< } ​ /* line 40, ../sass/partials/_normalize.scss */ blockquote:before, blockquote:after, q:before, q:after { >! content: "";!< >! content: none;!< } ​ /* line 45, ../sass/partials/_normalize.scss */ table { >! border-collapse: collapse;!< >! border-spacing: 0;!< } ​ /* line 5, ../sass/styles.scss */ html, body { >! font-size: 16px;!< >! width: 50%;!< >! font-family: "Quicksand", sans-serif;!< >! overflow-x: hidden;!< >! overflow-y: hidden;!< } ​ /* line 13, ../sass/styles.scss */ nav { >! border-bottom: #e18a07 2px solid;!< >! width: 100%;!< >! padding: 0.625em;!< >! display: block;!< >! height: 2em;!< } ​ /* line 20, ../sass/styles.scss */ h1 { >! font-size: 2em;!< >! display: inline-block;!< >! float: left;!< >! padding-left: 1em;!< } ​ /* line 26, ../sass/styles.scss */ #contact { >! font-size: 2em;!< >! display: inline-block;!< >! float: right;!< >! padding-right: 1em;!< } ​ /* line 32, ../sass/styles.scss */ #contact a { >! color: #000;!< } ​ /* line 35, ../sass/styles.scss */ #contact i:hover { >! color: #e18a07;!< >! cursor: pointer;!< } ​ /* line 40, ../sass/styles.scss */ #rules { >! position: absolute;!< >! z-index: 999;!< >! width: 31.25em;!< >! height: 31.25em;!< >! text-align: center;!< >! left: 50%;!< >! margin-left: -200px;!< >! top: 50%;!< >! margin-top: -200px;!< } ​ /* line 51, ../sass/styles.scss */ #rules p { >! margin-bottom: 1.25em;!< } ​ /* line 55, ../sass/styles.scss */ #game-container { >! text-align: center;!< >! margin: 2em auto;!< >! width: 100vh;!< >! height: 80vh;!< } ​ /* line 62, ../sass/styles.scss */ #game-container p { >! display: inline-block;!< >! margin-right: 1em;!< >! margin-bottom: 3em;!< >! font-weight: 500;!< >! font-size: 1.5em;!< } ​ /* line 69, ../sass/styles.scss */ #game-container p span { >! font-weight: 300;!< } ​ /* line 72, ../sass/styles.scss */ #game-container p#info { >! display: block;!< >! text-align: center;!< >! font-size: 2em !important;!< >! height: 2em;!< >! margin-bottom: 1em;!< } ​ /* line 80, ../sass/styles.scss */ #scrambled-word { >! font-size: 3em !important;!< >! font-family: "Anton", sans-serif;!< >! text-transform: uppercase;!< >! display: block;!< >! margin-left: 48px;!< >! margin-bottom: 1em !important;!< } ​ /* line 89, ../sass/styles.scss */ #scrambled-word p { >! display: block;!< >! width: 100%;!< } ​ /* line 94, ../sass/styles.scss */ #user-guess { >! display: block;!< >! width: 20em;!< >! height: 3em;!< >! padding-left: 1em;!< >! margin: 0 auto 1.25em;!< >! border: 1px solid #000;!< >! outline-color: #e18a07;!< >! font-size: 1.1em;!< } ​ /* line 104, ../sass/styles.scss */ small { >! font-size: 0.8em;!< } ​ /* line 107, ../sass/styles.scss */ .lead { >! font-size: 1.2em;!< >! font-weight: 700;!< } ​ /* line 111, ../sass/styles.scss */ .correct, .incorrect { >! font-size: 1.5em;!< >! font-weight: 700;!< } ​ /* line 116, ../sass/styles.scss */ .correct { >! color: green;!< >! display: block;!< } ​ /* line 121, ../sass/styles.scss */ .incorrect { >! color: red;!< >! display: block;!< } ​ /* line 126, ../sass/styles.scss */ .hidden { >! visibility: hidden;!< } ​ /* line 129, ../sass/styles.scss */ button { >! cursor: pointer;!< >! width: 12em;!< >! height: 3em;!< >! outline: none;!< >! text-transform: uppercase;!< >! font-weight: 400;!< >! font-size: 1.1em;!< } ​ /* line 138, ../sass/styles.scss */ #submit { >! background: #fff;!< >! border: 2px solid #e18a07;!< } ​ /* line 143, ../sass/styles.scss */ #submit:hover { >! background: #e18a07;!< >! color: #fff;!< >! transition: 0.2s background;!< } ​ ​ /* line 138, ../sass/styles.scss */ ​ ​ /* line 150, ../sass/styles.scss */ #reset-btn { >! background: #fff;!< >! border: none;!< >! box-shadow: 1px 1px 1px #999;!< } ​ /* line 155, ../sass/styles.scss */ #reset-btn:hover { >! box-shadow: 1px 1px 1px #000;!< >! transition: 0.2s box-shadow;!< } ​ /* line 161, ../sass/styles.scss */ button:active { >! position: relative;!< >! top: 1px;!< } ​ /* line 166, ../sass/styles.scss */ #copyright { >! text-align: center;!< } ​ https://github.com/zerodytrash/TikTok-Chat-Reader API to retrieve chat comments

  • Appwrite

    Appwrite - The Open Source Firebase alternative introduces iOS support . Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!

  • broadcast-sample-app

    OpenTok Broadcast Sample Application

  • folderplayout

    CasparCG client for scheduled recurring playback of a playlist.

  • Agora-Many-to-Many-Live-Streaming-SDK-NG

    Many to many, live video streaming using the Agora Web SDK NG.

    Project mention: Request to be Promoted during a Live Video Streaming Using The Agora Web SDK | dev.to | 2021-11-03

    We will build on our existing project: Build Your Own Many To Many, Live Video Streaming Using the Agora Web SDK. You can begin by cloning this project’s GitHub repository. You will now have a project that looks like this:

  • Agora-Invite-User-To-Stage

    Invite a user to stage and become a host using a raise hand feature during a livestream using the @AgoraIO RTC and RTM SDKs.

    Project mention: Request to be Promoted during a Live Video Streaming Using The Agora Web SDK | dev.to | 2021-11-03
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2022-05-20.

JavaScript Broadcast related posts

Index

What are some of the best open-source Broadcast projects in JavaScript? This list will help you:

Project Stars
1 broadcast-channel 1,356
2 TikTok-Chat-Reader 79
3 broadcast-sample-app 51
4 folderplayout 46
5 Agora-Many-to-Many-Live-Streaming-SDK-NG 6
6 Agora-Invite-User-To-Stage 2
Find remote jobs at our new job board 99remotejobs.com. There are 5 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
Truly a developer’s best friend
Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.
scoutapm.com