Commit graph

111 commits

Author SHA1 Message Date
Gabe Kangas
3fb80554ef
Gek/external actions (#827)
* WIP External actions modal frontend

* Add external action links

* Allow modal to show/hide and use a dynamic url

* Use external link object instead of just url for state

* add style and placement to external action buttons

* reformat and simplify tag list style as not to conflict with action buttons and make them look less actionable since they're not

* fix bug to open modal

* have Esc key close modal

* fix style on modal

* make modal bg darker

* close modal when you click outside of it

* fix zindex

* Add support for external action icons and colors

* Some external action modal sizing + loading spinner

Co-authored-by: Ginger Wong <omqmail@gmail.com>
2021-03-15 15:32:52 -07:00
Gabe Kangas
bf33d08384
Add support for disabling chat. Closes #472 (#799) 2021-03-14 11:46:27 -07:00
Gabe Kangas
bc2caadb74
0.0.6 -> Master (#731)
* Implement webhook events for external integrations (#574)

* Implement webhook events for external integrations

Reference #556

* move message type to models and remove duplicate

* add json header so content type can be determined

* Pass at migrating webhooks to datastore + management apis (#589)

* Pass at migrating webhooks to datastore + management apis

* Support nil lastUsed timestamps and return back the new webhook on create

* Cleanup from review feedback

* Simplify a bit

Co-authored-by: Aaron Ogle <aaron@geekgonecrazy.com>

Co-authored-by: Gabe Kangas <gabek@real-ity.com>

* Webhook query cleanup

* Access tokens + Send system message external API (#585)

* New add, get and delete access token APIs

* Create auth token middleware

* Update last_used timestamp when using an access token

* Add auth'ed endpoint for sending system messages

* Cleanup

* Update api spec for new apis

* Commit updated API documentation

* Add auth'ed endpoint for sending user chat messages

* Return access token string

* Commit updated API documentation

* Fix route

* Support nil lastUsed time

* Commit updated Javascript packages

* Remove duplicate function post rebase

* Fix msg id generation

* Update controllers/admin/chat.go

Co-authored-by: Aaron Ogle <geekgonecrazy@users.noreply.github.com>

* Webhook query cleanup

* Add SystemMessageSent to EventType

Co-authored-by: Owncast <owncast@owncast.online>
Co-authored-by: Aaron Ogle <geekgonecrazy@users.noreply.github.com>

* Set webhook as used on completion. Closes #610

* Display webhook errors as errors

* Commit updated API documentation

* Add user joined chat event

* Change integration API paths. Update API spec

* Update development version of admin that supports integration apis

* Commit updated API documentation

* Add automated tests for external integration APIs

* check error

* quiet this test for now

* Route up some additional 3rd party apis. #638

* Commit updated API documentation

* Save username on user joined event

* Add missing scope to valid scopes list

* Add generic chat action event API for 3rd parties. Closes #666

* Commit updated API documentation

* First pass at moving WIP config framework into project for #234

* Only support exported fields in custom types

* Using YP get/set key as a first pass at using the data layer. Fixes + integration.

* Ignore test db

* Start adding getters and setters for config values

* More get/set config work. Starting to populate api with data

* Wire up some config edit endpoints

* More endpoints

* Disable cors middleware

* Add more endpoints and add test to test them

* Remove the in-memory change APIs

* Add endpoint for changing tags

* Add more config endpoints

* Starting to point more things away from config file and to the datastore

* Populate YP with db data

* Create new util method for parsing page body markdown and return it in api

* Verify proposed path to ffmpeg

* For development purposes show the config key in logs

* Move stats values to datastore

* Moving over more values to the datastore

* Move S3 config to datastore

* First pass the config -> db migrator

* Add the start of the video config apis

* It builds pointing everything away from the config

* Tweak ffmpeg path error message

* Backup database every hour. Closes #549

* Config + defaults + migration work for db

* Cleanup logging

* Remove all the old config structs

* Add descriptive info about migration

* Tweak ffmpeg validation logic

* Fix db backup path. backup on db version migration

* Set video and s3 configurations

* Update api spec with new config endpoints

* Add migrator for stats file

* Commit updated API documentation

* Use a dynamic system port for internal HLS writes. Closes #577 (#626)

* Use a dynamic system port for internal HLS writes. Closes #577

* Cleanup

* YP key migration to datastore

* Create a backup directory if needed before migrations

* Remove config test that no longer makes sense. Cleanup.

* Change number types from float32 to float64

* Update automated test suite

* Allow restoring a database backup via command line flags. Closes #549

* Add new hls segment config api

* Commit updated API documentation

* Update apis to require a value container property

* add socialHandles api

* Commit updated API documentation

* Add new latancy level setting to replace segment settings

* Commit updated API documentation

* Fix spelling

* Commit updated API documentation

* hardcode a json api of available social platforms

* Add additional icons

* Return social handles in server config api

* Add socialhandles validation to test

* Move list of hard coded social platforms to an api

* Remove audio only code from transcoder since we do not use it

* Add latency levels api + snapshot of video settings as current broadcast

* Add config/serverurl endpoint

* Return 404 on YP api if disabled

* Surface stream title in YP response

* Add stream title to web ui

* Cleanup log message. Closes #520

* Rename ffmpeg package to transcoder

* Add ws package for testing

* Reduce chat backlog to past 5hrs, max 50. Closes #548

* Fix error formatting

* Add endpoint for resetting yp registration

* Add yp/reset to api spec. return status in response

* Return zero viewer count if stream is offline. Closes #422

* Post-rebase fixes

* Fix merge conflict in openapi file

* Commit updated API documentation

* Standardize controller names

* Support setting the stream key via the command line. Closes #665

* Return social handles with YP data. First half of https://github.com/owncast/owncast-yp/issues/28

* Give the YP package access to server status regardless if enabled or not

* Change delay in automated tests

* Add stream title integration API. For #638

* Commit updated API documentation

* Add storage to the migrator

* Missing returning NSFW value in server config

* Add flag to ignore websocket client. Closes #537

* Add error for parsing broadcaster metadata

* Add support for a cli specified http server port. Closes #674

* Add cpu usage levels and a temporary mapping between it and libx264 presets

* Test for valid url endpoint when saving s3 config

* Re-configure storage on every stream to allow changing storage providers

* After 5 minutes of a stream being stopped clear the stream title

* Hide viewer count once stream goes offline instead of when player stops

* Pull steamTitle from the status that gets updated instead of the config

* Commit updated API documentation

* Optionally show stream title in the header

* Reset stream title when server starts

* Show chat action when stream title is updated

* Allow system messages to come back in persistence

* Split out getting chat history for moderation + fix tests

* Remove server title and standardize on name only

* Commit updated API documentation

* Bump github.com/aws/aws-sdk-go from 1.37.1 to 1.37.2 (#680)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.37.1 to 1.37.2.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.37.1...v1.37.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add video variant and stream latency config file migrator

* Remove mostly unused disable upgrade check bool

* Commit updated API documentation

* Allow bundling the admin from the 0.0.6 branch

* Fix saving port numbers

* Use name instead of old title on window focus

* Work on latency levels. Fix test to use levels. Clean up transcoder to only reference levels

* Another place where title -> name

* Fix test

* Bump github.com/aws/aws-sdk-go from 1.37.2 to 1.37.3 (#690)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.37.2 to 1.37.3.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.37.2...v1.37.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dependabot config

* Bump github.com/aws/aws-sdk-go from 1.37.3 to 1.37.5 (#693)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.37.3 to 1.37.5.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.37.3...v1.37.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump video.js from 7.10.2 to 7.11.4 in /build/javascript (#694)

* Bump video.js from 7.10.2 to 7.11.4 in /build/javascript

Bumps [video.js](https://github.com/videojs/video.js) from 7.10.2 to 7.11.4.
- [Release notes](https://github.com/videojs/video.js/releases)
- [Changelog](https://github.com/videojs/video.js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/videojs/video.js/compare/v7.10.2...v7.11.4)

Signed-off-by: dependabot[bot] <support@github.com>

* Commit updated Javascript packages

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Owncast <owncast@owncast.online>

* Make the latency migrator dynamic so I can tweak values easier

* Split out fetching ffmpeg path from validating the path so it can be changed in the admin

* Some commenting and linter cleanup

* Validate the path for a logo change and throw an error if it does not exist

* Logo change requests have to be a real file now

* Cleanup, making linter happy

* Format javascript on push

* Only format js in master

* Tweak latency level values

* Remove unused config file examples

* Fix thumbnail generation after messing with the ffmpeg path getter

* Reduce how often we report high hardware utilization warnings

* Bundle the 0.0.6 branch version of the admin

* Return validated ffmpeg path in admin server config

* Change the logo to be stored in the data directory instead of webroot

* Bump postcss from 8.2.4 to 8.2.5 in /build/javascript (#702)

Bumps [postcss](https://github.com/postcss/postcss) from 8.2.4 to 8.2.5.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.2.4...8.2.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Default config file no longer used

* don't show stream title when offline

addresses https://github.com/owncast/owncast/issues/677

* Remove auto-clearing stream title. #677

* webroot -> data when using logo as thumbnail

* Do not list websocket/access token create/delete as integration APIs

* Commit updated API documentation

* Bundle updated admin

* Remove pointing to the 0.0.6 admin branch

* Linter cleanup

* Linter cleanup

* Add donations and follow links to show up under social handles

* Prettified Code!

* More linter cleanup

* Update admin bundle

* Remove use of platforms.js and return icons with social handles. Closes #732

* Update admin bundle

* Support custom config path for use in migration

* Remove unused platform-logos.gif

* Reduce log level of message

* Remove unused logo files in static dir

* Handle dev vs. release build info

* Restore logo.png for initial thumbnail

* Cleanup some files from the build process that are not needed

* Fix incorrect build-time injection var

* Fix missing file getting copied to the build

* Remove console directory message.

* Update admin bundle

* Fix comment

* Report storage setup error

* add some value set error checking

* Use validated dynamic ffmpeg path for animated gif preview

* Make chat message links be white so they don't hide in the bg. Closes #599

* Restore conditional that was accidentally removed

Co-authored-by: Aaron Ogle <geekgonecrazy@users.noreply.github.com>
Co-authored-by: Owncast <owncast@owncast.online>
Co-authored-by: Ginger Wong <omqmail@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nebunez <uoj2y7wak869@opayq.net>
Co-authored-by: gabek <gabek@users.noreply.github.com>
2021-02-18 23:05:52 -08:00
Thilo Billerbeck
0225e341d1
Add ability to pause and play the stream by pressing the spacebar (#658)
* make spacebar control the play state

* improved keyboard handling

* only allow pause and play when stream is online

* some formatting fixes

* remove event listener on destruction
2021-01-26 23:03:25 -08:00
Thilo Billerbeck
f9e3dc2b45
only react to screen resize when device has no touchscreen (#650) 2021-01-23 16:02:29 -08:00
gingervitis
51f344f8e0
misc issue fixes (#496)
* rename social-icons to prevent adblockers from blocking scripts, fix for #491

* hide viewer count when stream is off, fixes #428

* show a notice in document title of num messages if window is blurred, #426

* display indicator when stream has gone onlnie or offline when window is blurred
2020-12-22 17:43:35 -08:00
Ginger Wong
8774551838 wrap tags so they extend off the view, fixes #500 2020-12-22 10:07:11 -08:00
Ginger Wong
d4f5162505 prevent header from hiding when keyboard is active on mobile for username change 2020-12-12 11:08:23 -08:00
Ginger Wong
5e41dab92c revert chat test 2020-12-03 22:51:11 -08:00
Ginger Wong
0bf8cf1dba make emoji search text more legible; break long user name change messages 2020-12-03 22:28:16 -08:00
gingervitis
01f16aeddf
Simplify Logo requirement from users. (#373)
* Simplify Logo requirement from users.
- Only require 1 logo file, instead of a `small` and `large` one.  Just require `logo`.
- Update frontend sso that primary header logo will ALWAYS be owncast logo.
- User's logo will remain in "user content" area.

* Commit updated API documentation

Co-authored-by: Owncast <owncast@owncast.online>
2020-11-17 15:12:54 -08:00
bgildson
bcf7332675 changed duration format to also represent days 2020-10-29 08:46:54 -03:00
Gabe Kangas
2839a5e236
Custom thumbnail poster component (#281)
* Custom thumbnail poster component

* add opacity transition to thumbnail img

* fix some videoonly styles

* move video styles to video.css

* make component out of image layers; put inline styles into css

* cleanup

* update videoonly ; don't render poster if video player, remove dom modification in player

* revert interval

Co-authored-by: Ginger Wong <omqmail@gmail.com>
2020-10-22 14:14:44 -07:00
Gabe Kangas
30c9bbe966 Size logo properly with the user image 2020-10-16 13:53:43 -07:00
gingervitis
57f2e4b567
Merge pull request #241 from jeyemwey/jv-119-remove-avatars
Remove Chat Avatars
Thanks for the cleanup! Looks great.
2020-10-14 11:16:58 -07:00
Gabe Kangas
64a85e68aa
Update extra page content API (#240)
* Mark change stream key api as pre-release

* Add API for changing extra page content. Renanme usercontent -> pagecontent. closes #236
2020-10-14 09:38:48 -07:00
Jannik Volkland
146e6d342c Remove avatars from frontend 2020-10-14 13:33:55 +02:00
Gabe Kangas
d7c3991b59
Render and sanitize chat messages server-side. (#237)
* Render and sanitize chat messages server-side. Closes #235

* Render content.md server-side and return it in the client config

* Remove showdown from web project

* Update api spec

* Move example user content file
2020-10-13 16:45:52 -07:00
Gabe Kangas
ce14e0d0a7 Remove additional viewer counts from status bar. Closes #155 2020-10-08 16:39:11 -07:00
Jannik Volkland
d4b800c9bb Merge branch 'fix-issue-202' 2020-10-07 08:46:09 +02:00
Jannik Volkland
813884ef21 fix: Use Kebab-Case, and resolve Merge Conflict 2020-10-07 08:42:46 +02:00
Gabe Kangas
5d530ca5a6 Missing showdown module import in app 2020-10-05 00:05:35 -07:00
Gabe Kangas
27a4c8c895
Move all remote dependencies to be local (#220)
* Experiment with javascript bundling

* Experiment with snowpack. Making progress

* Success!  Uses local js modules and assets and no cdns

* Missing local css
2020-10-04 18:43:31 -07:00
Jannik
4c02b6eea1 Move socialIconsList to its own component 2020-10-04 20:48:44 +02:00
Jannik
d6dadcabf8 Fix: Optional socialHandles and tags 2020-10-02 21:28:35 +02:00
Ginger Wong
01f956d043 detect portrait mode on mobile so it doesnt go into two col layout when keyboard is up, (#178) 2020-09-22 17:09:55 -07:00
gingervitis
661eedc03a
chat fixes v3 or 5 or 123 (#168)
* only consider short-heights when not smallscreen; hide status bar when small screen, but leave shadow;

* fix max char counting bugs with paste, yet be still be able to use modifier keys even when max chars reached

* rmeove 'chat' button; move into textarea

* use image for emoji picker for sizing consitency

* cleanup unused things

* - totally unecessary emoji picker style improvements
- totally necessary doctype added to emoji picker so it shows up more stable-y on mobile views

* more stable layout positioning for chat panel without hacky margins, so that the bottom of the message list will always be on top of the form input, and not behind it at any point.

* hide header on touch screens when screns are small and screen height is short (possibly when keyboard is up), so that there's more visibliity to see messages. this only works on chrome, not ios safari right now, due to the position: fixed of things.

* move char counting to keyup instead

* address message text horiz overflow (#157)

* dont jumpToBottom if user has scrolled about 200px from the bottom (#101)

* scroll to bottom on resize too

* cleanup

* revert test bool

* typo

* re-readjust short-wide case again

* - add focus to input field after emoji is selected, put cursor at end
- instead of smooth scrolling to bottom, just jump there.
2020-09-21 20:11:09 -07:00
Gabe Kangas
257847fdf8 Fix chat visibility toggle 2020-09-20 19:27:26 -07:00
Ginger Wong
29ebe80ad0 remove test cruft so chat panel visibility is remembered 2020-09-20 15:49:52 -07:00
Gabe Kangas
6a3f634ef5
Misc web updates (#147)
* Try and clarify max viewer count string

* Shrink title font size on small screens to fit username

* Hide stream info on small screens to buy some space

* Hide emoji button on small screens until we can fix it. For #140

* Make jumping to bottom be a part of the render pass to fix race condition. For #140

* Remove About in info view. We can add it back. Just playing with that since it was missing a space anyway

* address some own mr comments

Co-authored-by: Ginger Wong <omqmail@gmail.com>
2020-09-13 22:02:04 -07:00
Gabe Kangas
0dcd92e9cd Fix chat not coming back after server comes back. Closes #136 2020-09-12 18:46:30 -07:00
Gabe Kangas
7b11c65187 Fix missing live duration string. Closes #144 2020-09-10 20:57:51 -07:00
Gabe Kangas
2019d4a647 Remove error logged when extra info does not exist 2020-09-01 19:15:20 -07:00
Gabe Kangas
2c1caa1238 Show chat by default. Closes #137 2020-09-01 19:10:46 -07:00
Ginger Wong
09f6b62398 - show offline state when stream ends and video is not playing (#130)
- style fixes
2020-08-29 17:35:19 -07:00
Ginger Wong
0e6edf9ac0 fix max viewers display 2020-08-29 00:42:04 -07:00
Ginger Wong
b549b21257 add utils to help cleanup whitespaces from contenteditable output; removed forced chat enabling 2020-08-26 11:56:01 -07:00
Ginger Wong
6457015406 cleanup 2020-08-24 12:34:36 -07:00
Ginger Wong
2a02b75e42 fix responsive styles 2020-08-24 03:30:42 -07:00
Ginger Wong
22e16b67d7 start a video-only page; fix some styles 2020-08-23 21:23:16 -07:00
Ginger Wong
63d7671fed progress wip. separated out chat input component and its respective methods. 2020-08-14 04:19:19 -07:00
Gabe Kangas
68ff9ff270
Merge of emoji + autolink + embed + etc (#108)
* Add an emoji picker to chat

* Update to the custom emoji picker and add first pass at using custom emoji in text box

* Add custom emoji endpoint and use it in the app

* Position the emoji picker

* Handle events from the text input

* pair down the number of party parrots

* Size emoji in chat and input

* Add new custom emoji

* Add OMQ stickers as custom emoji

* Show custom category for emoji picker by default

* update omq emojis

* Document basic supported markdown syntax. Closes #95

* Websocket refactor: Pull it out of the UI and support callbacks (#104)

* Websocket refactor: Pull it out of the UI and support listeners

* Changes required for Safari to be happy with modules

* Move to explicit ad-hoc callback registration

* Add an emoji picker to chat

* Update to the custom emoji picker and add first pass at using custom emoji in text box

* Handle events from the text input

* Rebuild autolinking + embed handling for #93

* Re-enable disabling chat

* Document basic supported markdown syntax. Closes #95

* Document basic supported markdown syntax. Closes #95

* Add an emoji picker to chat

* Merge emoji and embeds.

* Merge emoji + embed branches. Rework autolink +embeds. WIP for username
highlighting for #100

* More updates to chat text formatting/embedding/linking

* Fix username autocomplete to work with div instead of form elements

* Post-rebase fixes + tweaks

* Disable text input by setting contentEditable = false

* Remove test that hardcodes pointing to public test server

* Fix re-enable chat with the contentEditable input div

* Style and fix the fake placeholder text in the input div

* Missing file.  Were did it go?

* Set a height for instagram embeds

* Cleanup

Co-authored-by: Ginger Wong <omqmail@gmail.com>
2020-08-12 21:56:41 -07:00
Gabe Kangas
df04af0f38
Websocket refactor: Pull it out of the UI and support callbacks (#104)
* Websocket refactor: Pull it out of the UI and support listeners

* Changes required for Safari to be happy with modules

* Move to explicit ad-hoc callback registration
2020-08-06 10:55:33 -07:00
Gabe Kangas
d9509f5606
Chat updates (#92)
* Send PONG responses to PINGs

* Split out client IDs for viewer counts vs. websocket IDs

* WIP username change event

* Display username changes

* Revert commented out code

* Add support for building from the current branch

* Fix PONG

* Make username changes have a unique ID

* Add a version param to js to cachebust
2020-07-28 21:30:03 -07:00
Gabe Kangas
cb04826173 Fix the flickering status text. Closes #88 2020-07-27 23:04:35 -07:00
Gabe Kangas
5ce9a4928c Fix timeout buffer after going offline. Closes #84 2020-07-22 23:54:36 -07:00
Gabe Kangas
2ae227360a Hide viewer stats when in offline mode. Closes #66 2020-07-19 17:29:16 -07:00
Ginger Wong
b66a80f11e add comments; use promise for fetching chat history for consistency 2020-07-19 16:11:29 -07:00
Ginger Wong
3f594abac8 update offline flow an stream status timer flow 2020-07-19 16:06:55 -07:00
Ginger Wong
a3613612eb Merge branch 'master' into gek/current-stream-duration 2020-07-19 15:17:03 -07:00