mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-19 17:48:26 +00:00
Syncing codebase /w Production's v4 Release
Some of the notable changes revolve around fixing issues with the Group Chat, refining the UX/UI, adding stream iso-recording, enabling camera zooming on Android, and allowing users to select multiple audio sources, disable audio, or disable the video.
Change list
Audio can be disabled and/or mixed with more than one audio input device
video can be disabled, allowing for audio-only publishing
avatar silhouette takes the place of a stream without a video
Some Android cameras can now zoom-in with a swipe up action.
The Create Invite Link option lets you select some advanced parameters, like bitrate and stereo, in a very easy way.
reduced the size of the preview window ; for camera and screens hare
made all OBS/invite links easier to copy, dragged into OBS v25, and seleced.
Most OBS/invite links can be right clicked to access custom menu
copy to clipboard links that are clicked
Viewers in Group Chat can magnify and increase the bitrate of one video at a time.
Pseudo-Fullscreen works in group chat now
Room names can be accessed via https://obs.ninja/myroomnamehere
You can record videos via the group control room; selectable bitrates. webm Format
filename of recorded files is the timestamp of the ended recording time; milliseconds
new iOS error messages
firefox shows camera labels now
Add a "secure" mode that increases verbosity and prevents a stream being accessed more than once
electron app interface works with the production code
It is harder to hit 'ready to go', before the camera is actually ready
expanded help information in a less annoying way
if you deny Screen-share permissions, it will let you try again without a page refresh
Custom generated invite links, if dragged into OBS v25, will be named according to the given label
Got rid of the cartoon cat; too much visual complexity
Numerous UX changes to the Control Room page
Codec remains set at VP8, but progress in OBS has made on its issues.
Added a new TURN video relay server to US West (LA). I've also increased the capacity of the existing US-Central server. 16x more capacity over all.
Video Control bar hidden in more cases; or delayed in showing
Increased readability of some fonts
Improved mobile layout and accessibility
Mute/Unmute button has been made more secure
No need to toggle mute in group chat to get the audio to work
pressing enter on input fields auto submits; no clicking needed
Dynamic bitrates improved
Group automixer improved a bit
no-cursor option works with Electron app now
cleaned up the Error page in OBS if it fails to load a video; no more 'leaked' streamIDs
renamed streamid, permaid, and roomid. They are now room, push, and view. backwards compatible tho still.
Invite to Room page is more mobile friendly and clean; less noise
iPad Pro treated like an iOS device; limits resolution to 720p
rounded corners of the big buttons because "looks more modern". ;/
Updated Licence and added a CLA
Added translations / languages via a template system
electron-app improvements, such as the ability to select OUTPUT AUDIO Destination
Fixed a few bugs reported over the last few days, since production release
and many others that I likely forgot about
This commit is contained in:
parent
4e26e30795
commit
43ee28b9d4
661
AGPLv3.md
Normal file
661
AGPLv3.md
Normal file
@ -0,0 +1,661 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
15
CONTRIBUTING.md
Normal file
15
CONTRIBUTING.md
Normal file
@ -0,0 +1,15 @@
|
||||
OBS.Ninja Contributor License Agreement (CLA)
|
||||
|
||||
To ensure the long-term viability of the open-source OBS.Ninja project, and for the protection of its creator and its users, we request that contributors to the project first agree to some basic terms. The terms when accepted applies to all of your past, present and future contributions.
|
||||
|
||||
Contribution Policy
|
||||
|
||||
Contributions that only take 20 lines of code or less will have its Intellectual Property implicitly transferred to Stephen Seguin, the creator of OBS.Ninja. You agree with this rule by pushing your code or works to github, by sending the code or works to one of OBS.Ninja's core developers, or by distributing your code or works in any other way.
|
||||
|
||||
For all code contributions that take more than 20 lines, you are invited to digitally sign the CLA with the provided CLA Assissant service. You may also print, sign, scan, and then email the CLA to steve@seguin.email.
|
||||
|
||||
It is not required that you sign the CLA for every contribution. Once you execute a CLA, it is valid until the CLA agreement is meaningfully changed and requires updating.
|
||||
|
||||
Important notice: if you are contributing on behalf of your company, an officer of your company (usually a VP or higher title) must sign the CLA on behalf of the company, indicating his or her title. The company can choose to list the specific individuals authorized to make contributions on the "Full Name" line, or may cover all employees with a blanket CLA by not limiting contributors to an authorized list. If necessary, the company may provide a list of authorized contributors in an attachment. The executive signing the CLA must be the first name on such an attached list, and this executive must sign the attachment as well. It may well be the case that your company already has signed a company-wide CLA with Stephen Seguin. Please check this first.
|
||||
|
||||
You can stop your participation in a project at any time, but you cannot rescind your assignments or grants with respect to prior contributions. This protects the whole community, allowing Stephen Seguin and downstream users of the code base to rely on it.
|
||||
16
LICENCE.md
16
LICENCE.md
@ -1 +1,15 @@
|
||||
Currently the software is free to use and modify however you wish, including for commericial applications. Please link back to this repository if redistributing any portion of OBS.Ninja as code or as a service. I (steve) reserve the right to release future versions that may not be free or may have a different licence agreement. I cannot be held responsible for what you do with my software, and if problems occur with the software or any provided service, I will not be responsible for that either. Usage of OBS.Ninja, as a service or as code, is to be used in Good Faith and may not be used to intentially harm OBS.Ninja or its creator.
|
||||
The OBS.Ninja source repository is governed by the GNU AFFERO GENERAL PUBLIC LICENSE. (AGPL-3.0)
|
||||
That AGPL-3.0 licence can be found here: https://github.com/steveseguin/obsninja/AGPLv3.md
|
||||
|
||||
In essence, OBS.Ninja is open-source and free to use, both for commericial and non-commericial use.
|
||||
Modifications of AGPL-3.0 licenced code must be made publicly accessible. Please refer to that licence.
|
||||
|
||||
Some individual source files may contain different licencing term and perhaps different copyright holders.
|
||||
Such licencing and copyright information will be contained in the file's header and be limited to those files.
|
||||
If no such header is present in a file, the default AGPL-3.0 licence applies.
|
||||
Alternative licencing options can be made available on request, if AGPL-3.0 is not appropriate.
|
||||
|
||||
Unless stated otherwise, all code is copyright 2020 Stephen Seguin. All rights reserved.
|
||||
Contributors to the OBS.Ninja project must first agree to the Contributor License Agreement (CLA).
|
||||
|
||||
Thank you for your understanding.
|
||||
@ -1,7 +1,7 @@
|
||||

|
||||

|
||||
|
||||
## What is OBS NINJA
|
||||
OBS.Ninja uses peer-to-peer technology to bring remote cameras into OBS. In most cases, all video data is transferred directly from peer to peer, without needing to go through any remote server. This results in high-quality video with super low latency. In a small number of cases, video data may go through an encrypted TURN server, which is used to facilitate peer connections when otherwise not possible.
|
||||
OBS.Ninja uses peer-to-peer technology to bring remote cameras into OBS. In most cases, all video data is transferred directly from peer to peer, without needing to go through any video server. This results in high-quality video with super low latency. In a small number of cases, video data may go through an encrypted TURN server, which is used to facilitate peer connections when otherwise not possible.
|
||||
|
||||
OBS Ninja is not affiliated with OBS, but OBS Ninja is dependent on OBS to function. OBS.Ninja is designed to allow content creators to produce real-time live shows with OBS Studio and to allow smartphones to be used as webcams on a Windows PC.
|
||||
|
||||
@ -55,5 +55,6 @@ Additional security features are being added weekly on request. Please ask about
|
||||
## Feedback
|
||||
Idea, feed back, bugs, etc -- all welcomed. I'm dumping many of my ideas as issues into Github. Feedback is typcially most welcomed via Email or Discord.
|
||||
|
||||
## License
|
||||
Currently the software is free to use and modify however you wish, including for commericial applications. Please link back here if redistributing any portion of OBS.Ninja as code or as a service. I (steve) reserve the right to release future versions that may not be free or may have a different licence agreement. I cannot be held responsible for what you do with my software, and if problems occur with the software or any provided service, I will not be responsible for that either. Usage of OBS.Ninja, as a service or as code, is to be used in Good Faith and may not be used to intentially harm OBS.Ninja or its creator.
|
||||
## Licence
|
||||
OBS.Ninja is available as open-source; please see the LICENCE.md file for details.
|
||||
|
||||
|
||||
115
animations.js
Normal file
115
animations.js
Normal file
@ -0,0 +1,115 @@
|
||||
|
||||
/* We need to create dynamic keyframes to show the animation from full-screen to normal. So we create a stylesheet in which we can insert CSS keyframe rules */
|
||||
$("body").append('<style id="lightbox-animations" type="text/css"></style>');
|
||||
|
||||
/* Click on the container */
|
||||
$(".column").on('click', function() {
|
||||
/* The position of the container will be set to fixed, so set the top & left properties of the container */
|
||||
|
||||
var bounding_box = $(this).get(0).getBoundingClientRect();
|
||||
$(this).css({ top: bounding_box.top + 'px', left: bounding_box.left -20+ 'px' });
|
||||
|
||||
/* Set container to fixed position. Add animation */
|
||||
$(this).addClass('in-animation');
|
||||
|
||||
/* An empty container has to be added in place of the lightbox container so that the elements below don't come up
|
||||
Dimensions of this empty container is the same as the original container */
|
||||
$("#empty-container").remove();
|
||||
$('<div id="empty-container" class="column"></div>').insertAfter(this);
|
||||
|
||||
/* To animate the container from full-screen to normal, we need dynamic keyframes */
|
||||
var styles = '';
|
||||
styles = '@keyframes outlightbox {';
|
||||
styles += '0% {';
|
||||
styles += 'height: 100%;';
|
||||
styles += 'width: 100%;';
|
||||
styles += 'top: 0px;';
|
||||
styles += 'left: 0px;';
|
||||
styles += '}';
|
||||
styles += '50% {';
|
||||
styles += 'height: 220px;';
|
||||
styles += 'top: ' + bounding_box.y + 'px;';
|
||||
styles += '}';
|
||||
styles += '100% {';
|
||||
styles += 'height: 220px;';
|
||||
styles += 'width: '+bounding_box.width+'px;';
|
||||
styles += 'top: ' + bounding_box.y + 'px;';
|
||||
styles += 'left: ' + bounding_box.x + 'px;';
|
||||
styles += '}';
|
||||
styles += '}';
|
||||
|
||||
/* Add keyframe to CSS */
|
||||
$("#lightbox-animations").get(0).sheet.insertRule(styles, 0);
|
||||
|
||||
/* Hide the window scrollbar */
|
||||
$("body").css('overflow', 'hidden');
|
||||
});
|
||||
|
||||
/* Click on close button when full-screen */
|
||||
$(".close").on('click', function(e) {
|
||||
$(this).hide();
|
||||
$(".container-inner").hide();
|
||||
/* Window scrollbar normal */
|
||||
$("body").css('overflow', 'auto');
|
||||
|
||||
var bounding_box = $(this).parent().get(0).getBoundingClientRect();
|
||||
$(this).parent().css({ top: bounding_box.top + 'px', left: bounding_box.left + 'px' });
|
||||
|
||||
/* Show animation */
|
||||
$(this).parent().addClass('out-animation');
|
||||
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
/* On animationend : from normal to full screen & full screen to normal */
|
||||
$(".column").on('animationend', function(e) {
|
||||
/* On animation end from normal to full-screen */
|
||||
if(e.originalEvent.animationName == 'inlightbox') {
|
||||
$(this).children(".close").show();
|
||||
$(this).children(".container-inner").show();
|
||||
}
|
||||
/* On animation end from full-screen to normal */
|
||||
else if(e.originalEvent.animationName == 'outlightbox') {
|
||||
/* Remove fixed positioning, remove animation rules */
|
||||
$(this).removeClass('in-animation').removeClass('out-animation').removeClass('columnfade');
|
||||
|
||||
/* Remove the empty container that was earlier added */
|
||||
$("#empty-container").remove();
|
||||
|
||||
/* Delete the dynamic keyframe rule that was earlier created */
|
||||
$("#lightbox-animations").get(0).sheet.deleteRule(0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// multiselect dropdowns
|
||||
$('.multiselect-trigger').on('mousedown touchend focusin focusout', function(e) {
|
||||
var state = $(this).data('state') || 0;
|
||||
if( state == 0 ) {
|
||||
// open the dropdown
|
||||
$(this).data('state', '1').addClass('open').removeClass('closed');
|
||||
$(this).find('.fa').removeClass('fa-chevron-down').addClass('fa-chevron-up');
|
||||
$(this).parent().find('.multiselect-contents').show();
|
||||
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').parent().show();;
|
||||
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').show();;
|
||||
} else {
|
||||
// close the dropdown
|
||||
$(this).data('state', '0').addClass('closed').removeClass('open');
|
||||
$(this).find('.fa').removeClass('fa-chevron-up').addClass('fa-chevron-down');
|
||||
//$(this).parent().find('.multiselect-contents').hide();
|
||||
//$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').hide();
|
||||
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').not(":checked").parent().hide();;
|
||||
$(this).parent().find('.multiselect-contents').find('input[type="checkbox"]').hide();;
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
|
||||
// when no preference is checked, uncheck the others
|
||||
$('#multiselect1').on('change', function(e) {
|
||||
if( $(this).is(':checked') ) {
|
||||
$(this).parent().parent().find('input[type="checkbox"]').not('#multiselect1').prop('checked', false);
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
299
electron.html
Normal file
299
electron.html
Normal file
@ -0,0 +1,299 @@
|
||||
<html>
|
||||
<head><style>
|
||||
html {
|
||||
border:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
video {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=), none;
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
body {
|
||||
padding: 0 0px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #141926;
|
||||
background-color: -webkit-linear-gradient(to top, #181925, #141826, #0F2027); /* Chrome 10-25, Safari 5.1-6 */
|
||||
background-color: linear-gradient(to top, #181825, #141926, #0F2027); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||
|
||||
font-size: 2em;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
border:0;
|
||||
margin:0;
|
||||
|
||||
}
|
||||
button{
|
||||
padding:10px;
|
||||
font-size: 20px;
|
||||
margin: auto auto;
|
||||
}
|
||||
#header{
|
||||
height:80px;
|
||||
width:100%;
|
||||
background-color: #101520;
|
||||
}
|
||||
.inputfield{
|
||||
font-size: 20px;
|
||||
align-self:center;
|
||||
height:30px;
|
||||
width:780px;
|
||||
margin: auto auto;
|
||||
padding:20px
|
||||
}
|
||||
|
||||
.formcss{
|
||||
font-size: 20px;
|
||||
align-self:center;
|
||||
margin: auto auto;
|
||||
}
|
||||
label {
|
||||
font: white;
|
||||
font-size: 1em;
|
||||
color: white;
|
||||
}
|
||||
input[type='checkbox'] {
|
||||
-webkit-appearance:none;
|
||||
width:30px;
|
||||
height:30px;
|
||||
background:white;
|
||||
border-radius:5px;
|
||||
border:2px solid #555;
|
||||
cursor: pointer;
|
||||
}
|
||||
input[type='checkbox']:checked {
|
||||
background: #1A1;
|
||||
}
|
||||
</style></head>
|
||||
<body >
|
||||
|
||||
<div id="header" style="-webkit-app-region: drag;color:white;font-size:2em">OBS.Ninja</div>
|
||||
<div class="formcss" >
|
||||
<input type="checkbox" class="check" id="prefervp9" name="prefervp9" value="false" onclick="modURL(this);">
|
||||
<label for="prefervp9">Force VP9 Codec</label>
|
||||
<input type="checkbox" class="check" id="showcursor" name="showcursor" value="false" onclick="modURL(this);">
|
||||
<label for="showcursor">Show Mouse Cursor</label>
|
||||
<input type="checkbox" class="check" id="highbitrate" name="highbitrate" value="false" onclick="modURL(this);">
|
||||
<label for="highbitrate">High Video Bitrate</label>
|
||||
<input type="checkbox" class="check" id="stereo" name="stereo" value="false" onclick="modURL(this);">
|
||||
<label for="stereo">Pro Audio Mode</label><br><br><br>
|
||||
<div class="formcss">
|
||||
<input type="text" id="changeText" class="inputfield" value="http://obs.ninja/?view=" onchange="modURL" onkeyup="enterPressed(event, gohere);" />
|
||||
<button onclick="gohere();" id="gobutton">GO</button>
|
||||
<br><br>
|
||||
<label for="audioOutput">Audio output destination: </label><select id="audioOutput" style="max-width:400px"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
/*
|
||||
* Copyright (c) 2020 Steve Seguin. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by the APGLv3 open-source license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. Alternative licencing options can be made available on request.
|
||||
*
|
||||
*/
|
||||
|
||||
var audioOutputSelect = document.querySelector('select#audioOutput');
|
||||
audioOutputSelect.disabled = !('sinkId' in HTMLMediaElement.prototype);
|
||||
audioOutputSelect.onclick = getPermssions;
|
||||
audioOutputSelect.onchange = updateOutputTarget;
|
||||
var listed = false;
|
||||
|
||||
function updateOutputTarget(e){
|
||||
console.log("change audio: "+audioOutputSelect.value);
|
||||
var url = document.getElementById('changeText').value;
|
||||
url=updateURLParameter(url, "sink", audioOutputSelect.value);
|
||||
document.getElementById('changeText').value = url;
|
||||
}
|
||||
|
||||
function getPermssions(e){
|
||||
if (listed==true){
|
||||
return;
|
||||
}
|
||||
e.currentTarget.blur();
|
||||
navigator.mediaDevices.getUserMedia({audio: true,video: false}).then(function(stream){
|
||||
navigator.mediaDevices.enumerateDevices().then(gotDevices).catch(console.error); // list all devices
|
||||
stream.getTracks().forEach(track => {
|
||||
track.stop();
|
||||
});
|
||||
listed=true;
|
||||
audioOutputSelect.focus();
|
||||
|
||||
}).catch(function(){alert("Failed to list available output devices\n\nPlease ensure you allowed the microphone permissions.");});
|
||||
}
|
||||
|
||||
function gotDevices(deviceInfos) {
|
||||
for (let i = 0; i !== deviceInfos.length; ++i) {
|
||||
const deviceInfo = deviceInfos[i];
|
||||
const option = document.createElement('option');
|
||||
option.value = deviceInfo.deviceId;
|
||||
if (deviceInfo.kind === 'audiooutput'){
|
||||
option.text = deviceInfo.label || `speaker ${audioOutputSelect.length + 1}`;
|
||||
audioOutputSelect.appendChild(option);
|
||||
} else {
|
||||
console.log('Some other kind of source/device: ', deviceInfo);
|
||||
}
|
||||
}
|
||||
listed=true;
|
||||
}
|
||||
|
||||
function enterPressed(event, callback){
|
||||
if (event.keyCode === 13){ // Number 13 is the "Enter" key on the keyboard
|
||||
event.preventDefault(); // Cancel the default action, if needed
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
(function (w) {
|
||||
w.URLSearchParams = w.URLSearchParams || function (searchString) {
|
||||
var self = this;
|
||||
self.searchString = searchString;
|
||||
self.get = function (name) {
|
||||
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(self.searchString);
|
||||
if (results == null) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return decodeURI(results[1]) || 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
})(window)
|
||||
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var isMobile = false;
|
||||
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ // does not detect iPad Pros.
|
||||
isMobile=true; // if iOS, default to H264? meh. let's not.
|
||||
}
|
||||
|
||||
function updateURLParameter(url, param, paramVal){
|
||||
var TheAnchor = null;
|
||||
var newAdditionalURL = "";
|
||||
var tempArray = url.split("?");
|
||||
var baseURL = tempArray[0];
|
||||
var additionalURL = tempArray[1];
|
||||
var temp = "";
|
||||
|
||||
if (additionalURL){
|
||||
var tmpAnchor = additionalURL.split("#");
|
||||
var TheParams = tmpAnchor[0];
|
||||
TheAnchor = tmpAnchor[1];
|
||||
if (TheAnchor){additionalURL = TheParams;}
|
||||
|
||||
tempArray = additionalURL.split("&");
|
||||
|
||||
for (var i=0; i<tempArray.length; i++){
|
||||
if(tempArray[i].split('=')[0] != param){
|
||||
newAdditionalURL += temp + tempArray[i];
|
||||
temp = "&";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var tmpAnchor = baseURL.split("#");
|
||||
var TheParams = tmpAnchor[0];
|
||||
TheAnchor = tmpAnchor[1];
|
||||
|
||||
if(TheParams){baseURL = TheParams;}
|
||||
}
|
||||
|
||||
if (paramVal==false){
|
||||
temp="";
|
||||
if(TheAnchor){temp += "#" + TheAnchor;}
|
||||
var rows_txt = temp
|
||||
} else {
|
||||
if(TheAnchor){paramVal += "#" + TheAnchor;}
|
||||
var rows_txt = temp + "" + param + "=" + paramVal;
|
||||
}
|
||||
return baseURL + "?" + newAdditionalURL + rows_txt;
|
||||
}
|
||||
|
||||
if (urlParams.has('name')){
|
||||
var name = urlParams.get('name');
|
||||
if (name!="OBSNinja"){
|
||||
document.getElementById('changeText').value = "https://obs.ninja/?view="+name;
|
||||
}
|
||||
}
|
||||
|
||||
function modURL(ele=false){
|
||||
var url = document.getElementById('changeText').value;
|
||||
console.log(url);
|
||||
if ((url.split("view").length>0) || (url.split("room").length>0)){
|
||||
if (!document.getElementById("showcursor").checked){
|
||||
url=updateURLParameter(url, "nocursor", "1");
|
||||
} else {
|
||||
url=updateURLParameter(url, "nocursor", false);
|
||||
}
|
||||
|
||||
if (ele!=false){
|
||||
if (ele.id =="prefervp9"){
|
||||
if (document.getElementById("prefervp9").checked){
|
||||
url=updateURLParameter(url, "codec", "vp9");
|
||||
} else {
|
||||
url=updateURLParameter(url, "codec", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (ele.id =="highbitrate"){
|
||||
if (document.getElementById("highbitrate").checked){
|
||||
url=updateURLParameter(url, "bitrate", "10000");
|
||||
} else {
|
||||
url=updateURLParameter(url, "bitrate", false);
|
||||
}
|
||||
}
|
||||
|
||||
if (ele.id =="stereo"){
|
||||
if (document.getElementById("stereo").checked){
|
||||
url=updateURLParameter(url, "stereo", "1");
|
||||
alert('Audio bitrate increased to 256kbps.\n\nPlease note: the Video Publisher must also have the stereo flag enabled for stereo to work.');
|
||||
} else {
|
||||
url=updateURLParameter(url, "stereo", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
document.getElementById('changeText').value = url;
|
||||
console.log(url);
|
||||
return url;
|
||||
}
|
||||
function gohere(){
|
||||
var url = modURL(true);
|
||||
window.location = url;
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
images/favicon-16x16.png
Normal file
BIN
images/favicon-16x16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 757 B |
BIN
images/favicon-32x32.png
Normal file
BIN
images/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
BIN
images/favicon.ico
Normal file
BIN
images/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
images/obsNinja_logo_full.png
Normal file
BIN
images/obsNinja_logo_full.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
images/share.jpg
Normal file
BIN
images/share.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 101 KiB |
200
index.html
200
index.html
@ -2,134 +2,175 @@
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||||
<meta name="copyright" content="© 2020 Stephen Seguin" />
|
||||
<meta content="utf-8" http-equiv="encoding">
|
||||
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="icon" href="favicon.ico" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="./images/favicon-16x16.png">
|
||||
<link rel="icon" href="./images/favicon.ico" />
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<link rel="stylesheet" href="font-awesome.min.css">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<script type="text/javascript" src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
||||
<script type="text/javascript" src="qrcode.min.js"></script>
|
||||
<script type="text/javascript" src="./thirdparty/qrcode.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="./main.css" />
|
||||
</head>
|
||||
<body id="main" class="cat">
|
||||
<script language="javascript" type="text/javascript" src="./CodecsHandler.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="./webrtc.js?version=20042214"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript" src="./webrtc.js?version=12"></script>
|
||||
<input id='zoomSlider'type="range" style="display:none">
|
||||
<div id="header">
|
||||
<h2>
|
||||
<a href="./" style="text-decoration:none;color:white;margin: 2px;"><font id="qos">O</font>BS.Ninja</a>
|
||||
<div id="head1" style="display:inline-block;;">
|
||||
<input id="joinroomID" name="joinroomID" size=26 placeholder="Join by Room Name here" />
|
||||
<button style="padding:1px;" onclick="jumptoroom();">GO</button>
|
||||
<font style="font-size:130%;">
|
||||
<a href="./" style="text-decoration:none;color:white;margin: 2px;" id="logoname">
|
||||
<span data-translate="logo-header"><font id="qos">O</font>BS.Ninja </a></span>
|
||||
<div id="head1" style="display:inline-block;position:relative;">
|
||||
<input id="joinroomID" name="joinroomID" size=26 placeholder=" Join by Room Name here"></input>
|
||||
<button style="padding:0px;margin: 0 0" onclick="jumptoroom();"> <span data-translate="GO">GO</span> </button>
|
||||
</div>
|
||||
<div id="head3" style="display:inline-block" class='advanced'>
|
||||
<font style="font-size:60%"> Copy this URL into an OBS "Browser Source" => </font><a id="reshare" data-share="" onclick="var range=document.createRange(); range.selectNodeContents(document.getElementById('reshare')); var selec = window.getSelection(); selec.removeAllRanges();selec.addRange(range);document.execCommand('copy');" onmouseover="this.style.cursor='pointer'"></a> <i class="fa fa-paperclip" aria-hidden="true" onclick="var range=document.createRange(); range.selectNodeContents(document.getElementById('reshare')); var selec = window.getSelection(); selec.removeAllRanges();selec.addRange(range);document.execCommand('copy');" onmouseover="this.style.cursor='pointer'"></i>
|
||||
<font style='font-size:80%;color:#888' id="copythisurl"> <span data-translate="copy-this-url">Copy this URL into an OBS "Browser Source"</span> => </font>
|
||||
<input id="reshare" data-drag="1" onclick="popupMessage(event);copyFunction(this)" class="task" onmousedown="copyFunction(this)" style="font-weight:bold; color:#AFA; cursor:grab; background-color:#202;border: 2px solid black; padding:5px; font-size:115%; min-width:550px;max-width:700px;" />
|
||||
<i class="fa fa-paperclip task" aria-hidden="true" onclick="popupMessage(event);copyFunction(document.getElementById('reshare'));" onmouseover="this.style.cursor='pointer'"></i>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="head4" style="display:inline-block" class='advanced'>
|
||||
<font style="font-size:60%"> You are in the director's view for room: <div id="dirroomid" style="font-size:140%;color:#99C;display:inline-block"></div></font>
|
||||
<font style="font-size:68%;color:white;" > <span data-translate="you-are-in-the-control-center">You are in the room's control center</span>: <div id="dirroomid" style="font-size:140%;color:#99C;display:inline-block"></div></font>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="head2" class="advanced" style="display:inline-block;text-decoration:none;font-size:60%;color:white;">
|
||||
You are joining room: <div id="roomid" style="display:inline-block"></div>
|
||||
<span data-translate="joining-room">You are joining room</span>: <div id="roomid" style="display:inline-block"></div>
|
||||
</div>
|
||||
|
||||
</h2>
|
||||
</font>
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
<div id="mutebutton" onclick="toggleMute()" class='advanced float3' style="cursor:pointer" alt="Toggle the mic">
|
||||
<i style="font-size:48px;color:white" id="mutetoggle" class="fa fa-microphone my-float"></i>
|
||||
</div>
|
||||
<div id="helpbutton" onclick="alert('Email steve@seguin.email if the system breaks or check https://reddit.com/r/obsninja for support.\n\nThere are some advanced options hidden away, such as persistent streamIDs and custom resolutions.\n\nMacOS users should be using OBS v23 due to a bug in v24 and v25')" class='advanced float2' style="cursor:pointer" alt="How to Use This with OBS">
|
||||
<div id="helpbutton" onclick="alert('Email steve@seguin.email if the system breaks or check https://reddit.com/r/obsninja for support.\n\nThere are some advanced options hidden away, such as persistent stream links and custom resolutions.\n\nMacOS users should be using OBS v23 due to a bug in v24 and v25')" class='advanced float2' style="cursor:pointer" alt="How to Use This with OBS">
|
||||
<i style="font-size:48px;color:white;" class="fa fa-question-circle my-float"></i>
|
||||
</div>
|
||||
|
||||
<div id="mainmenu" class="row" style="align:center;">
|
||||
<div id="container-1" class="column columnfade" style="background-color:#ddd;">
|
||||
<h2>Add Group Video Chat to OBS</h2>
|
||||
<h2><span data-translate="add-group-chat">Add Group Chat to OBS</span></h2>
|
||||
<div class="container-inner">
|
||||
<br /><br /><span data-translate="rooms-allow-for">Rooms allow for simplified group-chat and the advanced management of multiple streams at once.</span><br /><br />
|
||||
<p><b><span data-translate="room-name">Room Name</span>: </b><input id="videoname1" placeholder="Enter a Room Name here" onkeyup="enterPressed(event, createRoom);" size=30 maxlength=50 style="font-size:110%;padding:5px;" /></br ><br /></p>
|
||||
<br />
|
||||
<p><b>Room Name:</b><input id="videoname1" placeholder="Enter a ROOM NAME here" size=35 maxlength=50 style="padding:5px;" /><br /><br /></p>
|
||||
|
||||
<button onclick="createRoom()" class="gowebcam"><span data-translate="enter-the-rooms-control">Enter the Room's Control Center</span></button><br />
|
||||
|
||||
<button onclick="toggle(document.getElementById('roomnotes'),this);"><span data-translate="show-tips">Show me some tips..</span></button>
|
||||
<ul style="padding:10px;margin:auto auto;max-width:500px; display:none; text-align:left;" id="roomnotes">
|
||||
<br />
|
||||
<span data-translate="added-notes">
|
||||
<u><i>Added Notes:</i></u>
|
||||
<li>Anyone can enter a room if they know the name, so keep it unique</li>
|
||||
<li>Having more than four (4) people in a room is not advisable due to performance reasons.</li>
|
||||
<br />
|
||||
With a room name entered, enter the room as a director. Links to invite guests will be provided.
|
||||
<br />
|
||||
<button onclick="createRoom()" class="gowebcam">Enter Room as Director</button><br />
|
||||
<li>Having more than four (4) people in a room is not advisable due to performance reasons, but it depends on your hardware.</li>
|
||||
<li>iOS devices are limited to group sizes of no more than two (2) people. This is a hardware limitation.</li>
|
||||
<li>The "Recording" option is new and is considered experimental.</li>
|
||||
<li>You must "Add" a video feed to the "Group Scene" for it to appear there.</li>
|
||||
<li>There is a new "enhanced fullscreen" button added to the Guest's view.</li>
|
||||
</span>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="outer close">
|
||||
<div class="inner">
|
||||
<label class="labelclass">Back</label>
|
||||
<label class="labelclass"><span data-translate="back">Back<span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="container-3" class="column columnfade" onclick="previewWebcam()" style="background-color:#ddd;">
|
||||
<h2 id="add_camera">Add your Camera to OBS</h2>
|
||||
<h2 id="add_camera"><span data-translate="add-your-camera">Add your Camera to OBS</span></h2>
|
||||
<div class="container-inner"><br />
|
||||
<p>Select the audio/video source below and when you're ready just click START SHARING WEBCAM</p><br />
|
||||
<button onclick="publishWebcam()" class="gowebcam">CLICK HERE WHEN READY</button>
|
||||
<p><video id="previewWebcam" oncanplay="updateStats();" muted controls autoplay playsinline style="max-width:640px; max-width:83vw; max-height:35vh"></video></p>
|
||||
<p><span data-translate="select-audio-video">Select the audio/video source below</span></p>
|
||||
<button onclick="publishWebcam()" id="gowebcam" class="gowebcam"><span data-translate="waiting-for-camera">Waiting for Camera to Load</span></button>
|
||||
<p><video id="previewWebcam" oncanplay="updateStats();" muted controls autoplay playsinline style="max-width:640px; max-width:83vw; max-height:30vh"></video>
|
||||
|
||||
</p>
|
||||
<div id="infof"></div>
|
||||
<br/>
|
||||
<p>Video source: <select id="videoSource"></select></p><br/>
|
||||
<p><span data-translate="video-source">Video source</span>: <select id="videoSource"></select></p><br/>
|
||||
|
||||
<form id="webcamquality">
|
||||
<input type="radio" id="fullhd" name="resolution" value="0">
|
||||
<label for="fullhd">Max Resolution </label> |
|
||||
<label for="fullhd"><span data-translate="max-resolution">Max Resolution</span> </label> |
|
||||
<input type="radio" checked id="halfhd" name="resolution" value="1">
|
||||
<label for="halfhd">Balanced </label> |
|
||||
<label for="halfhd"><span data-translate="balanced">Balanced</span> </label> |
|
||||
<input type="radio" id="nothd" name="resolution" value="3">
|
||||
<label for="nothd">Smooth and Cool </label>
|
||||
<label for="nothd"><span data-translate="smooth-cool">Smooth and Cool</span></label>
|
||||
</form>
|
||||
<center><div id="webcamstats" ></div></center><br/>
|
||||
|
||||
<div class="form-group multiselect">
|
||||
<a class="form-control multiselect-trigger" tabindex="3">
|
||||
<div id="audioTitle" class="title"><span data-translate="select-audio-source">Select Audio Sources</span>:<i class="fa fa-chevron-down" aria-hidden="true"></i> </div>
|
||||
</a>
|
||||
<ul id="audioSource" class="multiselect-contents">
|
||||
<li><input type="checkbox" id="multiselect1" name="multiselect1" style="display:none" checked value="ZZZ"> <label for="multiselect1">
|
||||
<span data-translate="no-audio">No Audio</span></label></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>Audio source: <select id="audioSource"></select></p>
|
||||
|
||||
</div>
|
||||
<div class="outer close">
|
||||
<div class="inner">
|
||||
<label class="labelclass">Back</label>
|
||||
<label class="labelclass"><span data-translate="back">Back</span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="container-2" class="column columnfade" style="background-color:#ddd;">
|
||||
<h2 id="add_screen">Remote Screenshare into OBS</h2>
|
||||
<h2 id="add_screen"><span data-translate="remote-screenshare-obs">Remote Screenshare into OBS</span></h2>
|
||||
<div class="container-inner">
|
||||
<p><b>note</b>: Do not forget to click "Share audio" in Chrome.<br />(Firefox does not support audio sharing.)</p>
|
||||
<p><img src="share.jpg" style="max-height:55vh"/></p>
|
||||
<p><span data-translate="note-share-audio">
|
||||
<b>note</b>: Do not forget to click "Share audio" in Chrome.<br />(Firefox does not support audio sharing.)</p>
|
||||
<p><img src="./images/share.jpg" style="max-height:55vh"/></p>
|
||||
</span>
|
||||
<br />
|
||||
<button style="padding:10px;" onclick="publishScreen()" >SELECT SCREEN TO SHARE</button>
|
||||
|
||||
<button style="padding:10px;border:3px solid #CCC; cursor:pointer; background-color:#FFF" onclick="publishScreen()" ><span data-translate="select-screen-to-share">SELECT SCREEN TO SHARE</span></button>
|
||||
<br /><br />
|
||||
<p><span data-translate="audio-sources">Audio Sources</span>:<br />
|
||||
<select id="audioSourceScreenshare" multiple style="height:60px;width:200px; resize: both; overflow: auto; padding:5px" onchange="requestAudioStream();">
|
||||
<option value="screenshare" selected><span data-translate="screen-shrae-audio">Screen Share Audio (default)</span></option>
|
||||
<option value="microphones" ><span data-translate="other-audio-sources">Other Audio Sources</span></option>
|
||||
</select></p>
|
||||
</div>
|
||||
<div class="outer close">
|
||||
<div class="inner">
|
||||
<label class="labelclass">Back</label>
|
||||
<label class="labelclass"><span data-translate="back">Back</span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="container-4" class="column columnfade" style="background-color:#ddd;">
|
||||
<h2>Generate Invite Link</h2>
|
||||
<div class="container-inner">
|
||||
<h2><span data-translate="create-reusable-invite">Create Reusable Invite</span></h2>
|
||||
<div id="gencontent" class="container-inner">
|
||||
<br /><br />
|
||||
Invite Links are reusable, but each invited media source needs a unique invite link.<br /><br />
|
||||
<p><input id="videoname4" placeholder="Give this media source a name (optional)" size=35 maxlength=70 style="padding:5px;" /><br /><br /></p>
|
||||
<span data-translate="here-you-can-pre-generate">Here you can pre-generate a reusable Browser Source link and a related guest invite link.</span><br /><br />
|
||||
<p><input style="padding:5px;font-size:120%;" id="videoname4" onkeyup="enterPressed(event, generateQRPage);" placeholder="Give this media source a name (optional)" size=35 maxlength=70 style="padding:5px;" /></br ><br /></p>
|
||||
<button style="padding:20px;" onclick="generateQRPage()" ><span data-translate="generate-invite-link">GENERATE THE INVITE LINK</span></button><br /><br /><br />
|
||||
<div style="margin:20px;max-width:330px;text-align:left;margin:auto auto;;">
|
||||
<h5 style="padding:0 0 10px 0"><i><span data-translate="advanced-paramaters">Advanced Parameters</span></i></h5>
|
||||
<input type="checkbox" id="invite_bitrate" /><label for="invite_bitrate"> <span data-translate="unlock-video-bitrate">Unlock Video Bitrate (20mbps)</span></label><br />
|
||||
<input type="checkbox" id="invite_vp9" /><label for="invite_vp9"> <span data-translate="force-vp9-video-codec">Force VP9 Video Codec (less artifacting)</span></label><br />
|
||||
<input type="checkbox" id="invite_stereo" /><label for="invite_stereo"> <span data-translate="enable-stereo-and-pro">Enable Stereo and Pro HD Audio</span></label><br />
|
||||
<input type="checkbox" id="invite_secure" /><label for="invite_secure"> <span data-translate="high-security-mode">High Security Mode</span></label><br /><br />
|
||||
<div>See the <a style="text-decoration:none;color:blue;" target="_blank" href="https://docs.obs.ninja/advanced">documentation</a> for more options.</div>
|
||||
</div>
|
||||
|
||||
|
||||
<button style="padding:10px;" onclick="generateQRPage(this)" >GENERATE THE INVITE LINK</button>
|
||||
</div>
|
||||
<div class="outer close">
|
||||
<div class="inner">
|
||||
<label class="labelclass">Back</label>
|
||||
<label class="labelclass"><span data-translate="back">Back</span></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -138,25 +179,27 @@
|
||||
<p><div id="info" class="fullcolumn columnfade">
|
||||
<center>
|
||||
<div class="infoblob" align="left">
|
||||
<span data-translate="info-blob">
|
||||
<h2>What is OBS.Ninja</h2><br />
|
||||
<li>100% <b>free</b>; no downloads; no personal data collection; no sign-in</li>
|
||||
<li>Bring video from your smartphone, laptop, computer, or from your friends directly into your OBS video stream</li>
|
||||
<li>We use cutting edge Peer-to-Peer forwarding technology that offers privacy and ultra-low latency</li>
|
||||
<br />
|
||||
<li>Youtube video <i class="fa fa-youtube-play" aria-hidden="true"></i> <a href="https://www.youtube.com/watch?v=6R_sQKxFAhg">Demoing it here</a> </li>
|
||||
<li>Code is available here: <i class="fa fa-github" aria-hidden="true"></i> <a href="https://github.com/steveseguin/obsninja">https://github.com/steveseguin/obsninja</a> </li>
|
||||
<li>You can also check out <a href="https://steves.app">my other video app</a> designed for sharing video with friends and family</li>
|
||||
<br />
|
||||
<i><font style="color:red">Known issues:</font></i><br />
|
||||
|
||||
<h2>What is OBS.Ninja</h2><br />
|
||||
<li>100% <b>free</b>; no downloads; no personal data collection; no sign-in</li>
|
||||
<li>Bring video from your smartphone, laptop, computer, or from your friends directly into your OBS video stream</li>
|
||||
<li>We use cutting edge Peer-to-Peer forwarding technology that offers privacy and ultra-low latency</li>
|
||||
<br />
|
||||
<li>Youtube video <i class="fa fa-youtube-play" aria-hidden="true"></i> <a href="https://www.youtube.com/watch?v=6R_sQKxFAhg">Demoing it here</a> </li>
|
||||
<li>Code is open-sourced <i class="fa fa-github" aria-hidden="true"></i> <a href="https://github.com/steveseguin/obsninja">https://github.com/steveseguin/obsninja</a> </li>
|
||||
<li>You can also check out <a href="https://stageten.tv">StageTEN.tv</a> for a more feature-rich paid-solution</li>
|
||||
<br />
|
||||
<i><font style="color:red">Known issues:</font></i><br />
|
||||
<li><i class="fa fa-apple" aria-hidden="true"></i> MacOS users need to use OBS v23 or resort to <i>Window Capturing</i> a Chrome Browser with OBS v25</li>
|
||||
<li>Some users will have "pixelation" problems with videos. Please add the URL parameter <b>&codec=vp9</b> to the OBS Links to correct it.</li>
|
||||
<br />
|
||||
|
||||
Site last updated: <a href='https://www.reddit.com/r/OBSNinja/comments/gf5pd3/new_version_released_today_along_with_new/'>May 7th, 2020.</a> The previous version can be found at <a href="https://obs.ninja/v3/">https://obs.ninja/v3/</a> if you are having new issues.
|
||||
|
||||
<li><i class="fa fa-apple" aria-hidden="true"></i> MacOS users need to use OBS v23 or resort to <i>Window Capturing</i> a Chrome Browser with OBS v25</li>
|
||||
<li>Some users will have "pixelation" problems with videos. Please add the URL parameter <b>&codec=vp9</b> to the OBS Links to correct it.</li>
|
||||
<br />
|
||||
Site last updated: <b>April 21th, 2020.</b> The previous version can be found at <a href="https://obs.ninja/old/">https://obs.ninja/old/</a> if you are having new issues
|
||||
|
||||
<br /><br />
|
||||
<i><h3>Check out the <a href="https://www.reddit.com/r/OBSNinja/">sub-reddit</a> <i class="fa fa-reddit-alien" aria-hidden="true"></i> for help and advanced info. I'm also on <a href="https://discordapp.com/invite/T4xpQVv">Discord</a> and you can email me at steve@seguin.email</i></h3>
|
||||
<br /><br />
|
||||
<i><h3>Check out the <a href="https://www.reddit.com/r/OBSNinja/">sub-reddit</a> <i class="fa fa-reddit-alien" aria-hidden="true"></i> for help and advanced info. I'm also on <a href="https://discord.gg/EksyhGA">Discord</a> and you can email me at steve@seguin.email</i></h3>
|
||||
</span>
|
||||
</div>
|
||||
</center>
|
||||
</p></div>
|
||||
@ -171,14 +214,27 @@
|
||||
<div id="gridlayout"></div>
|
||||
<div id="controls_blank" style="display:none">
|
||||
<center><br />
|
||||
<b>Remote Control for OBS</b><br />
|
||||
<button data-value="0" onclick="directEnable(this);">Add to Group Scene</button>
|
||||
<button onclick="directMute(this);">Mute</button>
|
||||
<br />Volume:<input type="range" min="1" max="100" value="100" onclick="directVolume(this);"><br />
|
||||
<b><span data-translate="remote-control-for-obs">Remote Control for OBS</span></b><br />
|
||||
<button data-value="0" style="font-size:112%" onclick="directEnable(this);"><span data-translate="add-to-group">Add to Group Scene</span></button>
|
||||
<button style="font-size:112%" onclick="directMute(this);"><span data-translate="mute">Mute</span></button>
|
||||
<button style="font-size:112%" onclick="var video = document.getElementById('videosource_'+this.parentNode.parentNode.dataset.UUID);video.recorder=recordVideo(event,video,this.parentNode.parentNode.dataset.UUID);"><span data-translate="record">Record</span></button>
|
||||
<br /><span data-translate="volume">Volume</span>:<input type="range" min="1" max="100" value="100" onclick="directVolume(this);"><br />
|
||||
<br /><hr /></center>
|
||||
</div>
|
||||
<script type="text/javascript" src="./main.js"></script>
|
||||
<script type="text/javascript" src="./template.js"></script>
|
||||
<nav id="context-menu" class="context-menu">
|
||||
<ul class="context-menu__items">
|
||||
<li class="context-menu__item">
|
||||
<a href="#" class="context-menu__link" data-action="Open"><i class="fa fa-external-link"></i> <span data-translate="open-in-new-tab">Open in new Tab</span></a>
|
||||
</li>
|
||||
<li class="context-menu__item">
|
||||
<a href="#" class="context-menu__link" data-action="Copy"><i class="fa fa-paperclip"></i> <span data-translate="copy-to-clipboard">Copy to Clipboard</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<div id="messagePopup" class="popup-message">
|
||||
</div>
|
||||
<script type="text/javascript" src="./main.js?ver=12"></script>
|
||||
<script type="text/javascript" src="./animations.js"></script>
|
||||
</body>
|
||||
|
||||
|
||||
|
||||
293
main.css
293
main.css
@ -14,23 +14,23 @@
|
||||
|
||||
a:link {
|
||||
text-decoration: none;
|
||||
color: rgba(66,220,219,200);
|
||||
color: #D9E4EB;
|
||||
}
|
||||
|
||||
/* visited link */
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
color: rgba(66,220,219,200);
|
||||
color: #99BFD9;
|
||||
}
|
||||
|
||||
/* mouse over link */
|
||||
a:hover {
|
||||
color: rgba(66,220,219,200);
|
||||
color: #048AE8;
|
||||
}
|
||||
|
||||
/* selected link */
|
||||
a:active {
|
||||
color: rgba(66,220,219,200);
|
||||
color: #D9E4EB;
|
||||
}
|
||||
|
||||
|
||||
@ -50,6 +50,7 @@ a:active {
|
||||
}
|
||||
.gowebcam {
|
||||
font-size:110%;
|
||||
padding:10px;border:3px solid #CCC; cursor:pointer; background-color:#FFF
|
||||
}
|
||||
|
||||
.pressed {
|
||||
@ -65,10 +66,14 @@ a:active {
|
||||
margin-top:10px;
|
||||
|
||||
}
|
||||
hr {
|
||||
height:2px;border-width:0;color:gray;background-color:gray;
|
||||
}
|
||||
|
||||
#videosource {
|
||||
max-width:100%;
|
||||
max-height:100%;
|
||||
background-color:white;
|
||||
}
|
||||
/* Clear floats after the columns */
|
||||
.row:after {
|
||||
@ -120,14 +125,15 @@ a:active {
|
||||
|
||||
}
|
||||
.directorsgrid video {
|
||||
max-width: 300px;
|
||||
max-width: 400px;
|
||||
max-height: 300px;
|
||||
min-width: 300px;
|
||||
padding:10px 10px 0px 10px !important;
|
||||
}
|
||||
.directorsgrid .vidcon {
|
||||
display: inline-block !important;
|
||||
max-width: 300px !important;
|
||||
max-height: 500px !important;
|
||||
max-width: 400px !important;
|
||||
max-height: 500px !important;
|
||||
background: #E3E4EF;
|
||||
}
|
||||
.directorsgrid .tile {
|
||||
@ -141,6 +147,7 @@ html {
|
||||
}
|
||||
|
||||
|
||||
|
||||
body {
|
||||
padding: 0 0px;
|
||||
height: 100%;
|
||||
@ -158,17 +165,7 @@ body {
|
||||
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1000px) {
|
||||
|
||||
.cat {
|
||||
background-image: url(cat.svg);
|
||||
background-repeat: no-repeat;
|
||||
background-size: auto 50%;
|
||||
background-attachment: fixed;
|
||||
background-position: right bottom;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.gowebcam {
|
||||
padding:20px;
|
||||
background-color:white;
|
||||
@ -200,7 +197,7 @@ body {
|
||||
|
||||
@media only screen and (max-height: 650px) {
|
||||
body {
|
||||
font-size: 0.5em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.gowebcam {
|
||||
padding:5px;
|
||||
@ -209,7 +206,7 @@ body {
|
||||
.infoblob {
|
||||
color:white;
|
||||
width:100%;
|
||||
padding:80px;
|
||||
padding:20px;
|
||||
max-width:1280px;
|
||||
|
||||
}
|
||||
@ -224,6 +221,7 @@ body {
|
||||
top:0px;
|
||||
right:0px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -240,6 +238,32 @@ body {
|
||||
font-size:120%;
|
||||
|
||||
}
|
||||
#reshare{
|
||||
max-width:650px !important;
|
||||
font-size:96% !important;
|
||||
min-width:400px !important;
|
||||
|
||||
}
|
||||
.fa-paperclip {
|
||||
display:none;
|
||||
}
|
||||
#copythisurl {
|
||||
color:#DDD;
|
||||
display:inline-block;
|
||||
font-size:75% !important;
|
||||
}
|
||||
|
||||
#logoname{
|
||||
font-size:70%;
|
||||
}
|
||||
.column {
|
||||
float:none !important;
|
||||
padding: 15px 10px 1px 10px !important;
|
||||
}
|
||||
input[type=radio]{
|
||||
b
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -315,7 +339,7 @@ body {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
/* Add shadows to create the "card" effect */
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,.1);
|
||||
|
||||
}
|
||||
|
||||
/* Create four equal columns that floats next to each other */
|
||||
@ -325,11 +349,11 @@ body {
|
||||
margin: 1.8%;
|
||||
min-width: 300px;
|
||||
width: 20%;
|
||||
padding: 28px;
|
||||
padding: 25px;
|
||||
height: 220px; /* Should be removed. Only for demonstration */
|
||||
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
|
||||
font-size:100%;
|
||||
/* Add shadows to create the "card" effect */
|
||||
box-shadow: 0 4px 8px 0 rgba(0,0,0,.1);
|
||||
|
||||
@ -343,8 +367,8 @@ body {
|
||||
|
||||
@media only screen and (max-height: 650px) {
|
||||
.column {
|
||||
min-width:170px;
|
||||
height: 180px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -352,6 +376,8 @@ body {
|
||||
animation:fading 0.2s}@keyframes fading{0%{opacity:0}100%{opacity:1}}
|
||||
}
|
||||
|
||||
|
||||
|
||||
img {
|
||||
border-radius: 5px 5px 0 0;
|
||||
margin:5px;
|
||||
@ -411,6 +437,7 @@ button {
|
||||
.container-inner {
|
||||
display: none;
|
||||
background-color: rgb(221, 221, 221);
|
||||
padding:0 0 80px 0;
|
||||
}
|
||||
|
||||
.float{
|
||||
@ -463,12 +490,7 @@ img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
video {
|
||||
flex: 1 1 auto;
|
||||
background-color: transparent !important;
|
||||
border:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.in-animation {
|
||||
@ -535,3 +557,212 @@ video {
|
||||
}
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
padding-top: 50px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgb(0, 0, 0);
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.modal-content {
|
||||
position: relative;
|
||||
background-color: white;
|
||||
padding: 20px;
|
||||
margin: auto;
|
||||
max-width: 400px;
|
||||
|
||||
}
|
||||
.close-btn {
|
||||
float: right;
|
||||
color: lightgray;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.close-btn:hover {
|
||||
color: darkgray;
|
||||
}
|
||||
@-webkit-keyframes animatetop {
|
||||
from {top:-300px; opacity:0}
|
||||
to {top:0; opacity:1}
|
||||
}
|
||||
@keyframes animatetop {
|
||||
from {top:-300px; opacity:0}
|
||||
to {top:0; opacity:1}
|
||||
}
|
||||
|
||||
video {
|
||||
flex: 1 1 auto;
|
||||
background-color: transparent !important;
|
||||
border:0;
|
||||
margin:0;
|
||||
background-size: auto 50px;
|
||||
background-repeat:no-repeat;
|
||||
background-position: center;
|
||||
background-image:url("data:image/svg+xml,%3Csvg viewBox='-42 0 512 512.002' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m210.351562 246.632812c33.882813 0 63.222657-12.152343 87.195313-36.128906 23.972656-23.972656 36.125-53.304687 36.125-87.191406 0-33.875-12.152344-63.210938-36.128906-87.191406-23.976563-23.96875-53.3125-36.121094-87.191407-36.121094-33.886718 0-63.21875 12.152344-87.191406 36.125s-36.128906 53.308594-36.128906 87.1875c0 33.886719 12.15625 63.222656 36.132812 87.195312 23.976563 23.96875 53.3125 36.125 87.1875 36.125zm0 0'/%3E%3Cpath d='m426.128906 393.703125c-.691406-9.976563-2.089844-20.859375-4.148437-32.351563-2.078125-11.578124-4.753907-22.523437-7.957031-32.527343-3.308594-10.339844-7.808594-20.550781-13.371094-30.335938-5.773438-10.15625-12.554688-19-20.164063-26.277343-7.957031-7.613282-17.699219-13.734376-28.964843-18.199219-11.226563-4.441407-23.667969-6.691407-36.976563-6.691407-5.226563 0-10.28125 2.144532-20.042969 8.5-6.007812 3.917969-13.035156 8.449219-20.878906 13.460938-6.707031 4.273438-15.792969 8.277344-27.015625 11.902344-10.949219 3.542968-22.066406 5.339844-33.039063 5.339844-10.972656 0-22.085937-1.796876-33.046874-5.339844-11.210938-3.621094-20.296876-7.625-26.996094-11.898438-7.769532-4.964844-14.800782-9.496094-20.898438-13.46875-9.75-6.355468-14.808594-8.5-20.035156-8.5-13.3125 0-25.75 2.253906-36.972656 6.699219-11.257813 4.457031-21.003906 10.578125-28.96875 18.199219-7.605469 7.28125-14.390625 16.121094-20.15625 26.273437-5.558594 9.785157-10.058594 19.992188-13.371094 30.339844-3.199219 10.003906-5.875 20.945313-7.953125 32.523437-2.058594 11.476563-3.457031 22.363282-4.148437 32.363282-.679688 9.796875-1.023438 19.964844-1.023438 30.234375 0 26.726562 8.496094 48.363281 25.25 64.320312 16.546875 15.746094 38.441406 23.734375 65.066406 23.734375h246.53125c26.625 0 48.511719-7.984375 65.0625-23.734375 16.757813-15.945312 25.253906-37.585937 25.253906-64.324219-.003906-10.316406-.351562-20.492187-1.035156-30.242187zm0 0'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
/* context menu */
|
||||
|
||||
.context-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 10 !important;
|
||||
padding: 12px 0 !important;
|
||||
width: 240px !important;
|
||||
background-color: #fff !important;
|
||||
border: solid 1px #dfdfdf !important;
|
||||
box-shadow: 1px 1px 2px #cfcfcf !important;
|
||||
}
|
||||
|
||||
|
||||
.popup-message {
|
||||
display: none;
|
||||
align-text:center;
|
||||
position: absolute;
|
||||
z-index: 10 !important;
|
||||
padding: 3px 0 !important;
|
||||
min-width: 180px !important;
|
||||
border-radius: 10px;
|
||||
background-color: #fff !important;
|
||||
border: solid 1px #dfdfdf !important;
|
||||
box-shadow: 1px 1px 2px #cfcfcf !important;
|
||||
}
|
||||
|
||||
|
||||
.context-menu--active {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.context-menu__items {
|
||||
list-style: none !important;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.context-menu__item {
|
||||
display: block;
|
||||
margin-bottom: 4px !important;
|
||||
}
|
||||
|
||||
.context-menu__item:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.context-menu__link {
|
||||
display: block;
|
||||
padding: 4px 12px;
|
||||
color: #0066aa !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.context-menu__link:hover {
|
||||
color: #fff !important;
|
||||
background-color: #0066aa !important;
|
||||
}
|
||||
|
||||
.multiselect .multiselect-trigger:hover {
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
text-decoration: none;
|
||||
}
|
||||
.multiselect .multiselect-trigger.open {
|
||||
border-bottom: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.multiselect .multiselect-trigger.closed {
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
div.multiselect {
|
||||
background-color:#FFF;
|
||||
max-width:320px;
|
||||
white-space: nowrap;
|
||||
overflow:hidden;
|
||||
min-width:100px;
|
||||
margin:auto auto;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom:0;
|
||||
}
|
||||
|
||||
.multiselect .multiselect-contents {
|
||||
display: block;
|
||||
margin: 0;
|
||||
font-size:80%;
|
||||
padding: 5px 5px 5px;
|
||||
|
||||
border-top: 0;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
text-align:left;
|
||||
background-color:#f3f3f3;
|
||||
|
||||
}
|
||||
.multiselect .multiselect-contents li {
|
||||
list-style: none;
|
||||
font-size:130%;
|
||||
padding:2px;
|
||||
}
|
||||
.select .select-trigger:hover {
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
text-decoration: none;
|
||||
}
|
||||
.select .select-trigger.open {
|
||||
border-bottom: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
.select .select-trigger.closed {
|
||||
border-bottom: 1px solid #ccc;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.select .select-contents {
|
||||
display: none;
|
||||
margin: 0;
|
||||
padding: 0 24px 24px;
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.select .select-contents li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: #555 !important;
|
||||
}
|
||||
::-moz-placeholder {
|
||||
color: #555 !important;
|
||||
}
|
||||
:-ms-input-placeholder {
|
||||
color: #555 !important;
|
||||
}
|
||||
:-moz-placeholder {
|
||||
color: #555 !important;
|
||||
}
|
||||
|
||||
|
||||
label {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
input[type=checkbox]
|
||||
{
|
||||
/* Double-sized Checkboxes */
|
||||
-ms-transform: scale(1.3); /* IE */
|
||||
-moz-transform: scale(1.3); /* FF */
|
||||
-webkit-transform: scale(1.3); /* Safari and Chrome */
|
||||
-o-transform: scale(1.3); /* Opera */
|
||||
transform: scale(1.3);
|
||||
padding: 5px;
|
||||
}
|
||||
BIN
misc/1280.mp4
Normal file
BIN
misc/1280.mp4
Normal file
Binary file not shown.
BIN
misc/1920.mp4
Normal file
BIN
misc/1920.mp4
Normal file
Binary file not shown.
BIN
misc/480.mp4
Normal file
BIN
misc/480.mp4
Normal file
Binary file not shown.
BIN
misc/640.mp4
Normal file
BIN
misc/640.mp4
Normal file
Binary file not shown.
50
misc/bench.html
Normal file
50
misc/bench.html
Normal file
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<p><output id="result">Click Start Test to measure your CPU capabilities</output></p>
|
||||
<button onclick="startWorker()">Start Test</button>
|
||||
|
||||
<p><strong>Note:</strong> Internet Explorer 9 and earlier versions do not support Web Workers.</p>
|
||||
|
||||
<script>
|
||||
var score = 0;
|
||||
var count=0;
|
||||
var W = [];
|
||||
var interval;
|
||||
function startWorker(){
|
||||
score=0
|
||||
count=0
|
||||
document.getElementById("result").innerHTML="Test is running. This should take just a second.";
|
||||
for (var i=0;i<8;i++){
|
||||
W.push(loadWorker());
|
||||
}
|
||||
console.log("Done loading");
|
||||
interval = setTimeout(stopWorker,5000);
|
||||
}
|
||||
|
||||
function loadWorker() {
|
||||
var w;
|
||||
if(typeof(Worker) !== "undefined") {
|
||||
if(typeof(w) == "undefined") {
|
||||
w = new Worker("bench_worker.js");
|
||||
}
|
||||
w.onmessage = function(event) {
|
||||
score += Number(event.data);
|
||||
count += 1;
|
||||
if (count==8){stopWorker();}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function stopWorker() {
|
||||
clearInterval(interval);
|
||||
sss = Math.round(900000/Number(score))/10;
|
||||
if (count!=8){sss="FAILED";}
|
||||
document.getElementById("result").innerHTML="Score is: "+sss;
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
19
misc/bench_worker.js
Normal file
19
misc/bench_worker.js
Normal file
@ -0,0 +1,19 @@
|
||||
function isPrime(value) {
|
||||
for(var i = 2; i < value; i++) {
|
||||
if(value % i === 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return value > 1;
|
||||
}
|
||||
var d = new Date();
|
||||
var startTime = d.getTime();
|
||||
console.log(startTime);
|
||||
for (var i=0;i<100000000;i++){
|
||||
isPrime(9999999999);
|
||||
}
|
||||
d = new Date();
|
||||
console.log(d.getTime()-startTime);
|
||||
console.log(d.getTime());
|
||||
postMessage(d.getTime()-startTime);
|
||||
|
||||
79
misc/iframe.html
Normal file
79
misc/iframe.html
Normal file
@ -0,0 +1,79 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<style>
|
||||
* {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
}
|
||||
html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
video {
|
||||
animation: inlightbox 2.0s forwards;
|
||||
position: fixed !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.out-animation {
|
||||
animation: outlightbox 0.8s forwards;
|
||||
}
|
||||
|
||||
@keyframes inlightbox
|
||||
{
|
||||
0% {
|
||||
width: 100vw;
|
||||
top: -25vh;
|
||||
left: 0;
|
||||
opacity: 0.0;
|
||||
}
|
||||
|
||||
20% {
|
||||
width: 100vw;
|
||||
top: -25vh;
|
||||
left: 0;
|
||||
opacity: 0.5;
|
||||
}
|
||||
100% {
|
||||
width: 100vw;
|
||||
top: -25vh;
|
||||
left: 0;
|
||||
opacity: 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body id="main">
|
||||
<script language="javascript" type="text/javascript" src="./iframe.js"></script>
|
||||
<script>
|
||||
console.log("IFRAME");
|
||||
var session = Ooblex.Media;
|
||||
session.viewonly = true;
|
||||
session.connect();
|
||||
|
||||
session.listStreams().then(function(response){
|
||||
console.log(response);
|
||||
if (response.length>0){
|
||||
play(response[0][1]);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
function play(streamName){
|
||||
console.log("play stream");
|
||||
session.watchStream(streamName);
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
465
misc/iframe.js
Normal file
465
misc/iframe.js
Normal file
@ -0,0 +1,465 @@
|
||||
var Ooblex = {}; // Based the WebRTC and Signaling code off some of my open-source project, ooblex.com, hence the name.
|
||||
Ooblex.Media = new (function(){
|
||||
var session = {};
|
||||
|
||||
session.viewonly = false;;
|
||||
|
||||
function onSuccess(){};
|
||||
function onError(err){alert(err);};
|
||||
function defer(){
|
||||
var res, rej;
|
||||
var promise = new Promise((resolve, reject) => {
|
||||
res = resolve;
|
||||
rej = reject;
|
||||
});
|
||||
promise.resolve = res;
|
||||
promise.reject = rej;
|
||||
return promise;
|
||||
}
|
||||
[{urls:["stun:turnserver.appearin.net:443"]}]
|
||||
var configuration = {
|
||||
iceServers: [{urls:["stun:turnserver.appearin.net:443"]},{ urls: ["stun:stun1.l.google.com:19302", "stun:stun2.l.google.com:19305" ] }]
|
||||
};
|
||||
|
||||
session.generateStreamID = function(){
|
||||
var text = "";
|
||||
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
for (var i = 0; i < 12; i++){
|
||||
text += possible.charAt(Math.floor(Math.random() * possible.length));
|
||||
}
|
||||
return text;
|
||||
};
|
||||
|
||||
session.connect = function(){
|
||||
|
||||
// navigator.mediaDevices.getUserMedia({audio: true});
|
||||
session.streamID = session.generateStreamID();
|
||||
|
||||
session.pcs = {};
|
||||
session.streamSrc = null;
|
||||
session.msg = null;
|
||||
session.keys = {};
|
||||
session.counter=0;
|
||||
session.keys.enc = new TextEncoder("utf-8");
|
||||
session.ws = new WebSocket("wss://api.steves.app:8443");
|
||||
session.ws.onopen = function(){
|
||||
console.log("connected to video server");
|
||||
if (session.msg!==null){
|
||||
session.ws.send(JSON.stringify(session.msg));
|
||||
session.msg = null;
|
||||
}
|
||||
}
|
||||
|
||||
session.generateCrypto = function(){
|
||||
window.crypto.subtle.generateKey({
|
||||
name: "RSASSA-PKCS1-v1_5",
|
||||
modulusLength: 512, //can be 1024, 2048, or 4096 -- also apparently 512!
|
||||
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
|
||||
hash: {name: "SHA-1"}, //can be "SHA-1", "SHA-256", "SHA-384", or "SHA-512"
|
||||
},
|
||||
true, //whether the key is extractable (i.e. can be used in exportKey)
|
||||
["sign", "verify"] //can be any combination of "sign" and "verify"
|
||||
).then(function(key){
|
||||
console.log(key.publicKey);
|
||||
console.log(key.privateKey);
|
||||
key.enc = new TextEncoder("utf-8"); // needed for string to array buffer encoding
|
||||
session.keys = key;
|
||||
|
||||
window.crypto.subtle.exportKey(
|
||||
"jwk", //can be "jwk" (public or private), "spki" (public only), or "pkcs8" (private only)
|
||||
key.publicKey //can be a publicKey or privateKey, as long as extractable was true
|
||||
).then(function(keydata){
|
||||
//returns the exported key data
|
||||
console.log(keydata);
|
||||
var data = {};
|
||||
data.request = "storekey";
|
||||
data.key = keydata.n;
|
||||
session.sendMsg(data);
|
||||
//console.log(JSON.stringify(data));
|
||||
//session.signData("asdfasdfasdf");
|
||||
}).catch(function(err){
|
||||
console.error(err);
|
||||
});
|
||||
})
|
||||
.catch(function(err){
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
session.importCrypto = function(n){
|
||||
window.crypto.subtle.importKey(
|
||||
"jwk", //can be "jwk" (public or private), "spki" (public only), or "pkcs8" (private only)
|
||||
{ //this is an example jwk key, other key types are Uint8Array objects
|
||||
kty: "RSA",
|
||||
e: "AQAB",
|
||||
n: n,
|
||||
alg: "RS1",
|
||||
ext: true,
|
||||
},
|
||||
{ //these are the algorithm options
|
||||
name: "RSASSA-PKCS1-v1_5",
|
||||
hash: {name: "SHA-1"}, //can be "SHA-1", "SHA-256", "SHA-384", or "SHA-512"
|
||||
},
|
||||
true, //whether the key is extractable (i.e. can be used in exportKey)
|
||||
["verify"] //"verify" for public key import, "sign" for private key imports
|
||||
).then(function(publicKey){
|
||||
//returns a publicKey (or privateKey if you are importing a private key)
|
||||
console.log(publicKey);
|
||||
session.keys.publicKey = publicKey;
|
||||
session.keys.privateKey = null;
|
||||
}).catch(function(err){
|
||||
console.error(err);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
session.signData = function(data,callback){ // data as string
|
||||
if (session.keys === {}){
|
||||
console.log("Generate Some Crypto keys first");
|
||||
}
|
||||
window.crypto.subtle.sign(
|
||||
{
|
||||
name: "RSASSA-PKCS1-v1_5",
|
||||
},
|
||||
session.keys.privateKey, //from generateKey or importKey above
|
||||
session.keys.enc.encode(data) //ArrayBuffer of data you want to sign
|
||||
).then(function(signature){
|
||||
//returns an ArrayBuffer containing the signature
|
||||
signature = new Uint8Array(signature);
|
||||
signature = signature.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '');
|
||||
//signature = new Uint8Array(signature.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
|
||||
//console.log(signature);
|
||||
callback(data,signature);
|
||||
console.log(JSON.stringify(signature));
|
||||
}).catch(function(err){
|
||||
console.error(err);
|
||||
});
|
||||
};
|
||||
|
||||
session.verifyData = function(data){
|
||||
data.signature = new Uint8Array(data.signature.match(/.{1,2}/g).map(byte => parseInt(byte, 16)));
|
||||
if (session.keys.publicKey){
|
||||
window.crypto.subtle.verify({
|
||||
name: "RSASSA-PKCS1-v1_5",
|
||||
},
|
||||
session.keys.publicKey, //from generateKey or importKey above
|
||||
data.signature, //ArrayBuffer of the signature
|
||||
session.keys.enc.encode(data.data) //ArrayBuffer of the data
|
||||
).then(function(isvalid){
|
||||
//returns a boolean on whether the signature is true or not
|
||||
console.log(isvalid);
|
||||
}).catch(function(err){
|
||||
console.error(err);
|
||||
alert("Could not validate inbound connection");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
session.sendMsg = function(msg){
|
||||
if (session.ws.readyState !== 1){session.msg = msg;}
|
||||
else {session.ws.send(JSON.stringify(msg));}
|
||||
}
|
||||
|
||||
session.watchStream = function(streamID){
|
||||
session.streamID = streamID;
|
||||
var data = {};
|
||||
data.request = "play";
|
||||
data.streamID = session.streamID;
|
||||
session.sendMsg(data);
|
||||
}
|
||||
|
||||
session.listStreams = function(){
|
||||
console.log("send this shit");
|
||||
var data = {};
|
||||
data.request = "list";
|
||||
session.sendMsg(data);
|
||||
session.listPromise = defer();
|
||||
return session.listPromise;
|
||||
}
|
||||
|
||||
session.graphStreams = function(){
|
||||
console.log("graph this shit");
|
||||
var data = {};
|
||||
data.request = "graph";
|
||||
session.sendMsg(data);
|
||||
session.graphPromise = defer();
|
||||
return session.graphPromise;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
session.ws.onmessage = function (evt) {
|
||||
var msg = JSON.parse(evt.data);
|
||||
if (msg.request){ // ACTIONS THAT ARE OUTSIDE THE SCOPE OF BASIC WEBRTC
|
||||
if (msg.request=="offerSDP"){ // newly connected client is asking for your SDP offer
|
||||
session.offerSDP(session.streamSrc, msg.UUID);
|
||||
} else if (msg.request=="listing"){
|
||||
console.log(msg.list);
|
||||
session.listPromise.resolve(msg.list);
|
||||
} else if (msg.request=="graph"){
|
||||
console.log(msg.graph);
|
||||
session.graphPromise.resolve(msg.graph);
|
||||
} else if (msg.request=="genkey"){
|
||||
session.generateCrypto();
|
||||
} else if (msg.request=="publickey"){
|
||||
session.importCrypto(msg.key);
|
||||
}
|
||||
|
||||
|
||||
} else if (msg.description){
|
||||
console.log(msg.description);
|
||||
// var ttt=true;
|
||||
//if (msg.UUID in session.pcs)(ttt=false);
|
||||
session.setupPeer(msg.UUID); // could end up setting up the peer the wrong way.
|
||||
session.pcs[msg.UUID].setRemoteDescription(msg.description).then(function(){ // description, onSuccess, onError
|
||||
if (session.pcs[msg.UUID].remoteDescription.type === 'offer'){ // When receiving an offer/video lets answer it
|
||||
session.pcs[msg.UUID].createAnswer().then(function(description){ // creating answer
|
||||
return session.pcs[msg.UUID].setLocalDescription(description);
|
||||
}).then(function(){
|
||||
console.log("providing answer");
|
||||
var data = {};
|
||||
data.UUID = msg.UUID;
|
||||
data.description = session.pcs[msg.UUID].localDescription; // send our updated self identify
|
||||
session.sendMsg(data);
|
||||
|
||||
var data = {};
|
||||
data.request = "getkey"
|
||||
session.sendMsg(data);
|
||||
|
||||
}).catch(onError);
|
||||
} else if (session.pcs[msg.UUID].remoteDescription.type === 'answer'){ // someone responded to one of our answers; they presumably requested an offerSDP
|
||||
//if (ttt){
|
||||
//session.pcs[msg.UUID].createOffer().then(function(description){
|
||||
// session.pcs[msg.UUID].setLocalDescription(description).then(function(){
|
||||
// console.log("publishing SDP Offer");
|
||||
// var data = {};
|
||||
// data.description = session.pcs[msg.UUID].localDescription;
|
||||
// data.UUID = msg.UUID;
|
||||
// session.ws.send(JSON.stringify(data));
|
||||
// }).catch(onError);
|
||||
// }).catch(onError);
|
||||
// }
|
||||
// I AM A SEEDER OR PUBLISHER -- PUSHING DATA.
|
||||
//
|
||||
// I DONT WNAT EVERYONE DOING THIS. JUST THE ORIGINAL PUBLISHER. I WANT THEM INSTEAD TO JUST FORWARD AND DECODE.
|
||||
// VALIDATE MESSAGES , FORWARD, thats it. maybe some data about connection and parents.
|
||||
// Hold conenction open, not send data -- just check out how the latency is.
|
||||
// CHECK FOR CHAT EMSSAGES; surface them if any
|
||||
// SHOUDL CHAT BE TWO DIRECTIONAL? SEEMS LIKE WAY TOO MUCH STRESS. SO NO.
|
||||
if (!session.timer){
|
||||
console.log("sending data string every 5 seconds");
|
||||
session.timer = setInterval(function(){
|
||||
session.signData(Date.now().toString()+":"+session.counter,function(data,signature){
|
||||
session.counter += 1;
|
||||
for (i in session.pcs){
|
||||
console.log(i);
|
||||
try{
|
||||
session.pcs[i].sendChannel.send(JSON.stringify({data,signature}));
|
||||
} catch(e){
|
||||
console.log("RTC Connection seems to be dead? is it? If it is, or can't be validated, close this shit");
|
||||
session.pcs[i].close();
|
||||
delete(session.pcs[i]);
|
||||
}
|
||||
}
|
||||
})
|
||||
// SIGN DATA HERE -- session.signData
|
||||
// // unsign data on recieve; mark as unverified if no key to match with.
|
||||
},5000);
|
||||
} /// testing p2p data channels -- perhaps for sending SYNC, quality, blockchina, or EVENT data.
|
||||
//console.log("Already set description for answer");
|
||||
//session.pcs[msg.UUID].setRemoteDescription(msg.description, function(){ // register their response and I assume start pubilshing (publishing)
|
||||
//console.log("THIS IS GOOD! If it fails now, maybe an localhost/SSL issue?");
|
||||
//session.pcs[UUID].createAnswer().then(function(description){
|
||||
// console.log("SDP ANSWSER MADE!!");
|
||||
// session.pcs[UUID].setLocalDescription(description, function (){
|
||||
// console.log("providing answer");session.pcs[msg.UUID].remoteDescription.type === 'offer'
|
||||
// var data = {};
|
||||
// data.request = "publish";
|
||||
// data.UUID = UUID;
|
||||
// data.description = session.pcs[UUID].localDescription;
|
||||
// session.sendMsg(data);
|
||||
// }).catch(onError);
|
||||
//}, onError);
|
||||
}
|
||||
}).catch(onError);
|
||||
} else if (msg.candidate){
|
||||
console.log("add ice candidate");
|
||||
session.pcs[msg.UUID].addIceCandidate(msg.candidate).then(function(){console.log("added ICE from viewer");}).catch(onError);
|
||||
} else if (msg.request == "cleanup"){
|
||||
console.log("Clean up");
|
||||
if (msg.UUID in session.pcs){
|
||||
console.log("problem");
|
||||
session.pcs[msg.UUID].close();
|
||||
delete(session.pcs[msg.UUID]);
|
||||
// I'll have to figure out where to reconnect somewhere else
|
||||
//var data = {};
|
||||
//data.request = "play";
|
||||
//data.streamID = session.streamID;
|
||||
//session.sendMsg(data);
|
||||
}
|
||||
} else { console.log("what is this?",msg); }
|
||||
}
|
||||
session.ws.onclose = function(){console.log("ws closed");alert("We lost our connection to the server. Refresh")};
|
||||
};
|
||||
|
||||
session.offerSDP = function(stream,UUID){ // publisher/offerer
|
||||
if (UUID in session.pcs){alert("PROBLEM! RESENDING SDP OFFER SHOULD NOT HAPPEN");}
|
||||
else {console.log("Create a new RTC connection; offering SDP on request");}
|
||||
|
||||
session.pcs[UUID] = new RTCPeerConnection(configuration);
|
||||
|
||||
session.pcs[UUID].sendChannel = session.pcs[UUID].createDataChannel("sendChannel");
|
||||
|
||||
stream.getTracks().forEach(track => session.pcs[UUID].addTrack(track, stream));
|
||||
session.pcs[UUID].ontrack = event => {alert("Publisher is being sent a video stream??? NOT EXPECTED!")};
|
||||
|
||||
session.pcs[UUID].onicecandidate = function(event){
|
||||
console.log("CREATE ICE");
|
||||
if (event.candidate==null){return;}
|
||||
var data = {};
|
||||
data.UUID = UUID;
|
||||
data.candidate = event.candidate;
|
||||
session.sendMsg(data);
|
||||
};
|
||||
|
||||
session.pcs[UUID].oniceconnectionstatechange = function() {
|
||||
try{
|
||||
if (session.pcs[UUID].iceConnectionState == 'disconnected') {
|
||||
console.log(UUID,'Disconnected');
|
||||
session.pcs[UUID].close()
|
||||
delete(session.pcs[UUID]);
|
||||
} else if (session.pcs[UUID].iceConnectionState == 'failed') {
|
||||
alert('Could not make WebRTC connection');
|
||||
session.pcs[UUID].close()
|
||||
delete(session.pcs[UUID]);
|
||||
}
|
||||
}
|
||||
catch(e){}
|
||||
}
|
||||
|
||||
//session.pcs[UUID].onnegotiationneeded = function(){ // bug: https://groups.google.com/forum/#!topic/discuss-webrtc/3-TmyjQ2SeE
|
||||
session.pcs[UUID].createOffer().then(function(description){
|
||||
session.pcs[UUID].setLocalDescription(description).then(function(){
|
||||
console.log("publishing SDP Offer");
|
||||
var data = {};
|
||||
data.description = session.pcs[UUID].localDescription;
|
||||
data.UUID = UUID;
|
||||
session.ws.send(JSON.stringify(data));
|
||||
}).catch(onError);
|
||||
}).catch(onError);
|
||||
//};
|
||||
|
||||
//session.pcs[UUID].sendChannel = session.pcs[UUID].createDataChannel("sendChannel");
|
||||
session.pcs[UUID].onclose = function(){
|
||||
console.log("WebRTC Connection Closed",UUID);
|
||||
delete(session.pcs[UUID]);
|
||||
};
|
||||
session.pcs[UUID].onopen = function(){console.log("WEBRTC CONNECTION OPEN",UUID);};
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
session.setupPeer = function(UUID){ // ingesting stream as a viewer
|
||||
if (UUID in session.pcs){console.log("RTC connection is ALREADY ready; we can already accept answers");return;} // already exists
|
||||
else {console.log("MAKING A NEW RTC CONNECTION");}
|
||||
session.pcs[UUID] = new RTCPeerConnection(configuration);
|
||||
session.pcs[UUID].addTransceiver('video', { direction: 'recvonly'});
|
||||
session.pcs[UUID].onclose = function(event){
|
||||
console.log("rpc closed");
|
||||
delete(session.pcs[UUID]);
|
||||
var data = {};
|
||||
data.request = "play";
|
||||
data.streamID = session.streamID;
|
||||
session.sendMsg(data);
|
||||
session.streamSrc==null;
|
||||
}
|
||||
|
||||
session.pcs[UUID].onicecandidate = function(event){
|
||||
console.log("CREATE ICE");
|
||||
if (event.candidate==null){console.log("null ice");return;}
|
||||
var data = {};
|
||||
data.UUID = UUID;
|
||||
data.candidate = event.candidate;
|
||||
session.sendMsg(data);
|
||||
console.log(data);
|
||||
};
|
||||
|
||||
session.pcs[UUID].oniceconnectionstatechange = function() {
|
||||
try{
|
||||
if (session.pcs[UUID].iceConnectionState == 'disconnected') {
|
||||
console.log(UUID,'Disconnected');
|
||||
session.pcs[UUID].close()
|
||||
delete(session.pcs[UUID]);
|
||||
}} catch (E){}
|
||||
}
|
||||
|
||||
session.pcs[UUID].ondatachannel = function(event){ // recieve data from peer; event data maybe
|
||||
session.pcs[UUID].receiveChannel = event.channel;
|
||||
session.pcs[UUID].receiveChannel.onmessage = function(e){console.log("recieved data: "+e.data);session.verifyData(JSON.parse(e.data));};
|
||||
session.pcs[UUID].receiveChannel.onopen = function(){console.log("data channel opened")};
|
||||
session.pcs[UUID].receiveChannel.onclose = function(){console.log("datachannel closed");};
|
||||
};
|
||||
|
||||
session.pcs[UUID].ontrack = event => {
|
||||
|
||||
console.log("streams:",event.streams);
|
||||
console.log(event.streams[0].getVideoTracks());
|
||||
console.log(event.streams[0].getAudioTracks());
|
||||
const stream = event.streams[0];
|
||||
session.streamSrc = stream;
|
||||
|
||||
if (document.getElementById("videosource")){
|
||||
console.log("new track added to mediastream");
|
||||
var v = document.getElementById("videosource");
|
||||
v.autoplay = true;
|
||||
v.controls = true;
|
||||
v.muted = true;
|
||||
v.setAttribute("playsinline","");
|
||||
|
||||
v.srcObject = stream;
|
||||
var m = document.getElementById("mainmenu");
|
||||
try {m.remove();} catch(e){}
|
||||
|
||||
} else {
|
||||
console.log("video element is being created and media track added");
|
||||
var v = document.createElement("video");
|
||||
document.body.appendChild(v);
|
||||
v.autoplay = true;
|
||||
v.controls = true;
|
||||
v.muted = true;
|
||||
v.id = "videosource"; // could be set to UUID in the future
|
||||
v.setAttribute("playsinline","");
|
||||
v.style = "width:100vw;";
|
||||
|
||||
if (!v.srcObject || v.srcObject.id !== stream.id) {
|
||||
v.srcObject = stream;
|
||||
}
|
||||
|
||||
//stream.getTracks().forEach(track => {
|
||||
// console.log("Remote track", track)
|
||||
//});
|
||||
|
||||
// v.onloadedmetadata = (e) => {
|
||||
// console.log("Remote video play");
|
||||
// v.play().then(() => { console.log("Remote video playing") }).catch((e) => { console.log(e) });
|
||||
// }
|
||||
|
||||
// Time to become a seeder now that it's all working
|
||||
if (session.viewonly == false){
|
||||
var data = {};
|
||||
data.request = "seed";
|
||||
data.streamID = session.streamID;
|
||||
session.sendMsg(data);
|
||||
console.log("OPEN TO SEEDING NOW: "+session.streamID);
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log("setup peer complete");
|
||||
};
|
||||
|
||||
|
||||
return session;
|
||||
})();
|
||||
108
misc/stageten.html
Normal file
108
misc/stageten.html
Normal file
@ -0,0 +1,108 @@
|
||||
<html>
|
||||
<head><style>
|
||||
html {
|
||||
border:0;
|
||||
margin:0;
|
||||
}
|
||||
|
||||
video {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=), none;
|
||||
user-select: none;
|
||||
|
||||
}
|
||||
|
||||
body{
|
||||
|
||||
padding: 0 0px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 149, 226, 0.7);
|
||||
background-color: -webkit-linear-gradient(to top, #fff, rgba(0, 149, 226, 0.7),rgba(0, 149, 226, 1.)); /* Chrome 10-25, Safari 5.1-6 */
|
||||
background-color: linear-gradient(to top, #fff, rgba(0, 149, 226, 0.7),rgba(0, 149, 226, 1.)); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||
|
||||
font-size: 2em;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
border:0;
|
||||
margin:0;
|
||||
|
||||
|
||||
}
|
||||
button{
|
||||
padding:10px;
|
||||
font-size: 20px;
|
||||
margin: auto auto;
|
||||
}
|
||||
#header{
|
||||
height:80px;
|
||||
width:100%;
|
||||
background-color: #101520;
|
||||
}
|
||||
.inputfield{
|
||||
font-size: 20px;
|
||||
align-self:center;
|
||||
height:30px;
|
||||
width:500px;
|
||||
margin: auto auto;
|
||||
padding:20px
|
||||
}
|
||||
|
||||
.formcss{
|
||||
font-size: 20px;
|
||||
align-self:center;
|
||||
margin: auto auto;
|
||||
}
|
||||
</style></head>
|
||||
<body >
|
||||
|
||||
<div id="header" style="-webkit-app-region: drag;color:white;font-size:2em">STAGE TEN</div>
|
||||
<div class="formcss" >
|
||||
<input type="text" id="changeText" class="inputfield" placeholder="Paste the STAGE TEN link here"></input><button onclick="gohere();" id="gobutton">GO</button>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
(function (w) {
|
||||
|
||||
w.URLSearchParams = w.URLSearchParams || function (searchString) {
|
||||
var self = this;
|
||||
self.searchString = searchString;
|
||||
self.get = function (name) {
|
||||
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(self.searchString);
|
||||
if (results == null) {
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
return decodeURI(results[1]) || 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
})(window)
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
|
||||
var isMobile = false;
|
||||
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
|
||||
isMobile=true;
|
||||
}
|
||||
|
||||
if (urlParams.has('name')){
|
||||
var name = urlParams.get('name');
|
||||
//window.location = "https://app.stageten.tv/"+name;
|
||||
document.getElementById('changeText').value = "https://obs.ninja/?streamid="+name;
|
||||
}
|
||||
|
||||
|
||||
function gohere(){
|
||||
var url = document.getElementById('changeText').value;
|
||||
window.location = url;
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
10
misc/test.html
Normal file
10
misc/test.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
</head>
|
||||
<script src="test.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
413
misc/test.js
Normal file
413
misc/test.js
Normal file
@ -0,0 +1,413 @@
|
||||
var Camera = {"Type":{"FRONT":"front","BACK":"back"}};
|
||||
|
||||
var CameraAccess = new (function (CameraAccess) {
|
||||
const backCameraKeywords = [
|
||||
"rear",
|
||||
"back",
|
||||
"rück",
|
||||
"arrière",
|
||||
"trasera",
|
||||
"trás",
|
||||
"traseira",
|
||||
"posteriore",
|
||||
"后面",
|
||||
"後面",
|
||||
"背面",
|
||||
"后置",
|
||||
"後置",
|
||||
"背置",
|
||||
"задней",
|
||||
"الخلفية",
|
||||
"후",
|
||||
"arka",
|
||||
"achterzijde",
|
||||
"หลัง",
|
||||
"baksidan",
|
||||
"bagside",
|
||||
"sau",
|
||||
"bak",
|
||||
"tylny",
|
||||
"takakamera",
|
||||
"belakang",
|
||||
"אחורית",
|
||||
"πίσω",
|
||||
"spate",
|
||||
"hátsó",
|
||||
"zadní",
|
||||
"darrere",
|
||||
"zadná",
|
||||
"задня",
|
||||
"stražnja",
|
||||
"belakang",
|
||||
"बैक"
|
||||
];
|
||||
const cameraObjects = new Map();
|
||||
let getCamerasPromise;
|
||||
/**
|
||||
* @hidden
|
||||
*
|
||||
* @param label The camera label.
|
||||
* @returns Whether the label mentions the camera being a back-facing one.
|
||||
*/
|
||||
function isBackCameraLabel(label) {
|
||||
const lowercaseLabel = label.toLowerCase();
|
||||
return backCameraKeywords.some(keyword => {
|
||||
return lowercaseLabel.includes(keyword);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Adjusts the cameras' type classification based on the given currently active video stream:
|
||||
* If the stream comes from an environment-facing camera, the camera is marked to be a back-facing camera
|
||||
* and the other cameras to be of other types accordingly (if they are not correctly set already).
|
||||
*
|
||||
* The method returns the currently active camera if it's actually the main (back or only) camera in use.
|
||||
*
|
||||
* @param mediaStreamTrack The currently active `MediaStreamTrack`.
|
||||
* @param cameras The array of available [[Camera]] objects.
|
||||
* @returns Whether the stream was actually from the main camera.
|
||||
*/
|
||||
function adjustCamerasFromMainCameraStream(mediaStreamTrack, cameras) {
|
||||
let mediaTrackSettings;
|
||||
if (typeof mediaStreamTrack.getSettings === "function") {
|
||||
mediaTrackSettings = mediaStreamTrack.getSettings();
|
||||
}
|
||||
const activeCamera = cameras.find(camera => {
|
||||
return ((mediaTrackSettings != null && camera.deviceId === mediaTrackSettings.deviceId) ||
|
||||
camera.label === mediaStreamTrack.label);
|
||||
});
|
||||
if (activeCamera !== undefined) {
|
||||
const activeCameraIsBackFacing = (mediaTrackSettings != null && mediaTrackSettings.facingMode === "environment") ||
|
||||
isBackCameraLabel(mediaStreamTrack.label);
|
||||
let activeCameraIsMainBackCamera = activeCameraIsBackFacing;
|
||||
// TODO: also correct camera types when active camera is not back-facing
|
||||
if (activeCameraIsBackFacing && cameras.length > 1) {
|
||||
// Correct camera types if needed
|
||||
cameras.forEach(camera => {
|
||||
if (camera.deviceId === activeCamera.deviceId) {
|
||||
// tslint:disable-next-line:no-any
|
||||
camera.cameraType = Camera.Type.BACK;
|
||||
}
|
||||
else if (!isBackCameraLabel(camera.label)) {
|
||||
// tslint:disable-next-line:no-any
|
||||
camera.cameraType = Camera.Type.FRONT;
|
||||
}
|
||||
});
|
||||
const mainBackCamera = cameras
|
||||
.filter(camera => {
|
||||
return camera.cameraType === Camera.Type.BACK;
|
||||
})
|
||||
.sort((camera1, camera2) => {
|
||||
return camera1.label.localeCompare(camera2.label);
|
||||
})[0];
|
||||
activeCameraIsMainBackCamera = activeCamera.deviceId === mainBackCamera.deviceId;
|
||||
}
|
||||
if (cameras.length === 1 || activeCameraIsMainBackCamera) {
|
||||
return activeCamera;
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
CameraAccess.adjustCamerasFromMainCameraStream = adjustCamerasFromMainCameraStream;
|
||||
/**
|
||||
* @param devices The list of available devices.
|
||||
* @returns The extracted list of camera objects initialized from the given devices.
|
||||
*/
|
||||
function extractCamerasFromDevices(devices) {
|
||||
const cameras = devices
|
||||
.filter(device => {
|
||||
return device.kind === "videoinput";
|
||||
})
|
||||
.map(videoDevice => {
|
||||
if (cameraObjects.has(videoDevice.deviceId)) {
|
||||
return cameraObjects.get(videoDevice.deviceId);
|
||||
}
|
||||
const label = videoDevice.label != null ? videoDevice.label : "";
|
||||
const camera = {
|
||||
deviceId: videoDevice.deviceId,
|
||||
label,
|
||||
cameraType: isBackCameraLabel(label) ? Camera.Type.BACK : Camera.Type.FRONT
|
||||
};
|
||||
if (label !== "") {
|
||||
cameraObjects.set(videoDevice.deviceId, camera);
|
||||
}
|
||||
return camera;
|
||||
});
|
||||
if (cameras.length > 1 &&
|
||||
!cameras.some(camera => {
|
||||
return camera.cameraType === Camera.Type.BACK;
|
||||
})) {
|
||||
// Check if cameras are labeled with resolution information, take the higher-resolution one in that case
|
||||
// Otherwise pick the last camera
|
||||
let backCameraIndex = cameras.length - 1;
|
||||
const cameraResolutions = cameras.map(camera => {
|
||||
const match = camera.label.match(/\b([0-9]+)MP?\b/i);
|
||||
if (match != null) {
|
||||
return parseInt(match[1], 10);
|
||||
}
|
||||
return NaN;
|
||||
});
|
||||
if (!cameraResolutions.some(cameraResolution => {
|
||||
return isNaN(cameraResolution);
|
||||
})) {
|
||||
backCameraIndex = cameraResolutions.lastIndexOf(Math.max(...cameraResolutions));
|
||||
}
|
||||
// tslint:disable-next-line:no-any
|
||||
cameras[backCameraIndex].cameraType = Camera.Type.BACK;
|
||||
}
|
||||
return cameras;
|
||||
}
|
||||
/**
|
||||
* Get a list of cameras (if any) available on the device, a camera access permission is requested to the user
|
||||
* the first time this method is called if needed.
|
||||
*
|
||||
* Depending on device features and user permissions for camera access, any of the following errors
|
||||
* could be the rejected result of the returned promise:
|
||||
* - `UnsupportedBrowserError`
|
||||
* - `PermissionDeniedError`
|
||||
* - `NotAllowedError`
|
||||
* - `NotFoundError`
|
||||
* - `AbortError`
|
||||
* - `NotReadableError`
|
||||
* - `InternalError`
|
||||
*
|
||||
* @returns A promise resolving to the array of available [[Camera]] objects (could be empty).
|
||||
*/
|
||||
function getCameras() {
|
||||
if (getCamerasPromise != null) {
|
||||
return getCamerasPromise;
|
||||
}
|
||||
const accessPermissionPromise = new Promise((resolve, reject) => {
|
||||
return enumerateDevices()
|
||||
.then(devices => {
|
||||
if (devices
|
||||
.filter(device => {
|
||||
return device.kind === "videoinput";
|
||||
})
|
||||
.every(device => {
|
||||
return device.label === "";
|
||||
})) {
|
||||
resolve(navigator.mediaDevices.getUserMedia({
|
||||
video: true,
|
||||
audio: false
|
||||
}));
|
||||
}
|
||||
else {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
getCamerasPromise = new Promise(async (resolve, reject) => {
|
||||
let stream;
|
||||
try {
|
||||
stream = await accessPermissionPromise;
|
||||
const devices = await enumerateDevices();
|
||||
const cameras = extractCamerasFromDevices(devices);
|
||||
console.debug("Camera list: ", ...cameras);
|
||||
return resolve(cameras);
|
||||
}
|
||||
catch (error) {
|
||||
// istanbul ignore if
|
||||
if (error.name === "SourceUnavailableError") {
|
||||
error.name = "NotReadableError";
|
||||
}
|
||||
return reject(error);
|
||||
}
|
||||
finally {
|
||||
// istanbul ignore else
|
||||
if (stream != null) {
|
||||
stream.getVideoTracks().forEach(track => {
|
||||
track.stop();
|
||||
});
|
||||
}
|
||||
getCamerasPromise = undefined;
|
||||
}
|
||||
});
|
||||
return getCamerasPromise;
|
||||
}
|
||||
CameraAccess.getCameras = getCameras;
|
||||
/**
|
||||
* Call `navigator.mediaDevices.getUserMedia` asynchronously in a `setTimeout` call.
|
||||
*
|
||||
* @param getUserMediaParams The parameters for the `navigator.mediaDevices.getUserMedia` call.
|
||||
* @returns A promise resolving when the camera is accessed.
|
||||
*/
|
||||
function getUserMediaDelayed(getUserMediaParams) {
|
||||
console.debug("Camera access:", getUserMediaParams.video);
|
||||
return new Promise((resolve, reject) => {
|
||||
window.setTimeout(() => {
|
||||
navigator.mediaDevices
|
||||
.getUserMedia(getUserMediaParams)
|
||||
.then(resolve)
|
||||
.catch(reject);
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get the *getUserMedia* *video* parameters to be used given a resolution fallback level and the browser used.
|
||||
*
|
||||
* @param resolutionFallbackLevel The number representing the wanted resolution, from 0 to 6,
|
||||
* resulting in higher to lower video resolutions.
|
||||
* @param isSafariBrowser Whether the browser is *Safari*.
|
||||
* @returns The resulting *getUserMedia* *video* parameters.
|
||||
*/
|
||||
function getUserMediaVideoParams(resolutionFallbackLevel, isSafariBrowser) {
|
||||
switch (resolutionFallbackLevel) {
|
||||
case 0:
|
||||
if (isSafariBrowser) {
|
||||
return {
|
||||
width: { min: 1400, ideal: 1920, max: 1920 },
|
||||
height: { min: 900, ideal: 1080, max: 1440 }
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
width: { min: 1400, ideal: 1920, max: 1920 },
|
||||
height: { min: 900, ideal: 1440, max: 1440 }
|
||||
};
|
||||
}
|
||||
case 1:
|
||||
if (isSafariBrowser) {
|
||||
return {
|
||||
width: { min: 1200, ideal: 1600, max: 1920 },
|
||||
height: { min: 900, ideal: 1080, max: 1200 }
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
width: { min: 1200, ideal: 1920, max: 1920 },
|
||||
height: { min: 900, ideal: 1200, max: 1200 }
|
||||
};
|
||||
}
|
||||
case 2:
|
||||
if (isSafariBrowser) {
|
||||
return {
|
||||
width: { min: 1080, ideal: 1600, max: 1920 },
|
||||
height: { min: 900, ideal: 900, max: 1080 }
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
width: { min: 1080, ideal: 1920, max: 1920 },
|
||||
height: { min: 900, ideal: 1080, max: 1080 }
|
||||
};
|
||||
}
|
||||
case 3:
|
||||
if (isSafariBrowser) {
|
||||
return {
|
||||
width: { min: 960, ideal: 1280, max: 1440 },
|
||||
height: { min: 480, ideal: 720, max: 960 }
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
width: { min: 960, ideal: 1280, max: 1440 },
|
||||
height: { min: 480, ideal: 960, max: 960 }
|
||||
};
|
||||
}
|
||||
case 4:
|
||||
if (isSafariBrowser) {
|
||||
return {
|
||||
width: { min: 720, ideal: 1024, max: 1440 },
|
||||
height: { min: 480, ideal: 768, max: 768 }
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
width: { min: 720, ideal: 1280, max: 1440 },
|
||||
height: { min: 480, ideal: 720, max: 768 }
|
||||
};
|
||||
}
|
||||
case 5:
|
||||
if (isSafariBrowser) {
|
||||
return {
|
||||
width: { min: 640, ideal: 800, max: 1440 },
|
||||
height: { min: 480, ideal: 600, max: 720 }
|
||||
};
|
||||
}
|
||||
else {
|
||||
return {
|
||||
width: { min: 640, ideal: 960, max: 1440 },
|
||||
height: { min: 480, ideal: 720, max: 720 }
|
||||
};
|
||||
}
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Try to access a given camera for video input at the given resolution level.
|
||||
* @param resolutionFallbackLevel The number representing the wanted resolution, from 0 to 6,
|
||||
* resulting in higher to lower video resolutions.
|
||||
* @param camera The camera to try to access for video input.
|
||||
* @returns A promise resolving to the `MediaStream` object coming from the accessed camera.
|
||||
*/
|
||||
function accessCameraStream(resolutionFallbackLevel, camera) {
|
||||
var iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
|
||||
const getUserMediaParams = {
|
||||
audio: false,
|
||||
video: getUserMediaVideoParams(resolutionFallbackLevel, iOS)
|
||||
};
|
||||
if (camera.deviceId === "") {
|
||||
getUserMediaParams.video.facingMode = {
|
||||
ideal: camera.cameraType === Camera.Type.BACK ? "environment" : "user"
|
||||
};
|
||||
}
|
||||
else {
|
||||
getUserMediaParams.video.deviceId = {
|
||||
exact: camera.deviceId
|
||||
};
|
||||
}
|
||||
return (getUserMediaDelayed(getUserMediaParams), getUserMediaParams);
|
||||
}
|
||||
CameraAccess.accessCameraStream = accessCameraStream;
|
||||
/**
|
||||
* Get a list of available devices in a cross-browser compatible way.
|
||||
* @returns A promise resolving to the `MediaDeviceInfo` array of all available devices.
|
||||
*/
|
||||
function enumerateDevices() {
|
||||
if (typeof navigator.enumerateDevices === "function") {
|
||||
return navigator.enumerateDevices();
|
||||
}
|
||||
else if (typeof navigator.mediaDevices === "object" &&
|
||||
typeof navigator.mediaDevices.enumerateDevices === "function") {
|
||||
return navigator.mediaDevices.enumerateDevices();
|
||||
}
|
||||
else {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
if (window.MediaStreamTrack == null || window.MediaStreamTrack.getSources == null) {
|
||||
throw new Error();
|
||||
}
|
||||
window.MediaStreamTrack.getSources((devices) => {
|
||||
resolve(devices
|
||||
.filter(device => {
|
||||
return device.kind.toLowerCase() === "video" || device.kind.toLowerCase() === "videoinput";
|
||||
})
|
||||
.map(device => {
|
||||
return {
|
||||
deviceId: device.deviceId != null ? device.deviceId : "",
|
||||
groupId: device.groupId,
|
||||
kind: "videoinput",
|
||||
label: device.label,
|
||||
toJSON: /* istanbul ignore next */ function () {
|
||||
return this;
|
||||
}
|
||||
};
|
||||
}));
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return CameraAccess;
|
||||
})(CameraAccess || (CameraAccess = {}));
|
||||
|
||||
|
||||
CameraAccess.getCameras().then((val) => {
|
||||
console.log("output:",val);
|
||||
console.log(CameraAccess.accessCameraStream(1234,val[0]));
|
||||
}).catch((e)=>console.log(e));
|
||||
64
misc/textmixer.html
Normal file
64
misc/textmixer.html
Normal file
@ -0,0 +1,64 @@
|
||||
<html>
|
||||
<body>
|
||||
<div id="playwindow"></div>
|
||||
<script>
|
||||
|
||||
var mediaPool = [];
|
||||
|
||||
function updateMixer(){
|
||||
|
||||
var w = window.innerWidth;
|
||||
var h = window.innerHeight;
|
||||
var ww = w/16;
|
||||
var hh = h/9;
|
||||
|
||||
if (mediaPool.length>1){
|
||||
var mod = Math.pow((ww*hh)/(mediaPool.length-1),0.5)
|
||||
var rw = Math.ceil(ww/mod);
|
||||
var rh = Math.ceil(hh/mod);
|
||||
} else { rw=1; rh=1;}
|
||||
|
||||
var playarea = document.getElementById("playwindow");
|
||||
playarea.innerHTML = "";
|
||||
var i=0;
|
||||
var offset = 0;
|
||||
mediaPool.forEach(vid=>{
|
||||
|
||||
var vw = vid.videoWidth;
|
||||
var vh = vid.videoHeight;
|
||||
var ar = vw/vh;
|
||||
vid.style.position = "absolute";
|
||||
|
||||
if (Math.ceil((i+1)/rw)==rh){
|
||||
offset = (rw*rh -mediaPool.length )*(w/rw)/2;
|
||||
console.log(offset);
|
||||
}
|
||||
|
||||
vid.style.left = Math.floor(offset+((i%rw)+0)*w/rw)+"px";
|
||||
|
||||
vid.style.top = Math.floor((Math.floor(i/rw)+0)*h/rh)+"px";
|
||||
|
||||
vid.style.width = Math.ceil(w/rw)+"px";
|
||||
vid.style.height = Math.ceil(h/rh)+"px";
|
||||
playarea.appendChild(vid);
|
||||
i+=1;
|
||||
});
|
||||
}
|
||||
|
||||
function addVideo(filename){
|
||||
var x = document.createElement("VIDEO");
|
||||
x.src = filename;
|
||||
mediaPool.push(x);
|
||||
updateMixer();
|
||||
}
|
||||
|
||||
window.addEventListener("resize", updateMixer);
|
||||
</script>
|
||||
<div style="top:800px;position:absolute">
|
||||
<button onclick="addVideo('480.mp4');">480</button>
|
||||
<button onclick="addVideo('1280.mp4');">1280</button>
|
||||
<button onclick="addVideo('640.mp4');">640</button>
|
||||
<button onclick="addVideo('1920.mp4');">1920</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
98
misc/timer.html
Normal file
98
misc/timer.html
Normal file
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
html {
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
body {
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
p {
|
||||
text-align: center;
|
||||
font-size: 60px;
|
||||
margin-top: 0px;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
background-color: rgba(255,255,255,0)
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onmousedown="buttonPress(event)" oncontextmenu="event.preventDefault();" onload="start();">
|
||||
|
||||
<p id="demo"></p>
|
||||
|
||||
<script>
|
||||
|
||||
// Set the date we're counting down to
|
||||
var countDownDate = null;
|
||||
var x = null;
|
||||
var isReset = false;
|
||||
var isPaused = true;
|
||||
|
||||
document.getElementById("demo").innerHTML = "00:00:00<small><small><small><small>.000</small></small></small></small>"; //set timer to 00:00:00
|
||||
|
||||
function buttonPress(event) {
|
||||
//alert("You pressed button: " + event.button);
|
||||
if (isPaused) { //if paused
|
||||
if (event.button==0) { //left click
|
||||
isPaused = false; //unpause current timer
|
||||
}
|
||||
if (event.button==2) { //right click
|
||||
if (isReset) { //is reset
|
||||
isReset = false;
|
||||
isPaused = false;
|
||||
start(); //run timer
|
||||
} else { //is running
|
||||
if(x) {clearInterval(x);}
|
||||
isReset = true;
|
||||
document.getElementById("demo").innerHTML = "00:00:00<small><small><small><small>.000</small></small></small></small>"; //set timer to 00:00:00
|
||||
}
|
||||
}
|
||||
} else { //if isPaused = false
|
||||
if (event.button==0) { //left click
|
||||
isPaused = true; //pause current timer
|
||||
}
|
||||
if (event.button==2) { //right click
|
||||
if (isReset) { //is reset
|
||||
isReset = false;
|
||||
start(); //run timer
|
||||
} else { //is running
|
||||
if(x) {clearInterval(x);}
|
||||
isReset = true;
|
||||
document.getElementById("demo").innerHTML = "00:00:00<small><small><small><small>.000</small></small></small></small>"; //set timer to 00:00:00
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Update the count down every 1 second
|
||||
function start(){
|
||||
countDownDate = new Date().getTime();
|
||||
x = setInterval(function() {
|
||||
if (!isPaused) {
|
||||
// Get today's date and time
|
||||
var now = new Date().getTime();
|
||||
|
||||
// Find the distance between now and the count down date
|
||||
var distance = now - countDownDate ;
|
||||
|
||||
// Time calculations for days, hours, minutes and seconds
|
||||
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
||||
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
||||
var milliseconds = Math.floor((distance % (1000)) );
|
||||
// Output the result in an element with id="demo"
|
||||
document.getElementById("demo").innerHTML = ("00" + hours).slice (-2) + ":" + ("00" + minutes).slice (-2) + ":" + ("00" + seconds).slice (-2) + "<small><small><small><small>." + ("000" + milliseconds).slice (-3)+"</small></small></small></small>";
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
15
misc/youtube.html
Normal file
15
misc/youtube.html
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
<html>
|
||||
<body>
|
||||
<script>
|
||||
fetch("https://steves.app/create_broadcast?alt=json&key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8", { headers: { "Content-Type": "application/json; charset=utf-8" }})
|
||||
.then(res => {
|
||||
res.blob().then (r=> {console.log(r)});
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
382
thirdparty/CodecsHandler.js
vendored
Normal file
382
thirdparty/CodecsHandler.js
vendored
Normal file
@ -0,0 +1,382 @@
|
||||
/*
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2012-2020 [Muaz Khan](https://github.com/muaz-khan)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
// Sourced from: https://cdn.webrtc-experiment.com/CodecsHandler.js
|
||||
var CodecsHandler = (function() {
|
||||
function preferCodec(sdp, codecName) {
|
||||
var info = splitLines(sdp);
|
||||
|
||||
if (!info.videoCodecNumbers) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (codecName === 'vp8' && info.vp8LineNumber === info.videoCodecNumbers[0]) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (codecName === 'vp9' && info.vp9LineNumber === info.videoCodecNumbers[0]) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (codecName === 'h264' && info.h264LineNumber === info.videoCodecNumbers[0]) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
sdp = preferCodecHelper(sdp, codecName, info);
|
||||
|
||||
return sdp;
|
||||
}
|
||||
|
||||
function preferCodecHelper(sdp, codec, info, ignore) {
|
||||
var preferCodecNumber = '';
|
||||
|
||||
if (codec === 'vp8') {
|
||||
if (!info.vp8LineNumber) {
|
||||
return sdp;
|
||||
}
|
||||
preferCodecNumber = info.vp8LineNumber;
|
||||
}
|
||||
|
||||
if (codec === 'vp9') {
|
||||
if (!info.vp9LineNumber) {
|
||||
return sdp;
|
||||
}
|
||||
preferCodecNumber = info.vp9LineNumber;
|
||||
}
|
||||
|
||||
if (codec === 'h264') {
|
||||
if (!info.h264LineNumber) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
preferCodecNumber = info.h264LineNumber;
|
||||
}
|
||||
|
||||
var newLine = info.videoCodecNumbersOriginal.split('SAVPF')[0] + 'SAVPF ';
|
||||
|
||||
var newOrder = [preferCodecNumber];
|
||||
|
||||
if (ignore) {
|
||||
newOrder = [];
|
||||
}
|
||||
|
||||
info.videoCodecNumbers.forEach(function(codecNumber) {
|
||||
if (codecNumber === preferCodecNumber) return;
|
||||
newOrder.push(codecNumber);
|
||||
});
|
||||
|
||||
newLine += newOrder.join(' ');
|
||||
|
||||
sdp = sdp.replace(info.videoCodecNumbersOriginal, newLine);
|
||||
return sdp;
|
||||
}
|
||||
|
||||
function splitLines(sdp) {
|
||||
var info = {};
|
||||
sdp.split('\n').forEach(function(line) {
|
||||
if (line.indexOf('m=video') === 0) {
|
||||
info.videoCodecNumbers = [];
|
||||
line.split('SAVPF')[1].split(' ').forEach(function(codecNumber) {
|
||||
codecNumber = codecNumber.trim();
|
||||
if (!codecNumber || !codecNumber.length) return;
|
||||
info.videoCodecNumbers.push(codecNumber);
|
||||
info.videoCodecNumbersOriginal = line;
|
||||
});
|
||||
}
|
||||
|
||||
if (line.indexOf('VP8/90000') !== -1 && !info.vp8LineNumber) {
|
||||
info.vp8LineNumber = line.replace('a=rtpmap:', '').split(' ')[0];
|
||||
}
|
||||
|
||||
if (line.indexOf('VP9/90000') !== -1 && !info.vp9LineNumber) {
|
||||
info.vp9LineNumber = line.replace('a=rtpmap:', '').split(' ')[0];
|
||||
}
|
||||
|
||||
if (line.indexOf('H264/90000') !== -1 && !info.h264LineNumber) {
|
||||
info.h264LineNumber = line.replace('a=rtpmap:', '').split(' ')[0];
|
||||
}
|
||||
});
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
function removeVPX(sdp) {
|
||||
var info = splitLines(sdp);
|
||||
|
||||
// last parameter below means: ignore these codecs
|
||||
sdp = preferCodecHelper(sdp, 'vp9', info, true);
|
||||
sdp = preferCodecHelper(sdp, 'vp8', info, true);
|
||||
|
||||
return sdp;
|
||||
}
|
||||
|
||||
function disableNACK(sdp) {
|
||||
if (!sdp || typeof sdp !== 'string') {
|
||||
throw 'Invalid arguments.';
|
||||
}
|
||||
|
||||
sdp = sdp.replace('a=rtcp-fb:126 nack\r\n', '');
|
||||
sdp = sdp.replace('a=rtcp-fb:126 nack pli\r\n', 'a=rtcp-fb:126 pli\r\n');
|
||||
sdp = sdp.replace('a=rtcp-fb:97 nack\r\n', '');
|
||||
sdp = sdp.replace('a=rtcp-fb:97 nack pli\r\n', 'a=rtcp-fb:97 pli\r\n');
|
||||
|
||||
return sdp;
|
||||
}
|
||||
|
||||
function prioritize(codecMimeType, peer) {
|
||||
if (!peer || !peer.getSenders || !peer.getSenders().length) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!codecMimeType || typeof codecMimeType !== 'string') {
|
||||
throw 'Invalid arguments.';
|
||||
}
|
||||
|
||||
peer.getSenders().forEach(function(sender) {
|
||||
var params = sender.getParameters();
|
||||
for (var i = 0; i < params.codecs.length; i++) {
|
||||
if (params.codecs[i].mimeType == codecMimeType) {
|
||||
params.codecs.unshift(params.codecs.splice(i, 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
sender.setParameters(params);
|
||||
});
|
||||
}
|
||||
|
||||
function removeNonG722(sdp) {
|
||||
return sdp.replace(/m=audio ([0-9]+) RTP\/SAVPF ([0-9 ]*)/g, 'm=audio $1 RTP\/SAVPF 9');
|
||||
}
|
||||
|
||||
function setBAS(sdp, bandwidth, isScreen) {
|
||||
if (!bandwidth) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (typeof isFirefox !== 'undefined' && isFirefox) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
if (isScreen) {
|
||||
if (!bandwidth.screen) {
|
||||
console.warn('It seems that you are not using bandwidth for screen. Screen sharing is expected to fail.');
|
||||
} else if (bandwidth.screen < 300) {
|
||||
console.warn('It seems that you are using wrong bandwidth value for screen. Screen sharing is expected to fail.');
|
||||
}
|
||||
}
|
||||
|
||||
// if screen; must use at least 300kbs
|
||||
if (bandwidth.screen && isScreen) {
|
||||
sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, '');
|
||||
sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + bandwidth.screen + '\r\n');
|
||||
}
|
||||
|
||||
// remove existing bandwidth lines
|
||||
if (bandwidth.audio || bandwidth.video) {
|
||||
sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, '');
|
||||
}
|
||||
|
||||
if (bandwidth.audio) {
|
||||
sdp = sdp.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:' + bandwidth.audio + '\r\n');
|
||||
}
|
||||
|
||||
if (bandwidth.screen) {
|
||||
sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + bandwidth.screen + '\r\n');
|
||||
} else if (bandwidth.video) {
|
||||
sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + bandwidth.video + '\r\n');
|
||||
}
|
||||
|
||||
return sdp;
|
||||
}
|
||||
|
||||
// Find the line in sdpLines that starts with |prefix|, and, if specified,
|
||||
// contains |substr| (case-insensitive search).
|
||||
function findLine(sdpLines, prefix, substr) {
|
||||
return findLineInRange(sdpLines, 0, -1, prefix, substr);
|
||||
}
|
||||
|
||||
// Find the line in sdpLines[startLine...endLine - 1] that starts with |prefix|
|
||||
// and, if specified, contains |substr| (case-insensitive search).
|
||||
function findLineInRange(sdpLines, startLine, endLine, prefix, substr) {
|
||||
var realEndLine = endLine !== -1 ? endLine : sdpLines.length;
|
||||
for (var i = startLine; i < realEndLine; ++i) {
|
||||
if (sdpLines[i].indexOf(prefix) === 0) {
|
||||
if (!substr ||
|
||||
sdpLines[i].toLowerCase().indexOf(substr.toLowerCase()) !== -1) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// Gets the codec payload type from an a=rtpmap:X line.
|
||||
function getCodecPayloadType(sdpLine) {
|
||||
var pattern = new RegExp('a=rtpmap:(\\d+) \\w+\\/\\d+');
|
||||
var result = sdpLine.match(pattern);
|
||||
return (result && result.length === 2) ? result[1] : null;
|
||||
}
|
||||
|
||||
function setVideoBitrates(sdp, params) {
|
||||
params = params || {};
|
||||
var xgoogle_min_bitrate = params.min;
|
||||
var xgoogle_max_bitrate = params.max;
|
||||
|
||||
var sdpLines = sdp.split('\r\n');
|
||||
|
||||
// VP8
|
||||
var vp8Index = findLine(sdpLines, 'a=rtpmap', 'VP8/90000');
|
||||
var vp8Payload;
|
||||
if (vp8Index) {
|
||||
vp8Payload = getCodecPayloadType(sdpLines[vp8Index]);
|
||||
}
|
||||
|
||||
if (!vp8Payload) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
var rtxIndex = findLine(sdpLines, 'a=rtpmap', 'rtx/90000');
|
||||
var rtxPayload;
|
||||
if (rtxIndex) {
|
||||
rtxPayload = getCodecPayloadType(sdpLines[rtxIndex]);
|
||||
}
|
||||
|
||||
if (!rtxIndex) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
var rtxFmtpLineIndex = findLine(sdpLines, 'a=fmtp:' + rtxPayload.toString());
|
||||
if (rtxFmtpLineIndex !== null) {
|
||||
var appendrtxNext = '\r\n';
|
||||
appendrtxNext += 'a=fmtp:' + vp8Payload + ' x-google-min-bitrate=' + (xgoogle_min_bitrate || '228') + '; x-google-max-bitrate=' + (xgoogle_max_bitrate || '228');
|
||||
sdpLines[rtxFmtpLineIndex] = sdpLines[rtxFmtpLineIndex].concat(appendrtxNext);
|
||||
sdp = sdpLines.join('\r\n');
|
||||
}
|
||||
|
||||
return sdp;
|
||||
}
|
||||
|
||||
function setOpusAttributes(sdp, params) {
|
||||
params = params || {};
|
||||
|
||||
var sdpLines = sdp.split('\r\n');
|
||||
|
||||
// Opus
|
||||
var opusIndex = findLine(sdpLines, 'a=rtpmap', 'opus/48000');
|
||||
var opusPayload;
|
||||
if (opusIndex) {
|
||||
opusPayload = getCodecPayloadType(sdpLines[opusIndex]);
|
||||
}
|
||||
|
||||
if (!opusPayload) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
var opusFmtpLineIndex = findLine(sdpLines, 'a=fmtp:' + opusPayload.toString());
|
||||
if (opusFmtpLineIndex === null) {
|
||||
return sdp;
|
||||
}
|
||||
|
||||
var appendOpusNext = '';
|
||||
appendOpusNext += '; stereo=' + (typeof params.stereo != 'undefined' ? params.stereo : '1');
|
||||
appendOpusNext += '; sprop-stereo=' + (typeof params['sprop-stereo'] != 'undefined' ? params['sprop-stereo'] : '1');
|
||||
|
||||
if (typeof params.maxaveragebitrate != 'undefined') {
|
||||
appendOpusNext += '; maxaveragebitrate=' + (params.maxaveragebitrate || 128 * 1024 * 8);
|
||||
}
|
||||
|
||||
if (typeof params.maxplaybackrate != 'undefined') {
|
||||
appendOpusNext += '; maxplaybackrate=' + (params.maxplaybackrate || 128 * 1024 * 8);
|
||||
}
|
||||
|
||||
if (typeof params.cbr != 'undefined') {
|
||||
appendOpusNext += '; cbr=' + (typeof params.cbr != 'undefined' ? params.cbr : '1');
|
||||
}
|
||||
|
||||
if (typeof params.useinbandfec != 'undefined') {
|
||||
appendOpusNext += '; useinbandfec=' + params.useinbandfec;
|
||||
}
|
||||
|
||||
if (typeof params.usedtx != 'undefined') {
|
||||
appendOpusNext += '; usedtx=' + params.usedtx;
|
||||
}
|
||||
|
||||
if (typeof params.maxptime != 'undefined') {
|
||||
appendOpusNext += '\r\na=maxptime:' + params.maxptime;
|
||||
}
|
||||
|
||||
sdpLines[opusFmtpLineIndex] = sdpLines[opusFmtpLineIndex].concat(appendOpusNext);
|
||||
|
||||
sdp = sdpLines.join('\r\n');
|
||||
return sdp;
|
||||
}
|
||||
|
||||
// forceStereoAudio => via webrtcexample.com
|
||||
// requires getUserMedia => echoCancellation:false
|
||||
function forceStereoAudio(sdp) {
|
||||
var sdpLines = sdp.split('\r\n');
|
||||
var fmtpLineIndex = null;
|
||||
for (var i = 0; i < sdpLines.length; i++) {
|
||||
if (sdpLines[i].search('opus/48000') !== -1) {
|
||||
var opusPayload = extractSdp(sdpLines[i], /:(\d+) opus\/48000/i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < sdpLines.length; i++) {
|
||||
if (sdpLines[i].search('a=fmtp') !== -1) {
|
||||
var payload = extractSdp(sdpLines[i], /a=fmtp:(\d+)/);
|
||||
if (payload === opusPayload) {
|
||||
fmtpLineIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fmtpLineIndex === null) return sdp;
|
||||
sdpLines[fmtpLineIndex] = sdpLines[fmtpLineIndex].concat('; stereo=1; sprop-stereo=1');
|
||||
sdp = sdpLines.join('\r\n');
|
||||
return sdp;
|
||||
}
|
||||
|
||||
return {
|
||||
removeVPX: removeVPX,
|
||||
disableNACK: disableNACK,
|
||||
prioritize: prioritize,
|
||||
removeNonG722: removeNonG722,
|
||||
setApplicationSpecificBandwidth: function(sdp, bandwidth, isScreen) {
|
||||
return setBAS(sdp, bandwidth, isScreen);
|
||||
},
|
||||
setVideoBitrates: function(sdp, params) {
|
||||
return setVideoBitrates(sdp, params);
|
||||
},
|
||||
setOpusAttributes: function(sdp, params) {
|
||||
return setOpusAttributes(sdp, params);
|
||||
},
|
||||
preferVP9: function(sdp) {
|
||||
return preferCodec(sdp, 'vp9');
|
||||
},
|
||||
preferCodec: preferCodec,
|
||||
forceStereoAudio: forceStereoAudio
|
||||
};
|
||||
})();
|
||||
|
||||
// backward compatibility
|
||||
window.BandwidthHandler = CodecsHandler;
|
||||
18
thirdparty/qrcode.min.js
vendored
Normal file
18
thirdparty/qrcode.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
42
translations/en_ca.json
Normal file
42
translations/en_ca.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"GO": "GO",
|
||||
"add-group-chat": "Add Group Chat to OBS",
|
||||
"add-to-group": "Add to Group Scene",
|
||||
"add-your-camera": "Add your Camera to OBS",
|
||||
"added-notes": "\n\t\t\t\t<u><i>Added Notes:</i></u>\n\t\t\t\t<li>Anyone can enter a room if they know the name, so keep it unique</li>\n\t\t\t\t<li>Having more than four (4) people in a room is not advisable due to performance reasons, but it depends on your hardware.</li>\n\t\t\t\t<li>iOS devices are limited to group sizes of no more than two (2) people. This is a hardware limitation.</li>\n\t\t\t\t<li>The \"Recording\" option is new and is considered experimental.</li>\n\t\t\t\t<li>You must \"Add\" a video feed to the \"Group Scene\" for it to appear there.</li>\n\t\t\t\t<li>There is a new \"enhanced fullscreen\" button added to the Guest's view.</li>\n\t\t\t\t",
|
||||
"advanced-paramaters": "Advanced Parameters",
|
||||
"audio-sources": "Audio Sources",
|
||||
"back": "Back",
|
||||
"balanced": "Balanced",
|
||||
"copy-this-url": "Copy this URL into an OBS \"Browser Source\"",
|
||||
"copy-to-clipboard": "Copy to Clipboard",
|
||||
"create-reusable-invite": "Create Reusable Invite",
|
||||
"enable-stereo-and-pro": "Enable Stereo and Pro HD Audio",
|
||||
"enter-the-rooms-control": "Enter the Room's Control Center",
|
||||
"force-vp9-video-codec": "Force VP9 Video Codec (less artifacting)",
|
||||
"generate-invite-link": "GENERATE THE INVITE LINK",
|
||||
"here-you-can-pre-generate": "Here you can pre-generate a reusable Browser Source link and a related guest invite link.",
|
||||
"high-security-mode": "High Security Mode",
|
||||
"info-blob": "\n\t\t\t\t\t\t<h2>What is OBS.Ninja</h2><br>\n\t\t\t\t\t\t<li>100% <b>free</b>; no downloads; no personal data collection; no sign-in</li>\n\t\t\t\t\t\t<li>Bring video from your smartphone, laptop, computer, or from your friends directly into your OBS video stream</li>\n\t\t\t\t\t\t<li>We use cutting edge Peer-to-Peer forwarding technology that offers privacy and ultra-low latency</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<li>Youtube video <i class=\"fa fa-youtube-play\" aria-hidden=\"true\"></i> <a href=\"https://www.youtube.com/watch?v=6R_sQKxFAhg\">Demoing it here</a> </li>\n\t\t\t\t\t\t<li>Code is available here: <i class=\"fa fa-github\" aria-hidden=\"true\"></i> <a href=\"https://github.com/steveseguin/obsninja\">https://github.com/steveseguin/obsninja</a> </li>\n\t\t\t\t\t\t<li>You can also check out <a href=\"https://steves.app\">my other video app</a> designed for sharing video with friends and family</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<i><font style=\"color:red\">Known issues:</font></i><br>\n\n\t\t\t\t\t\t<li><i class=\"fa fa-apple\" aria-hidden=\"true\"></i> MacOS users need to use OBS v23 or resort to <i>Window Capturing</i> a Chrome Browser with OBS v25</li>\n\t\t\t\t\t\t<li>Some users will have \"pixelation\" problems with videos. Please add the URL parameter <b>&codec=vp9</b> to the OBS Links to correct it.</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\n\t\t\t\t\t\tSite last updated: <a href=\"https://www.reddit.com/r/OBSNinja/comments/gf5pd3/new_version_released_today_along_with_new/\">May 7th, 2020.</a> The previous version can be found at <a href=\"https://obs.ninja/v3/\">https://obs.ninja/v3/</a> if you are having new issues.\n\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t<i></i><h3><i>Check out the <a href=\"https://www.reddit.com/r/OBSNinja/\">sub-reddit</a> <i class=\"fa fa-reddit-alien\" aria-hidden=\"true\"></i> for help and advanced info. I'm also on <a href=\"https://discord.gg/EksyhGA\">Discord</a> and you can email me at steve@seguin.email</i></h3>\n\t\t\t\t\t",
|
||||
"joining-room": "You are joining room",
|
||||
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS.Ninja ",
|
||||
"max-resolution": "Max Resolution",
|
||||
"mute": "Mute",
|
||||
"no-audio": "No Audio",
|
||||
"note-share-audio": "\n\t\t\t\t\t<b>note</b>: Do not forget to click \"Share audio\" in Chrome.<br>(Firefox does not support audio sharing.)",
|
||||
"open-in-new-tab": "Open in new Tab",
|
||||
"record": "Record",
|
||||
"remote-control-for-obs": "Remote Control for OBS",
|
||||
"remote-screenshare-obs": "Remote Screenshare into OBS",
|
||||
"room-name": "Room Name",
|
||||
"rooms-allow-for": "Rooms allow for simplified group-chat and the advanced management of multiple streams at once.",
|
||||
"select-audio-source": "Select Audio Sources",
|
||||
"select-audio-video": "Select the audio/video source below",
|
||||
"select-screen-to-share": "SELECT SCREEN TO SHARE",
|
||||
"show-tips": "Show me some tips..",
|
||||
"smooth-cool": "Smooth and Cool",
|
||||
"unlock-video-bitrate": "Unlock Video Bitrate (20mbps)",
|
||||
"video-source": "Video source",
|
||||
"volume": "Volume",
|
||||
"you-are-in-the-control-center": "You are in the room's control center"
|
||||
}
|
||||
42
translations/en_uk.json
Normal file
42
translations/en_uk.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"GO": "GO",
|
||||
"add-group-chat": "Add Group Chat to OBS",
|
||||
"add-to-group": "Add to Group Scene",
|
||||
"add-your-camera": "Add your Camera to OBS",
|
||||
"added-notes": "\n\t\t\t\t<u><i>Added Notes:</i></u>\n\t\t\t\t<li>Anyone can enter a room if they know the name, so keep it unique</li>\n\t\t\t\t<li>Having more than four (4) people in a room is not advisable due to performance reasons, but it depends on your hardware.</li>\n\t\t\t\t<li>iOS devices are limited to group sizes of no more than two (2) people. This is a hardware limitation.</li>\n\t\t\t\t<li>The \"Recording\" option is new and is considered experimental.</li>\n\t\t\t\t<li>You must \"Add\" a video feed to the \"Group Scene\" for it to appear there.</li>\n\t\t\t\t<li>There is a new \"enhanced fullscreen\" button added to the Guest's view.</li>\n\t\t\t\t",
|
||||
"advanced-paramaters": "Advanced Parameters",
|
||||
"audio-sources": "Audio Sources",
|
||||
"back": "Back",
|
||||
"balanced": "Balanced",
|
||||
"copy-this-url": "Copy this URL into an OBS \"Browser Source\"",
|
||||
"copy-to-clipboard": "Copy to Clipboard",
|
||||
"create-reusable-invite": "Create Reusable Invite",
|
||||
"enable-stereo-and-pro": "Enable Stereo and Pro HD Audio",
|
||||
"enter-the-rooms-control": "Enter the Room's Control Center",
|
||||
"force-vp9-video-codec": "Force VP9 Video Codec (less artifacting)",
|
||||
"generate-invite-link": "GENERATE THE INVITE LINK",
|
||||
"here-you-can-pre-generate": "Here you can pre-generate a reusable Browser Source link and a related guest invite link.",
|
||||
"high-security-mode": "High Security Mode",
|
||||
"info-blob": "\n\t\t\t\t\t\t<h2>What is OBS.Ninja</h2><br>\n\t\t\t\t\t\t<li>100% <b>free</b>; no downloads; no personal data collection; no sign-in</li>\n\t\t\t\t\t\t<li>Bring video from your smartphone, laptop, computer, or from your friends directly into your OBS video stream</li>\n\t\t\t\t\t\t<li>We use cutting edge Peer-to-Peer forwarding technology that offers privacy and ultra-low latency</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<li>Youtube video <i class=\"fa fa-youtube-play\" aria-hidden=\"true\"></i> <a href=\"https://www.youtube.com/watch?v=6R_sQKxFAhg\">Demoing it here</a> </li>\n\t\t\t\t\t\t<li>Code is available here: <i class=\"fa fa-github\" aria-hidden=\"true\"></i> <a href=\"https://github.com/steveseguin/obsninja\">https://github.com/steveseguin/obsninja</a> </li>\n\t\t\t\t\t\t<li>You can also check out <a href=\"https://steves.app\">my other video app</a> designed for sharing video with friends and family</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<i><font style=\"color:red\">Known issues:</font></i><br>\n\n\t\t\t\t\t\t<li><i class=\"fa fa-apple\" aria-hidden=\"true\"></i> MacOS users need to use OBS v23 or resort to <i>Window Capturing</i> a Chrome Browser with OBS v25</li>\n\t\t\t\t\t\t<li>Some users will have \"pixelation\" problems with videos. Please add the URL parameter <b>&codec=vp9</b> to the OBS Links to correct it.</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\n\t\t\t\t\t\tSite last updated: <a href=\"https://www.reddit.com/r/OBSNinja/comments/gf5pd3/new_version_released_today_along_with_new/\">May 7th, 2020.</a> The previous version can be found at <a href=\"https://obs.ninja/v3/\">https://obs.ninja/v3/</a> if you are having new issues.\n\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t<i></i><h3><i>Check out the <a href=\"https://www.reddit.com/r/OBSNinja/\">sub-reddit</a> <i class=\"fa fa-reddit-alien\" aria-hidden=\"true\"></i> for help and advanced info. I'm also on <a href=\"https://discord.gg/EksyhGA\">Discord</a> and you can email me at steve@seguin.email</i></h3>\n\t\t\t\t\t",
|
||||
"joining-room": "You are joining room",
|
||||
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS.Ninja ",
|
||||
"max-resolution": "Max Resolution",
|
||||
"mute": "Mute",
|
||||
"no-audio": "No Audio",
|
||||
"note-share-audio": "\n\t\t\t\t\t<b>note</b>: Do not forget to click \"Share audio\" in Chrome.<br>(Firefox does not support audio sharing.)",
|
||||
"open-in-new-tab": "Open in new Tab",
|
||||
"record": "Record",
|
||||
"remote-control-for-obs": "Remote Control for OBS",
|
||||
"remote-screenshare-obs": "Remote Screenshare into OBS",
|
||||
"room-name": "Room Name",
|
||||
"rooms-allow-for": "Rooms allow for simplified group-chat and the advanced management of multiple streams at once.",
|
||||
"select-audio-source": "Select Audio Sources",
|
||||
"select-audio-video": "Select the audio/video source below",
|
||||
"select-screen-to-share": "SELECT SCREEN TO SHARE",
|
||||
"show-tips": "Show me some tips..",
|
||||
"smooth-cool": "Smooth and Cool",
|
||||
"unlock-video-bitrate": "Unlock Video Bitrate (20mbps)",
|
||||
"video-source": "Video source",
|
||||
"volume": "Volume",
|
||||
"you-are-in-the-control-center": "You are in the room's control center"
|
||||
}
|
||||
42
translations/en_us.json
Normal file
42
translations/en_us.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"GO": "GO",
|
||||
"add-group-chat": "Add Group Chat to OBS",
|
||||
"add-to-group": "Add to Group Scene",
|
||||
"add-your-camera": "Add your Camera to OBS",
|
||||
"added-notes": "\n\t\t\t\t<u><i>Added Notes:</i></u>\n\t\t\t\t<li>Anyone can enter a room if they know the name, so keep it unique</li>\n\t\t\t\t<li>Having more than four (4) people in a room is not advisable due to performance reasons, but it depends on your hardware.</li>\n\t\t\t\t<li>iOS devices are limited to group sizes of no more than two (2) people. This is a hardware limitation.</li>\n\t\t\t\t<li>The \"Recording\" option is new and is considered experimental.</li>\n\t\t\t\t<li>You must \"Add\" a video feed to the \"Group Scene\" for it to appear there.</li>\n\t\t\t\t<li>There is a new \"enhanced fullscreen\" button added to the Guest's view.</li>\n\t\t\t\t",
|
||||
"advanced-paramaters": "Advanced Parameters",
|
||||
"audio-sources": "Audio Sources",
|
||||
"back": "Back",
|
||||
"balanced": "Balanced",
|
||||
"copy-this-url": "Copy this URL into an OBS \"Browser Source\"",
|
||||
"copy-to-clipboard": "Copy to Clipboard",
|
||||
"create-reusable-invite": "Create Reusable Invite",
|
||||
"enable-stereo-and-pro": "Enable Stereo and Pro HD Audio",
|
||||
"enter-the-rooms-control": "Enter the Room's Control Center",
|
||||
"force-vp9-video-codec": "Force VP9 Video Codec (less artifacting)",
|
||||
"generate-invite-link": "GENERATE THE INVITE LINK",
|
||||
"here-you-can-pre-generate": "Here you can pre-generate a reusable Browser Source link and a related guest invite link.",
|
||||
"high-security-mode": "High Security Mode",
|
||||
"info-blob": "\n\t\t\t\t\t\t<h2>What is OBS.Ninja</h2><br>\n\t\t\t\t\t\t<li>100% <b>free</b>; no downloads; no personal data collection; no sign-in</li>\n\t\t\t\t\t\t<li>Bring video from your smartphone, laptop, computer, or from your friends directly into your OBS video stream</li>\n\t\t\t\t\t\t<li>We use cutting edge Peer-to-Peer forwarding technology that offers privacy and ultra-low latency</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<li>Youtube video <i class=\"fa fa-youtube-play\" aria-hidden=\"true\"></i> <a href=\"https://www.youtube.com/watch?v=6R_sQKxFAhg\">Demoing it here</a> </li>\n\t\t\t\t\t\t<li>Code is available here: <i class=\"fa fa-github\" aria-hidden=\"true\"></i> <a href=\"https://github.com/steveseguin/obsninja\">https://github.com/steveseguin/obsninja</a> </li>\n\t\t\t\t\t\t<li>You can also check out <a href=\"https://steves.app\">my other video app</a> designed for sharing video with friends and family</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<i><font style=\"color:red\">Known issues:</font></i><br>\n\n\t\t\t\t\t\t<li><i class=\"fa fa-apple\" aria-hidden=\"true\"></i> MacOS users need to use OBS v23 or resort to <i>Window Capturing</i> a Chrome Browser with OBS v25</li>\n\t\t\t\t\t\t<li>Some users will have \"pixelation\" problems with videos. Please add the URL parameter <b>&codec=vp9</b> to the OBS Links to correct it.</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\n\t\t\t\t\t\tSite last updated: <a href=\"https://www.reddit.com/r/OBSNinja/comments/gf5pd3/new_version_released_today_along_with_new/\">May 7th, 2020.</a> The previous version can be found at <a href=\"https://obs.ninja/v3/\">https://obs.ninja/v3/</a> if you are having new issues.\n\n\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t<i></i><h3><i>Check out the <a href=\"https://www.reddit.com/r/OBSNinja/\">sub-reddit</a> <i class=\"fa fa-reddit-alien\" aria-hidden=\"true\"></i> for help and advanced info. I'm also on <a href=\"https://discord.gg/EksyhGA\">Discord</a> and you can email me at steve@seguin.email</i></h3>\n\t\t\t\t\t",
|
||||
"joining-room": "You are joining room",
|
||||
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS.Ninja ",
|
||||
"max-resolution": "Max Resolution",
|
||||
"mute": "Mute",
|
||||
"no-audio": "No Audio",
|
||||
"note-share-audio": "\n\t\t\t\t\t<b>note</b>: Do not forget to click \"Share audio\" in Chrome.<br>(Firefox does not support audio sharing.)",
|
||||
"open-in-new-tab": "Open in new Tab",
|
||||
"record": "Record",
|
||||
"remote-control-for-obs": "Remote Control for OBS",
|
||||
"remote-screenshare-obs": "Remote Screenshare into OBS",
|
||||
"room-name": "Room Name",
|
||||
"rooms-allow-for": "Rooms allow for simplified group-chat and the advanced management of multiple streams at once.",
|
||||
"select-audio-source": "Select Audio Sources",
|
||||
"select-audio-video": "Select the audio/video source below",
|
||||
"select-screen-to-share": "SELECT SCREEN TO SHARE",
|
||||
"show-tips": "Show me some tips..",
|
||||
"smooth-cool": "Smooth and Cool",
|
||||
"unlock-video-bitrate": "Unlock Video Bitrate (20mbps)",
|
||||
"video-source": "Video source",
|
||||
"volume": "Volume",
|
||||
"you-are-in-the-control-center": "You are in the room's control center"
|
||||
}
|
||||
42
translations/fr_ca.json
Normal file
42
translations/fr_ca.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"logo-header": "<font id=\"qos\" style=\"color: white;\">O</font>BS.Ninja ",
|
||||
"GO": "Aller",
|
||||
"add-group-chat": "Conversation de groupe",
|
||||
"add-to-group": "Ajouter à la scène de groupe",
|
||||
"add-your-camera": "Ajoutez votre caméra à OBS",
|
||||
"added-notes": "\n\t\t\t\t<u><i>Added Notes:</i></u>\n\t\t\t\t<li>N'importe qui peut entrer dans une pièce s'il connaît le nom, alors gardez-le unique</li>\n\t\t\t\t<li>Il n'est pas conseillé d'avoir plus de quatre (4) personnes dans une pièce pour des raisons de performances, mais cela dépend de votre matériel.</li>\n\t\t\t\t<li>Les appareils iOS sont limités à des groupes de deux (2) personnes maximum. Il s'agit d'une limitation matérielle.</li>\n\t\t\t\t\n\t\t\t\t",
|
||||
"advanced-paramaters": "Paramètres avancés",
|
||||
"audio-sources": "Sources audio",
|
||||
"back": "Retour",
|
||||
"balanced": "Équilibré",
|
||||
"copy-this-url": "Copiez cette URL dans un OBS \"Browser Source\"",
|
||||
"copy-to-clipboard": "Copier dans le presse-papier",
|
||||
"create-reusable-invite": "Créer une invitation réutilisable",
|
||||
"enable-stereo-and-pro": "Activer l'audio stéréo et Pro HD",
|
||||
"enter-the-rooms-control": "Entrez dans le centre de contrôle de la pièce",
|
||||
"force-vp9-video-codec": "Forcer le codec vidéo VP9",
|
||||
"generate-invite-link": "GÉNÉRER LE LIEN D'INVITATION",
|
||||
"here-you-can-pre-generate": "Ici, vous pouvez pré-générer un lien de source de navigateur réutilisable et un lien d'invitation d'invité associé.",
|
||||
"high-security-mode": "Mode haute sécurité",
|
||||
"info-blob": "\n\t\t\t\t\t\t<h2>Qu'est-ce que OBS.Ninja</h2><br>\n\t\t\t\t\t\t<li>100% <b> gratuit </b>; aucun téléchargement; aucune collecte de données personnelles; pas de connexion</li>\n\t\t\t\t\t\t<li>Importez des vidéos de votre smartphone, ordinateur portable, ordinateur ou de vos amis directement dans votre flux vidéo OBS</li>\n\t\t\t\t\t\t<li>Nous utilisons une technologie de transfert Peer-to-Peer de pointe qui offre une confidentialité et une latence ultra-faible</li>\n\t\t\t\t\t\t<br>\n\t\t\t\t\t\t<li>Youtube video <i class=\"fa fa-youtube-play\" aria-hidden=\"true\"></i> <a href=\"https://www.youtube.com/watch?v=6R_sQKxFAhg\">Démonstration ici</a> </li>\n\t\t\t\t\t\t<li>Le code est disponible ici: <i class=\"fa fa-github\" aria-hidden=\"true\"></i> <a href=\"https://github.com/steveseguin/obsninja\">https://github.com/steveseguin/obsninja</a> </li>\n\t\t\t\t\t\t<h3>\n\t\t\t\t\t<i>Découvrez le <a href=\"https://www.reddit.com/r/OBSNinja/\">sub-reddit</a> <i class=\"fa fa-reddit-alien\" aria-hidden=\"true\"></i> pour de l'aide et des informations avancées.</i></h3>",
|
||||
"joining-room": "Vous rejoignez la salle",
|
||||
"max-resolution": "Résolution max",
|
||||
"mute": "Mute",
|
||||
"no-audio": "Pas de son",
|
||||
"note-share-audio": "\n\t\t\t\t\t<b>note</b>: N'oubliez pas de cliquer sur Partager l'audio dans Chrome.<br>(Firefox ne prend pas en charge le partage audio.)",
|
||||
"open-in-new-tab": "Ouvrir dans un nouvel onglet",
|
||||
"record": "Record",
|
||||
"remote-control-for-obs": "Télécommande pour OBS",
|
||||
"remote-screenshare-obs": "Partage d'écran à distance dans OBS",
|
||||
"room-name": "Nom de la salle",
|
||||
"rooms-allow-for": "Les salles permettent une conversation de groupe simplifiée et la gestion avancée de plusieurs flux à la fois.",
|
||||
"select-audio-source": "Sélectionnez les sources audio",
|
||||
"select-audio-video": "Sélectionnez la source audio / vidéo ci-dessous",
|
||||
"select-screen-to-share": "CHOISIR L'ÉCRAN À PARTAGER",
|
||||
"show-tips": "Montrez-moi quelques conseils ..",
|
||||
"smooth-cool": "Lisse et frais",
|
||||
"unlock-video-bitrate": "Déverrouiller le débit vidéo (20 Mbps)",
|
||||
"video-source": "Source vidéo",
|
||||
"volume": "Volume",
|
||||
"you-are-in-the-control-center": "Vous êtes dans le centre de contrôle de la pièce"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user