mirror of https://github.com/OpenVidu/openvidu.git
openvidu-demo project removed
parent
6b8df5ef57
commit
e400a90942
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
"directory" : "static/bower_components"
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
|
@ -1 +0,0 @@
|
|||
/target/
|
|
@ -1,35 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>kurento-room-demo</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,6 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
|
@ -1,5 +0,0 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
|
@ -1,4 +0,0 @@
|
|||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
|
@ -1,202 +0,0 @@
|
|||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,13 +0,0 @@
|
|||
(C) Copyright 2016 Kurento (http://kurento.org)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,125 +0,0 @@
|
|||
[](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
[](http://doc-kurento-room.readthedocs.org/en/latest/)
|
||||
[](https://hub.docker.com/r/fiware/stream-oriented-kurento/)
|
||||
[](http://stackoverflow.com/questions/tagged/kurento)
|
||||
|
||||
[![][KurentoImage]][Kurento]
|
||||
|
||||
Copyright © 2013-2016 [Kurento]. Licensed under [Apache 2.0 License].
|
||||
|
||||
kurento-room-demo
|
||||
=================
|
||||
|
||||
Kurento Room Demo implements the group communications with WebRTC using
|
||||
services from Kurento Room Server.
|
||||
|
||||
The client-side implementation of this demo application is an AngularJS module
|
||||
that uses the KurentoRoom.js library from the room server package.
|
||||
It also integrates the room server's Spring application for the server-side
|
||||
of the Room API. This API is made up of the Room SDK and the signaling
|
||||
component. For client-server communications the API uses JSON-RPC messages
|
||||
over WebSockets.
|
||||
|
||||
|
||||
What is Kurento
|
||||
---------------
|
||||
|
||||
Kurento is an open source software project providing a platform suitable
|
||||
for creating modular applications with advanced real-time communication
|
||||
capabilities. For knowing more about Kurento, please visit the Kurento
|
||||
project website: http://www.kurento.org.
|
||||
|
||||
Kurento is part of [FIWARE]. For further information on the relationship of
|
||||
FIWARE and Kurento check the [Kurento FIWARE Catalog Entry]
|
||||
|
||||
Kurento is part of the [NUBOMEDIA] research initiative.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
The Kurento project provides detailed [documentation] including tutorials,
|
||||
installation and development guides. A simplified version of the documentation
|
||||
can be found on [readthedocs.org]. The [Open API specification] a.k.a. Kurento
|
||||
Protocol is also available on [apiary.io].
|
||||
|
||||
Source
|
||||
------
|
||||
|
||||
Code for other Kurento projects can be found in the [GitHub Kurento Group].
|
||||
|
||||
News and Website
|
||||
----------------
|
||||
|
||||
Check the [Kurento blog]
|
||||
Follow us on Twitter @[kurentoms].
|
||||
|
||||
Issue tracker
|
||||
-------------
|
||||
|
||||
Issues and bug reports should be posted to the [GitHub Kurento bugtracker]
|
||||
|
||||
Licensing and distribution
|
||||
--------------------------
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
Contribution policy
|
||||
-------------------
|
||||
|
||||
You can contribute to the Kurento community through bug-reports, bug-fixes, new
|
||||
code or new documentation. For contributing to the Kurento community, drop a
|
||||
post to the [Kurento Public Mailing List] providing full information about your
|
||||
contribution and its value. In your contributions, you must comply with the
|
||||
following guidelines
|
||||
|
||||
* You must specify the specific contents of your contribution either through a
|
||||
detailed bug description, through a pull-request or through a patch.
|
||||
* You must specify the licensing restrictions of the code you contribute.
|
||||
* For newly created code to be incorporated in the Kurento code-base, you must
|
||||
accept Kurento to own the code copyright, so that its open source nature is
|
||||
guaranteed.
|
||||
* You must justify appropriately the need and value of your contribution. The
|
||||
Kurento project has no obligations in relation to accepting contributions
|
||||
from third parties.
|
||||
* The Kurento project leaders have the right of asking for further
|
||||
explanations, tests or validations of any code contributed to the community
|
||||
before it being incorporated into the Kurento code-base. You must be ready to
|
||||
addressing all these kind of concerns before having your code approved.
|
||||
|
||||
Support
|
||||
-------
|
||||
|
||||
The Kurento project provides community support through the [Kurento Public
|
||||
Mailing List] and through [StackOverflow] using the tags *kurento* and
|
||||
*fiware-kurento*.
|
||||
|
||||
Before asking for support, please read first the [Kurento Netiquette Guidelines]
|
||||
|
||||
[documentation]: http://www.kurento.org/documentation
|
||||
[FIWARE]: http://www.fiware.org
|
||||
[GitHub Kurento bugtracker]: https://github.com/Kurento/bugtracker/issues
|
||||
[GitHub Kurento Group]: https://github.com/kurento
|
||||
[kurentoms]: http://twitter.com/kurentoms
|
||||
[Kurento]: http://kurento.org
|
||||
[Kurento Blog]: http://www.kurento.org/blog
|
||||
[Kurento FIWARE Catalog Entry]: http://catalogue.fiware.org/enablers/stream-oriented-kurento
|
||||
[Kurento Netiquette Guidelines]: http://www.kurento.org/blog/kurento-netiquette-guidelines
|
||||
[Kurento Public Mailing list]: https://groups.google.com/forum/#!forum/kurento
|
||||
[KurentoImage]: https://secure.gravatar.com/avatar/21a2a12c56b2a91c8918d5779f1778bf?s=120
|
||||
[Apache 2.0 License]: http://www.apache.org/licenses/LICENSE-2.0
|
||||
[NUBOMEDIA]: http://www.nubomedia.eu
|
||||
[StackOverflow]: http://stackoverflow.com/search?q=kurento
|
||||
[Read-the-docs]: http://read-the-docs.readthedocs.org/
|
||||
[readthedocs.org]: http://kurento.readthedocs.org/
|
||||
[Open API specification]: http://kurento.github.io/doc-kurento/
|
||||
[apiary.io]: http://docs.streamoriented.apiary.io/
|
|
@ -1,35 +0,0 @@
|
|||
[](http://www.apache.org/licenses/LICENSE-2.0)
|
||||
[](http://doc-kurento.readthedocs.org/en/latest/)
|
||||
[](https://hub.docker.com/r/fiware/stream-oriented-kurento/)
|
||||
[](http://stackoverflow.com/questions/tagged/kurento)
|
||||
|
||||
${project.name}
|
||||
======================
|
||||
|
||||
The ${project.name} implements multimedia group communications with WebRTC using services from
|
||||
Kurento Room Server.
|
||||
|
||||
There are complete instructions on how to deploy the demo binary:
|
||||
http://doc-kurento-room.readthedocs.org/en/current/demo_deployment.html
|
||||
|
||||
Installation instructions
|
||||
-------------------------
|
||||
|
||||
By running `sudo ./bin/install.sh`, the jar file containing the demo will be copied into
|
||||
_/var/lib/kurento_, and the startup script will be put in _/etc/init.d/${project.artifactId}_. Once
|
||||
the demo is installed, it can be managed as a regular service with
|
||||
|
||||
```
|
||||
sudo service ${project.artifactId} {start|stop|restart}
|
||||
```
|
||||
If you want to change the port, you can do so by editing the file _/etc/kurento/${project.artifactId}.properties_.
|
||||
|
||||
Quick start instructions
|
||||
------------------------
|
||||
|
||||
By running `./bin/start.sh` the jar file containing the demo will be started right away, from the
|
||||
_files/_ folder.
|
||||
|
||||
Press `Control-C` to stop its execution.
|
||||
|
||||
If you want to change the port, you can do so by editing the file _files/${project.artifactId}.properties_.
|
|
@ -1,50 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# ${project.description} installer for Ubuntu >= 14.04
|
||||
if [ `id -u` -ne 0 ]; then
|
||||
echo ""
|
||||
echo "Only root can install Kurento"
|
||||
echo ""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing kurento-room-sfu-demo"
|
||||
|
||||
APP_HOME=$(dirname $(dirname $(readlink -f $0)))
|
||||
APP_NAME=${project.artifactId}
|
||||
|
||||
useradd -d /var/kurento/ kurento
|
||||
|
||||
SYSTEMD=$(pidof systemd && echo "systemd" || echo "other")
|
||||
|
||||
# Install binaries
|
||||
mkdir -p /var/lib/kurento
|
||||
chown kurento /var/lib/kurento
|
||||
install -o kurento -g root $APP_HOME/lib/$APP_NAME.jar /var/lib/kurento/
|
||||
install -o kurento -g root $APP_HOME/config/$APP_NAME.conf /var/lib/kurento/
|
||||
install -o kurento -g root $APP_HOME/config/$APP_NAME.properties /var/lib/kurento/
|
||||
install -o kurento -g root $APP_HOME/support-files/keystore.jks /var/lib/kurento/
|
||||
ln -s /var/lib/kurento/$APP_NAME.jar /etc/init.d/$APP_NAME
|
||||
chmod 755 /etc/init.d/$APP_NAME
|
||||
|
||||
mkdir -p /etc/kurento/
|
||||
install -o kurento -g root $APP_HOME/config/app.conf.json /etc/kurento/$APP_NAME.conf.json
|
||||
install -o kurento -g root $APP_HOME/support-files/log4j.properties /etc/kurento/$APP_NAME-log4j.properties
|
||||
|
||||
mkdir -p /var/log/kurento
|
||||
chown kurento /var/log/kurento
|
||||
|
||||
|
||||
if [[ "$SYSTEMD" != "other" ]]; then
|
||||
install -o root -g root $APP_HOME/support-files/systemd.service /etc/systemd/system/$APP_NAME.service
|
||||
sudo systemctl daemon-reload
|
||||
# enable at startup
|
||||
[ -z "$NOENABLE" ] && systemctl enable $APP_NAME || echo "App not enabled"
|
||||
# start service
|
||||
[ -z "$NOSTART" ] && systemctl start $APP_NAME || echo "App not started"
|
||||
else
|
||||
# enable at startup
|
||||
[ -z "$NOENABLE" ] && update-rc.d $APP_NAME defaults || echo "App not enabled"
|
||||
# start service
|
||||
[ -z "$NOSTART" ] && service $APP_NAME start || echo "App not started"
|
||||
fi
|
|
@ -1,50 +0,0 @@
|
|||
{
|
||||
"kms": {
|
||||
"uris": ["ws://localhost:8888/kurento", "ws://127.0.0.1:8888/kurento"]
|
||||
},
|
||||
"app": {
|
||||
//has to accessible from the KMS in order to load filter imgs
|
||||
"uri": "https://localhost:8443/"
|
||||
},
|
||||
"kurento": {
|
||||
"client": {
|
||||
//milliseconds
|
||||
"requestTimeout": 20000
|
||||
}
|
||||
},
|
||||
"demo": {
|
||||
//marker or hat
|
||||
"filterType" : "marker",
|
||||
|
||||
//markerdetector img(s) in order of preference
|
||||
"markerUrls": {
|
||||
"0": "kurento-rect-logo.png",
|
||||
"1": "twi-logo.png"
|
||||
},
|
||||
|
||||
//mario-wings.png or wizard.png
|
||||
"hatUrl": "mario-wings.png",
|
||||
"hatCoords": {
|
||||
// mario-wings hat
|
||||
"offsetXPercent": -0.35F,
|
||||
"offsetYPercent": -1.2F,
|
||||
"widthPercent": 1.6F,
|
||||
"heightPercent": 1.6F
|
||||
|
||||
//wizard hat
|
||||
//"offsetXPercent": -0.2F,
|
||||
//"offsetYPercent": -1.35F,
|
||||
//"widthPercent": 1.5F,
|
||||
//"heightPercent": 1.5F
|
||||
},
|
||||
"loopback" : {
|
||||
"remote": true,
|
||||
//matters only when remote is true
|
||||
"andLocal": false
|
||||
},
|
||||
"authRegex": ".*",
|
||||
"kmsLimit": 1000
|
||||
},
|
||||
"updateSpeakerInterval": 1800,
|
||||
"thresholdSpeaker": -50
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
APP_NAME=${project.artifactId}
|
||||
LOG_FOLDER=/var/log/kurento
|
||||
LOG_FILENAME=boot.log
|
||||
JAVA_OPTS="-Dspring.config.location=file:/var/lib/kurento/${project.artifactId}.properties -DconfigFilePath=/etc/kurento/${project.artifactId}.conf.json -Dlogging.config=/etc/kurento/${project.artifactId}-log4j.properties -XX:+HeapDumpOnOutOfMemoryError"
|
|
@ -1,7 +0,0 @@
|
|||
server.port: 8443
|
||||
server.address: 0.0.0.0
|
||||
server.ssl.key-store: keystore.jks
|
||||
server.ssl.key-store-password: kurento
|
||||
server.ssl.keyStoreType: JKS
|
||||
server.ssl.keyAlias: kurento-selfsigned
|
||||
server.context-path: /
|
Binary file not shown.
|
@ -1,17 +0,0 @@
|
|||
log4j.rootLogger=INFO,CONSOLE
|
||||
log4j.logger.org.kurento=DEBUG
|
||||
|
||||
# Appenders
|
||||
log4j.threshold=ALL
|
||||
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %-5p %c [%t] (%F:%L) - %m%n
|
||||
|
||||
log4j.appender.file=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.file.File=${application.log.file}
|
||||
log4j.appender.file.ImmediateFlush=true
|
||||
log4j.appender.file.MaxFileSize=10MB
|
||||
log4j.appender.file.MaxBackupIndex=50
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c{2} (%M(%L)) - %m%n
|
|
@ -1,9 +0,0 @@
|
|||
[Unit]
|
||||
Description=${project.description}
|
||||
|
||||
[Service]
|
||||
User=kurento
|
||||
ExecStart=/var/lib/kurento/${project.artifactId}.jar run
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -1,235 +0,0 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.openvidu</groupId>
|
||||
<artifactId>openvidu</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>openvidu-demo</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>OpenVidu Demo</name>
|
||||
<description>OpenVidu Demo application</description>
|
||||
<url>http://www.kurento.org/docs/${project.version}</url>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<organization>
|
||||
<name>Kurento</name>
|
||||
<url>http://www.kurento.org</url>
|
||||
</organization>
|
||||
|
||||
<scm>
|
||||
<url>${openvidu.scm.url}</url>
|
||||
<connection>scm:git:${openvidu.scm.connection}</connection>
|
||||
<developerConnection>scm:git:${openvidu.scm.connection}</developerConnection>
|
||||
<tag>develop</tag>
|
||||
</scm>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>kurento.org</id>
|
||||
<name>-kurento.org Community</name>
|
||||
<organization>Kurento.org</organization>
|
||||
<organizationUrl>http://www.kurento.org</organizationUrl>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<properties>
|
||||
<!-- Main class -->
|
||||
<start-class>io.openvidu.demo.OpenViduSampleApp</start-class>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.openvidu</groupId>
|
||||
<artifactId>openvidu-server</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.openvidu</groupId>
|
||||
<artifactId>openvidu-browser</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.openvidu</groupId>
|
||||
<artifactId>openvidu-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.kurento.module</groupId>
|
||||
<artifactId>markerdetector</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>webjars-locator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>jquery</artifactId>
|
||||
<version>2.2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>jquery-ui</artifactId>
|
||||
<version>1.11.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>angular</artifactId>
|
||||
<version>1.5.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>angular-route</artifactId>
|
||||
<version>1.5.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>angular-fullscreen</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>material-design-iconic-font</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>lumx</artifactId>
|
||||
<version>0.2.50</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.bower</groupId>
|
||||
<artifactId>angular-clipboard</artifactId>
|
||||
<version>1.4.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- Filtering resources (${label}) -->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>banner.txt</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>${start-class}</mainClass>
|
||||
<layout>ZIP</layout>
|
||||
<executable>true</executable>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Call to bower install when compiling -->
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<mainClass>${start-class}</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptor>src/assembly/bin.xml</descriptor>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<copy
|
||||
file="${project.build.directory}/target/${project.artifactId}-${project.version}-bin.zip"
|
||||
tofile="${project.build.directory}/target/${project.artifactId}-${project.version}.zip" />
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>default</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>integration</id>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
|
@ -1,50 +0,0 @@
|
|||
<assembly
|
||||
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
|
||||
<id>bin</id>
|
||||
<formats>
|
||||
<format>zip</format>
|
||||
</formats>
|
||||
<includeBaseDirectory>false</includeBaseDirectory>
|
||||
|
||||
<files>
|
||||
<file>
|
||||
<source>target/${project.artifactId}-${project.version}.jar</source>
|
||||
<outputDirectory>lib</outputDirectory>
|
||||
<destName>${project.artifactId}.jar</destName>
|
||||
</file>
|
||||
<file>
|
||||
<source>package/config/application.conf</source>
|
||||
<outputDirectory></outputDirectory>
|
||||
<destName>config/${project.artifactId}.conf</destName>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>package/config/application.properties</source>
|
||||
<outputDirectory></outputDirectory>
|
||||
<destName>config/${project.artifactId}.properties</destName>
|
||||
<filtered>true</filtered>
|
||||
</file>
|
||||
<file>
|
||||
<source>package/support-files/keystore.jks</source>
|
||||
<outputDirectory></outputDirectory>
|
||||
<destName>support-files/keystore.jks</destName>
|
||||
<filtered>false</filtered>
|
||||
</file>
|
||||
</files>
|
||||
|
||||
<fileSets>
|
||||
<fileSet>
|
||||
<directory>package</directory>
|
||||
<outputDirectory></outputDirectory>
|
||||
<excludes>
|
||||
<exclude>config/application.conf</exclude>
|
||||
<exclude>config/application.properties</exclude>
|
||||
<exclude>support-files/keystore.jks</exclude>
|
||||
</excludes>
|
||||
<filtered>true</filtered>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</assembly>
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo;
|
||||
|
||||
class ClientConfig {
|
||||
private boolean loopbackRemote;
|
||||
private boolean loopbackAndLocal;
|
||||
private String filterRequestParam;
|
||||
|
||||
public boolean isLoopbackRemote() {
|
||||
return loopbackRemote;
|
||||
}
|
||||
|
||||
public void setLoopbackRemote(boolean loopbackRemote) {
|
||||
this.loopbackRemote = loopbackRemote;
|
||||
}
|
||||
|
||||
public boolean isLoopbackAndLocal() {
|
||||
return loopbackAndLocal;
|
||||
}
|
||||
|
||||
public void setLoopbackAndLocal(boolean loopbackAndLocal) {
|
||||
this.loopbackAndLocal = loopbackAndLocal;
|
||||
}
|
||||
|
||||
public String getFilterRequestParam() {
|
||||
return filterRequestParam;
|
||||
}
|
||||
|
||||
public void setFilterRequestParam(String filterRequestParam) {
|
||||
this.filterRequestParam = filterRequestParam;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("Loopback [remote=").append(loopbackRemote).append(", andLocal=")
|
||||
.append(loopbackAndLocal).append("], filterRequestParam=").append(filterRequestParam);
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
|
@ -1,91 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2016 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package io.openvidu.demo;
|
||||
|
||||
import org.kurento.commons.PropertiesManager;
|
||||
import io.openvidu.client.OpenViduException;
|
||||
import io.openvidu.server.core.NotificationRoomManager;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* Rest controller for the room demo app.
|
||||
*
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
* @since 6.0.0
|
||||
*/
|
||||
@RestController
|
||||
public class DemoController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DemoController.class);
|
||||
|
||||
private final static boolean DEMO_LOOPBACK_REMOTE = PropertiesManager
|
||||
.getProperty("demo.loopback.remote", false);
|
||||
private final static boolean DEMO_LOOPBACK_AND_LOCAL = PropertiesManager
|
||||
.getProperty("demo.loopback.andLocal", false);
|
||||
|
||||
private static ClientConfig config;
|
||||
|
||||
static {
|
||||
config = new ClientConfig();
|
||||
config.setLoopbackRemote(DEMO_LOOPBACK_REMOTE);
|
||||
config.setLoopbackAndLocal(DEMO_LOOPBACK_AND_LOCAL);
|
||||
config.setFilterRequestParam(
|
||||
KmsFilterType.parseType(OpenViduSampleApp.DEMO_FILTER_TYPE).getCustomRequestParam());
|
||||
log.info("Set client config: {}", config);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private NotificationRoomManager roomManager;
|
||||
|
||||
@ResponseStatus(value = HttpStatus.NOT_FOUND)
|
||||
public class ResourceNotFoundException extends RuntimeException {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public ResourceNotFoundException(String msg) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping("/close")
|
||||
public void closeRoom(@RequestParam("room") String room) {
|
||||
log.warn("Trying to close the room '{}'", room);
|
||||
if (!roomManager.getRooms().contains(room)) {
|
||||
log.warn("Unable to close room '{}', not found.", room);
|
||||
throw new ResourceNotFoundException("Room '" + room + "' not found");
|
||||
}
|
||||
try {
|
||||
roomManager.closeRoom(room);
|
||||
} catch (OpenViduException e) {
|
||||
log.warn("Error closing room {}", room, e);
|
||||
throw new ResourceNotFoundException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping("/getClientConfig")
|
||||
public ClientConfig clientConfig() {
|
||||
log.debug("Sending client config {}", config);
|
||||
return config;
|
||||
}
|
||||
}
|
|
@ -1,170 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.SortedMap;
|
||||
|
||||
import org.kurento.client.FaceOverlayFilter;
|
||||
import org.kurento.client.MediaElement;
|
||||
import org.kurento.jsonrpc.Transaction;
|
||||
import org.kurento.jsonrpc.message.Request;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import io.openvidu.server.core.NotificationRoomManager;
|
||||
import io.openvidu.server.core.api.pojo.ParticipantRequest;
|
||||
import io.openvidu.server.rpc.JsonRpcUserControl;
|
||||
|
||||
/**
|
||||
* User control that applies a media filter when publishing video.
|
||||
*
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class DemoJsonRpcUserControl extends JsonRpcUserControl {
|
||||
|
||||
private static final String SESSION_ATTRIBUTE_FILTER = "customFilter";
|
||||
private static final String MARKER_ID = "markerFilterId";
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DemoJsonRpcUserControl.class);
|
||||
|
||||
private KmsFilterType filterType = KmsFilterType.HAT;
|
||||
|
||||
private String hatUrl;
|
||||
private float offsetXPercent;
|
||||
private float offsetYPercent;
|
||||
private float widthPercent;
|
||||
private float heightPercent;
|
||||
|
||||
private SortedMap<Integer, String> markerUrls;
|
||||
|
||||
public DemoJsonRpcUserControl(NotificationRoomManager roomManager) {
|
||||
//super(roomManager);
|
||||
}
|
||||
|
||||
public void setFilterType(KmsFilterType type) {
|
||||
this.filterType = type;
|
||||
}
|
||||
|
||||
public void setHatUrl(String hatUrl) {
|
||||
this.hatUrl = hatUrl;
|
||||
log.info("Hat URL: {}", hatUrl);
|
||||
}
|
||||
|
||||
public void setMarkerUrls(SortedMap<Integer, String> urls) {
|
||||
this.markerUrls = urls;
|
||||
log.info("Marker URL: {}", markerUrls);
|
||||
}
|
||||
|
||||
public void setHatCoords(JsonObject hatCoords) {
|
||||
if (hatCoords.get("offsetXPercent") != null) {
|
||||
offsetXPercent = hatCoords.get("offsetXPercent").getAsFloat();
|
||||
}
|
||||
if (hatCoords.get("offsetYPercent") != null) {
|
||||
offsetYPercent = hatCoords.get("offsetYPercent").getAsFloat();
|
||||
}
|
||||
if (hatCoords.get("widthPercent") != null) {
|
||||
widthPercent = hatCoords.get("widthPercent").getAsFloat();
|
||||
}
|
||||
if (hatCoords.get("heightPercent") != null) {
|
||||
heightPercent = hatCoords.get("heightPercent").getAsFloat();
|
||||
}
|
||||
log.info("Hat coords:\n\toffsetXPercent = {}\n\toffsetYPercent = {}"
|
||||
+ "\n\twidthPercent = {}\n\theightPercent = {}", offsetXPercent, offsetYPercent,
|
||||
widthPercent, heightPercent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customRequest(Transaction transaction, Request<JsonObject> request,
|
||||
ParticipantRequest participantRequest) {
|
||||
try {
|
||||
if (request.getParams() == null
|
||||
|| request.getParams().get(filterType.getCustomRequestParam()) == null) {
|
||||
throw new RuntimeException(
|
||||
"Request element '" + filterType.getCustomRequestParam() + "' is missing");
|
||||
}
|
||||
switch (filterType) {
|
||||
case MARKER:
|
||||
handleMarkerRequest(transaction, request, participantRequest);
|
||||
break;
|
||||
case HAT:
|
||||
default:
|
||||
handleHatRequest(transaction, request, participantRequest);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("Unable to handle custom request", e);
|
||||
try {
|
||||
transaction.sendError(e);
|
||||
} catch (IOException e1) {
|
||||
log.warn("Unable to send error response", e1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void handleHatRequest(Transaction transaction, Request<JsonObject> request,
|
||||
ParticipantRequest participantRequest) throws IOException {
|
||||
boolean filterOn = request.getParams().get(filterType.getCustomRequestParam()).getAsBoolean();
|
||||
String pid = participantRequest.getParticipantId();
|
||||
if (filterOn) {
|
||||
if (transaction.getSession().getAttributes().containsKey(SESSION_ATTRIBUTE_FILTER)) {
|
||||
throw new RuntimeException(filterType + " filter already on");
|
||||
}
|
||||
log.info("Applying {} filter to session {}", filterType, pid);
|
||||
|
||||
FaceOverlayFilter filter =
|
||||
new FaceOverlayFilter.Builder(roomManager.getPipeline(pid)).build();
|
||||
filter.setOverlayedImage(this.hatUrl, this.offsetXPercent, this.offsetYPercent,
|
||||
this.widthPercent, this.heightPercent);
|
||||
|
||||
addFilter(transaction, pid, filter);
|
||||
} else {
|
||||
removeFilter(transaction, pid);
|
||||
}
|
||||
transaction.sendResponse(new JsonObject());
|
||||
}
|
||||
|
||||
private void handleMarkerRequest(final Transaction transaction, Request<JsonObject> request,
|
||||
ParticipantRequest participantRequest) throws IOException {
|
||||
Integer currentUrlIndex =
|
||||
request.getParams().get(filterType.getCustomRequestParam()).getAsInt();
|
||||
String pid = participantRequest.getParticipantId();
|
||||
|
||||
roomManager.updateFilter(roomManager.getRoomManager().getRoomName(pid), MARKER_ID);
|
||||
|
||||
JsonObject result = new JsonObject();
|
||||
// TODO: Change RPC to remove next index requirement
|
||||
// result.addProperty(filterType.getCustomRequestParam(), 0);
|
||||
transaction.sendResponse(result);
|
||||
}
|
||||
|
||||
private void addFilter(Transaction transaction, String pid, MediaElement filter) {
|
||||
roomManager.addMediaElement(pid, filter);
|
||||
transaction.getSession().getAttributes().put(SESSION_ATTRIBUTE_FILTER, filter);
|
||||
}
|
||||
|
||||
private void removeFilter(Transaction transaction, String pid) {
|
||||
if (!transaction.getSession().getAttributes().containsKey(SESSION_ATTRIBUTE_FILTER)) {
|
||||
throw new RuntimeException("This user has no " + filterType + " filter yet");
|
||||
}
|
||||
log.info("Removing {} filter from session {}", filterType, pid);
|
||||
roomManager.removeMediaElement(pid,
|
||||
(MediaElement) transaction.getSession().getAttributes().get(SESSION_ATTRIBUTE_FILTER));
|
||||
transaction.getSession().getAttributes().remove(SESSION_ATTRIBUTE_FILTER);
|
||||
}
|
||||
}
|
|
@ -1,122 +0,0 @@
|
|||
package io.openvidu.demo;
|
||||
|
||||
import java.util.SortedMap;
|
||||
|
||||
import org.kurento.client.Continuation;
|
||||
import org.kurento.client.Filter;
|
||||
import org.kurento.module.markerdetector.ArMarkerdetector;
|
||||
import io.openvidu.client.internal.ProtocolElements;
|
||||
import io.openvidu.server.core.api.UserNotificationService;
|
||||
import io.openvidu.server.core.internal.DefaultNotificationRoomHandler;
|
||||
import io.openvidu.server.core.internal.Participant;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
public class DemoNotificationRoomHandler extends DefaultNotificationRoomHandler {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DemoNotificationRoomHandler.class);
|
||||
private SortedMap<Integer, String> markerUrls;
|
||||
|
||||
private UserNotificationService notifService;
|
||||
|
||||
public DemoNotificationRoomHandler(UserNotificationService notifService) {
|
||||
super(notifService);
|
||||
|
||||
this.notifService = notifService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFilter(String roomName, Participant participant, String filterId,
|
||||
String state) {
|
||||
Integer newState = -1;
|
||||
|
||||
if (state != null) {
|
||||
newState = Integer.parseInt(state);
|
||||
}
|
||||
|
||||
String url = markerUrls.get(newState);
|
||||
|
||||
JsonObject notificationParams = new JsonObject();
|
||||
notificationParams.addProperty("MarkerFilterState", newState);
|
||||
|
||||
notifService.sendNotification(participant.getId(), ProtocolElements.CUSTOM_NOTIFICATION,
|
||||
notificationParams);
|
||||
|
||||
ArMarkerdetector newFilter;
|
||||
Filter filter = participant.getFilterElement(filterId);
|
||||
|
||||
if (filter == null) {
|
||||
newFilter = new ArMarkerdetector.Builder(participant.getPipeline()).build();
|
||||
log.info("New {} filter for participant {}", filterId, participant.getId());
|
||||
participant.addFilterElement(filterId, newFilter);
|
||||
} else {
|
||||
log.info("Reusing {} filter in participant {}", filterId, participant.getId());
|
||||
newFilter = (ArMarkerdetector) filter;
|
||||
}
|
||||
|
||||
if (url != null) {
|
||||
newFilter.setOverlayImage(url, new Continuation<Void>() {
|
||||
@Override
|
||||
public void onSuccess(Void result) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable cause) throws Exception {
|
||||
|
||||
}
|
||||
});
|
||||
newFilter.setOverlayScale(1.0F, new Continuation<Void>() {
|
||||
@Override
|
||||
public void onSuccess(Void result) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable cause) throws Exception {
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
newFilter.setOverlayScale(0.0001F, new Continuation<Void>() {
|
||||
@Override
|
||||
public void onSuccess(Void result) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable cause) throws Exception {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getNextFilterState(String filterId, String oldState) {
|
||||
Integer currentUrlIndex;
|
||||
|
||||
if (oldState == null) {
|
||||
currentUrlIndex = -1;
|
||||
} else {
|
||||
currentUrlIndex = Integer.parseInt(oldState);
|
||||
}
|
||||
|
||||
Integer nextIndex = -1; // disable filter
|
||||
|
||||
if (currentUrlIndex < markerUrls.firstKey()) {
|
||||
nextIndex = markerUrls.firstKey(); // enable filter using first URL
|
||||
} else if (currentUrlIndex < markerUrls.lastKey()) {
|
||||
nextIndex = markerUrls.tailMap(currentUrlIndex + 1).firstKey();
|
||||
}
|
||||
|
||||
return nextIndex.toString();
|
||||
}
|
||||
|
||||
public void setMarkerUrls(SortedMap<Integer, String> markerUrls) {
|
||||
this.markerUrls = markerUrls;
|
||||
}
|
||||
}
|
|
@ -1,129 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.kurento.client.KurentoClient;
|
||||
import org.kurento.jsonrpc.Session;
|
||||
import io.openvidu.client.OpenViduException;
|
||||
import io.openvidu.server.core.internal.DefaultKurentoClientSessionInfo;
|
||||
import io.openvidu.server.kms.Kms;
|
||||
import io.openvidu.server.kms.KmsManager;
|
||||
import io.openvidu.server.kms.MaxWebRtcLoadManager;
|
||||
import io.openvidu.server.rpc.JsonRpcNotificationService;
|
||||
import io.openvidu.server.rpc.ParticipantSession;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* KMS manager for the room demo app.
|
||||
*
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
* @since 6.0.0
|
||||
*/
|
||||
public class FixedNKmsManager extends KmsManager {
|
||||
private static final Logger log = LoggerFactory.getLogger(FixedNKmsManager.class);
|
||||
|
||||
private String authRegex;
|
||||
private static Pattern authPattern = null;
|
||||
|
||||
@Autowired
|
||||
private JsonRpcNotificationService notificationService;
|
||||
|
||||
public FixedNKmsManager(List<String> kmsWsUri) {
|
||||
for (String uri : kmsWsUri) {
|
||||
this.addKms(new Kms(KurentoClient.create(uri), uri));
|
||||
}
|
||||
}
|
||||
|
||||
public FixedNKmsManager(List<String> kmsWsUri, int kmsLoadLimit) {
|
||||
for (String uri : kmsWsUri) {
|
||||
Kms kms = new Kms(KurentoClient.create(uri), uri);
|
||||
kms.setLoadManager(new MaxWebRtcLoadManager(kmsLoadLimit));
|
||||
this.addKms(kms);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void setAuthRegex(String regex) {
|
||||
this.authRegex = regex != null ? regex.trim() : null;
|
||||
if (authRegex != null && !authRegex.isEmpty()) {
|
||||
authPattern = Pattern.compile(authRegex, Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized Kms getKms(DefaultKurentoClientSessionInfo sessionInfo) {
|
||||
String userName = null;
|
||||
String participantId = sessionInfo.getParticipantId();
|
||||
Session session = notificationService.getSession(participantId);
|
||||
if (session != null) {
|
||||
Object sessionValue = session.getAttributes().get(ParticipantSession.SESSION_KEY);
|
||||
if (sessionValue != null) {
|
||||
ParticipantSession participantSession = (ParticipantSession) sessionValue;
|
||||
userName = participantSession.getParticipantName();
|
||||
}
|
||||
}
|
||||
if (userName == null) {
|
||||
log.warn("Unable to find user name in session {}", participantId);
|
||||
throw new OpenViduException(OpenViduException.Code.ROOM_CANNOT_BE_CREATED_ERROR_CODE,
|
||||
"Not enough information");
|
||||
}
|
||||
if (!canCreateRoom(userName)) {
|
||||
throw new OpenViduException(OpenViduException.Code.ROOM_CANNOT_BE_CREATED_ERROR_CODE,
|
||||
"User cannot create a new room");
|
||||
}
|
||||
Kms kms = null;
|
||||
String type = "";
|
||||
boolean hq = isUserHQ(userName);
|
||||
if (hq) {
|
||||
kms = getLessLoadedKms();
|
||||
} else {
|
||||
kms = getNextLessLoadedKms();
|
||||
if (!kms.allowMoreElements()) {
|
||||
kms = getLessLoadedKms();
|
||||
} else {
|
||||
type = "next ";
|
||||
}
|
||||
}
|
||||
if (!kms.allowMoreElements()) {
|
||||
log.debug(
|
||||
"Was trying Kms which has no resources left: highQ={}, " + "{}less loaded KMS, uri={}",
|
||||
hq, type, kms.getUri());
|
||||
throw new OpenViduException(OpenViduException.Code.ROOM_CANNOT_BE_CREATED_ERROR_CODE,
|
||||
"No resources left to create new room");
|
||||
}
|
||||
log.debug("Offering Kms: highQ={}, {}less loaded KMS, uri={}", hq, type, kms.getUri());
|
||||
return kms;
|
||||
}
|
||||
|
||||
private boolean isUserHQ(String userName) {
|
||||
return userName.toLowerCase().startsWith("special");
|
||||
}
|
||||
|
||||
private boolean canCreateRoom(String userName) {
|
||||
if (authPattern == null) {
|
||||
return true;
|
||||
}
|
||||
Matcher m = authPattern.matcher(userName);
|
||||
return m.matches();
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2016 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
package io.openvidu.demo;
|
||||
|
||||
/**
|
||||
* @author Radu Tom Vlad (radutom.vlad@gmail.com)
|
||||
* @since 6.5.1
|
||||
*/
|
||||
public enum KmsFilterType {
|
||||
HAT("hat", "hat"), MARKER("marker", "marker");
|
||||
|
||||
private String typeValue;
|
||||
private String customRequestParam;
|
||||
|
||||
private KmsFilterType(String val, String customRequestParam) {
|
||||
this.typeValue = val;
|
||||
this.customRequestParam = customRequestParam;
|
||||
}
|
||||
|
||||
public String getCustomRequestParam() {
|
||||
return customRequestParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param val
|
||||
* filter type String value, ignoring case
|
||||
* @return the filter type, {@link #HAT} if none found
|
||||
*/
|
||||
public static KmsFilterType parseType(String val) {
|
||||
for (KmsFilterType t : KmsFilterType.values()) {
|
||||
if (t.typeValue.equalsIgnoreCase(val)) {
|
||||
return t;
|
||||
}
|
||||
}
|
||||
return HAT;
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2014 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.kurento.commons.ConfigFileManager;
|
||||
import org.kurento.commons.PropertiesManager;
|
||||
import org.kurento.jsonrpc.JsonUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import io.openvidu.server.OpenViduServer;
|
||||
import io.openvidu.server.core.NotificationRoomManager;
|
||||
import io.openvidu.server.kms.KmsManager;
|
||||
import io.openvidu.server.rpc.JsonRpcUserControl;
|
||||
|
||||
import static org.kurento.commons.PropertiesManager.getPropertyJson;
|
||||
|
||||
/**
|
||||
* Demo application for Kurento Room, extends the Room Server application class. Uses the Room
|
||||
* Client JS library for the web client, which is built with AngularJS and lumx.
|
||||
*
|
||||
* @author Micael Gallego (micael.gallego@gmail.com)
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
* @since 5.0.0
|
||||
*/
|
||||
public class OpenViduSampleApp extends OpenViduServer {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(OpenViduSampleApp.class);
|
||||
|
||||
public final static String KROOMDEMO_CFG_FILENAME = "kurento-room-demo.conf.json";
|
||||
|
||||
private static JsonObject DEFAULT_HAT_COORDS = new JsonObject();
|
||||
private static JsonObject DEFAULT_MARKER_URLS = new JsonObject();
|
||||
|
||||
static {
|
||||
ConfigFileManager.loadConfigFile(KROOMDEMO_CFG_FILENAME);
|
||||
DEFAULT_HAT_COORDS.addProperty("offsetXPercent", -0.35F);
|
||||
DEFAULT_HAT_COORDS.addProperty("offsetYPercent", -1.2F);
|
||||
DEFAULT_HAT_COORDS.addProperty("widthPercent", 1.6F);
|
||||
DEFAULT_HAT_COORDS.addProperty("heightPercent", 1.6F);
|
||||
|
||||
DEFAULT_MARKER_URLS.addProperty("0", "kurento-rect-logo.png");
|
||||
}
|
||||
|
||||
private static final String IMG_FOLDER = "img/";
|
||||
|
||||
private final static String DEFAULT_APP_SERVER_URL =
|
||||
PropertiesManager.getProperty("app.uri", "https://localhost:8443");
|
||||
private final static String APP_SERVER_URL =
|
||||
System.getProperty("app.server.url", DEFAULT_APP_SERVER_URL);
|
||||
|
||||
private final Integer DEMO_KMS_NODE_LIMIT = PropertiesManager.getProperty("demo.kmsLimit", 1000);
|
||||
private final String DEMO_AUTH_REGEX = PropertiesManager.getProperty("demo.authRegex");
|
||||
|
||||
public final static String DEMO_FILTER_TYPE =
|
||||
PropertiesManager.getProperty("demo.filterType", "hat");
|
||||
|
||||
private final String DEMO_HAT_URL =
|
||||
PropertiesManager.getProperty("demo.hatUrl", "mario-wings.png");
|
||||
private final JsonObject DEMO_HAT_COORDS = PropertiesManager
|
||||
.getPropertyJson("demo.hatCoords", DEFAULT_HAT_COORDS.toString(), JsonObject.class);
|
||||
|
||||
private final JsonObject DEMO_MARKER_URLS = PropertiesManager
|
||||
.getPropertyJson("demo.markerUrls", DEFAULT_MARKER_URLS.toString(), JsonObject.class);
|
||||
|
||||
@Override
|
||||
public KmsManager kmsManager() {
|
||||
JsonArray kmsUris = getPropertyJson(OpenViduServer.KMSS_URIS_PROPERTY,
|
||||
OpenViduServer.KMSS_URIS_DEFAULT, JsonArray.class);
|
||||
List<String> kmsWsUris = JsonUtils.toStringList(kmsUris);
|
||||
|
||||
log.info("Configuring Kurento Room Server to use the following kmss: {}", kmsWsUris);
|
||||
|
||||
FixedNKmsManager fixedKmsManager = new FixedNKmsManager(kmsWsUris, DEMO_KMS_NODE_LIMIT);
|
||||
fixedKmsManager.setAuthRegex(DEMO_AUTH_REGEX);
|
||||
log.debug("Authorization regex for new rooms: {}", DEMO_AUTH_REGEX);
|
||||
return fixedKmsManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonRpcUserControl userControl() {
|
||||
DemoJsonRpcUserControl uc = new DemoJsonRpcUserControl(notificationRoomManager());
|
||||
|
||||
KmsFilterType type = KmsFilterType.parseType(DEMO_FILTER_TYPE);
|
||||
log.info("Configuring demo with filter type: {} (parsed is {})", DEMO_FILTER_TYPE, type);
|
||||
|
||||
uc.setFilterType(type);
|
||||
|
||||
switch (type) {
|
||||
case MARKER:
|
||||
SortedMap<Integer, String> sortedUrls = new TreeMap<>();
|
||||
getMarkerUrls(sortedUrls);
|
||||
uc.setMarkerUrls(sortedUrls);
|
||||
break;
|
||||
case HAT:
|
||||
default:
|
||||
uc.setHatUrl(getFullUrl(DEMO_HAT_URL));
|
||||
uc.setHatCoords(DEMO_HAT_COORDS);
|
||||
}
|
||||
|
||||
return uc;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public NotificationRoomManager notificationRoomManager() {
|
||||
DemoNotificationRoomHandler notificationRoomHandler =
|
||||
new DemoNotificationRoomHandler(notificationService());
|
||||
|
||||
KmsFilterType type = KmsFilterType.parseType(DEMO_FILTER_TYPE);
|
||||
|
||||
switch (type) {
|
||||
case MARKER:
|
||||
SortedMap<Integer, String> sortedUrls = new TreeMap<>();
|
||||
getMarkerUrls(sortedUrls);
|
||||
|
||||
notificationRoomHandler.setMarkerUrls(sortedUrls);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
return new NotificationRoomManager();
|
||||
}
|
||||
|
||||
private void getMarkerUrls(SortedMap<Integer, String> sortedUrls) {
|
||||
for (Entry<String, JsonElement> entry : DEMO_MARKER_URLS.entrySet()) {
|
||||
try {
|
||||
Integer order = Integer.parseInt(entry.getKey());
|
||||
if (order < 0) {
|
||||
throw new Exception("Illegal configuration, marker url index has to be positive");
|
||||
}
|
||||
String url = entry.getValue().getAsString();
|
||||
sortedUrls.put(order, getFullUrl(url));
|
||||
} catch (Exception e) {
|
||||
log.warn("Unable to process marker url [{}] from config file {}", entry,
|
||||
KROOMDEMO_CFG_FILENAME, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static String getFullUrl(String url) {
|
||||
if (APP_SERVER_URL.endsWith("/")) {
|
||||
return APP_SERVER_URL + IMG_FOLDER + url;
|
||||
} else {
|
||||
return APP_SERVER_URL + "/" + IMG_FOLDER + url;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
log.info("Using /dev/urandom for secure random generation");
|
||||
System.setProperty("java.security.egd", "file:/dev/./urandom");
|
||||
SpringApplication.run(OpenViduSampleApp.class, args);
|
||||
}
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
server.port: 8443
|
||||
server.address: 0.0.0.0
|
||||
server.ssl.key-store: classpath:keystore.jks
|
||||
server.ssl.key-store-password: kurento
|
||||
server.ssl.keyStoreType: JKS
|
||||
server.ssl.keyAlias: kurento-selfsigned
|
||||
server.context-path: /
|
||||
|
||||
kms.uris=[\"ws://localhost:8888/kurento\"]
|
||||
|
||||
openvidu.secret: MY_SECRET
|
||||
openvidu.security: true
|
|
@ -1,9 +0,0 @@
|
|||
|
||||
.------------------------------------.
|
||||
| |
|
||||
| | |/ / _ _ _ ___ _ _| |_ ___ |
|
||||
| | ' < || | '_/ -_) ' \ _/ _ \ |
|
||||
| |_|\_\_,_|_| \___|_||_\__\___/ |
|
||||
| |
|
||||
'------------------------------------'
|
||||
version ${project.version}
|
Binary file not shown.
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"kms": {
|
||||
"uris": ["ws://localhost:8888/kurento", "ws://127.0.0.1:8888/kurento"]
|
||||
},
|
||||
"app": {
|
||||
//has to accessible from the KMS in order to load filter imgs
|
||||
"uri": "https://localhost:8443/"
|
||||
},
|
||||
"kurento": {
|
||||
"client": {
|
||||
//milliseconds
|
||||
"requestTimeout": 20000
|
||||
}
|
||||
},
|
||||
"demo": {
|
||||
//marker or hat
|
||||
"filterType" : "marker",
|
||||
|
||||
//markerdetector img(s) in order of preference
|
||||
"markerUrls": {
|
||||
"0": "kurento-rect-logo.png"
|
||||
},
|
||||
|
||||
//mario-wings.png or wizard.png
|
||||
"hatUrl": "mario-wings.png",
|
||||
"hatCoords": {
|
||||
// mario-wings hat
|
||||
"offsetXPercent": -0.35F,
|
||||
"offsetYPercent": -1.2F,
|
||||
"widthPercent": 1.6F,
|
||||
"heightPercent": 1.6F
|
||||
|
||||
//wizard hat
|
||||
//"offsetXPercent": -0.2F,
|
||||
//"offsetYPercent": -1.35F,
|
||||
//"widthPercent": 1.5F,
|
||||
//"heightPercent": 1.5F
|
||||
},
|
||||
"loopback" : {
|
||||
"remote": true,
|
||||
//matters only when remote is true
|
||||
"andLocal": false
|
||||
},
|
||||
"authRegex": ".*",
|
||||
"kmsLimit": 1000
|
||||
},
|
||||
"updateSpeakerInterval": 1800,
|
||||
"thresholdSpeaker": -50
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
log4j.rootLogger=WARN,CONSOLE
|
||||
log4j.logger.org.kurento=INFO
|
||||
log4j.logger.org.kurento.room=DEBUG
|
||||
|
||||
# Appenders
|
||||
log4j.threshold=ALL
|
||||
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %c [%t] (%F:%L) - %m%n
|
|
@ -1,35 +0,0 @@
|
|||
var openVidu_room = angular.module('openVidu_room', ['ngRoute', 'FBAngular', 'lumx', 'angular-clipboard']);
|
||||
|
||||
openVidu_room.config(['$routeProvider', function ($routeProvider) {
|
||||
$routeProvider
|
||||
.when('/', {
|
||||
templateUrl: 'angular/login/login.html',
|
||||
controller: 'loginController'
|
||||
})
|
||||
.when('/login', {
|
||||
templateUrl: 'angular/login/login.html',
|
||||
controller: 'loginController'
|
||||
})
|
||||
.when('/rooms/:existingRoomName', {
|
||||
templateUrl: 'angular/login/login.html',
|
||||
controller: 'loginController'
|
||||
})
|
||||
.when('/call', {
|
||||
templateUrl: 'angular/call/call.html',
|
||||
controller: 'callController',
|
||||
resolve: {
|
||||
factory: checkRouting
|
||||
}
|
||||
})
|
||||
.otherwise('/'); //redirect to login
|
||||
}]);
|
||||
|
||||
var checkRouting= function ($rootScope, $location) {
|
||||
if ($rootScope.isParticipant) {
|
||||
return true;
|
||||
} else {
|
||||
console.log('Not a participant, routing to login');
|
||||
$location.path($rootScope.contextpath + '/');
|
||||
return false;
|
||||
}
|
||||
};
|
|
@ -1,67 +0,0 @@
|
|||
|
||||
<div id="room">
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div id="main-video">
|
||||
|
||||
<!--big videos-->
|
||||
|
||||
</div>
|
||||
|
||||
<div id="logo">
|
||||
<img src="img/kurento.png" />
|
||||
</div>
|
||||
|
||||
<div id="room-name">{{roomName}}</div>
|
||||
<div class="mb" align="right" style="margin: 1em; padding-bottom: 5px" id="buttonActions">
|
||||
<button class="btn btn--xl btn--fab mdi" ng-class="filterStyle" lx-ripple ng-click="applyFilter()" id="filterButton" title="Filter toggle"></button> <!--filter-->
|
||||
<button class="btn btn--xl btn--brown btn--fab mdi md-recent-actors" lx-ripple ng-click="disableMainSpeaker()" id="buttonMainSpeaker" title="Main Speaker toggle"></button> <!--disable Main Speaker-->
|
||||
<button class="btn btn--xl btn--teal btn--fab mdi md-volume-up" lx-ripple ng-click="onOffVolume()" id="buttonVolume" title="Audio toggle"></button> <!--mute audio-->
|
||||
<button class="btn btn--xl btn--grey btn--fab mdi md-videocam" lx-ripple ng-click="onOffVideocam()" id="buttonVideocam" title="Video toggle"></button> <!--mute video-->
|
||||
<button class="btn btn--xl btn--blue-grey btn--fab mdi md-not-interested" lx-ripple ng-click="disconnectStream()" id="buttonDisconnect" title="Disconnect media stream"></button> <!--unpublish or unsubscribe media-->
|
||||
<button class="btn btn--xl btn--red btn--fab mdi md-call-end " lx-ripple ng-click="leaveRoom()" id="buttonLeaveRoom" title="Leave room"></button> <!--colgar-->
|
||||
<button class="btn btn--xl btn--green btn--fab mdi md-fullscreen" lx-ripple ng-click="goFullscreen()" title="Fullscreen"></button> <!--fullscreen-->
|
||||
<button class="btn btn--xl btn--blue btn--fab mdi md-chat" lx-ripple ng-click="toggleChat()" title="Chat toggle"></button> <!--chat-->
|
||||
</div>
|
||||
|
||||
<div id="participants">
|
||||
|
||||
<!--small videos-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--CHAT-->
|
||||
|
||||
<div class="toggler" style="width: 20%;height: 100%;float: right" >
|
||||
<div id="effect" style="display:none">
|
||||
<!--head-->
|
||||
<div>
|
||||
<strong>Chat</strong>
|
||||
<button class="btn btn--s btn--blue btn--icon mdi md-close" lx-ripple ng-click="toggleChat()" id="button"></button> <!--close-->
|
||||
</div>
|
||||
|
||||
<div id="chatDiv" style="height: 30em; overflow: scroll;">
|
||||
<div id="messages">
|
||||
<ul class="list" >
|
||||
|
||||
<!--chat messages with scroll-->
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--message and button to send-->
|
||||
<div>
|
||||
<form>
|
||||
<lx-text-field label="Message">
|
||||
<input id="inputMessage" type="text" ng-model="message">
|
||||
</lx-text-field>
|
||||
<button type="submit" class="btn btn--m btn--green btn--raised" lx-ripple ng-click="sendMessage()">Send</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,194 +0,0 @@
|
|||
/*
|
||||
* @author Micael Gallego (micael.gallego@gmail.com)
|
||||
* @author Raquel Díaz González
|
||||
*/
|
||||
|
||||
openVidu_room.controller('callController', function ($scope, $window, ServiceParticipant, ServiceRoom, Fullscreen, LxNotificationService) {
|
||||
|
||||
$scope.roomName = ServiceRoom.getRoomName();
|
||||
$scope.userName = ServiceRoom.getUserName();
|
||||
$scope.participants = ServiceParticipant.getParticipants();
|
||||
$scope.openVidu = ServiceRoom.getOpenVidu();
|
||||
$scope.filter = ServiceRoom.getFilterRequestParam();
|
||||
|
||||
$scope.leaveRoom = function () {
|
||||
|
||||
ServiceRoom.closeOpenVidu();
|
||||
|
||||
ServiceParticipant.removeParticipants();
|
||||
|
||||
//redirect to login
|
||||
$window.location.href = '#/login';
|
||||
};
|
||||
|
||||
window.onbeforeunload = function () {
|
||||
//not necessary if not connected
|
||||
if (ServiceParticipant.isConnected()) {
|
||||
ServiceRoom.closeOpenVidu();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.$on("$locationChangeStart", function () {
|
||||
console.log("Changed location to: " + document.location);
|
||||
if (ServiceParticipant.isConnected()) {
|
||||
ServiceRoom.closeOpenVidu();
|
||||
ServiceParticipant.removeParticipants();
|
||||
}
|
||||
});
|
||||
|
||||
$scope.goFullscreen = function () {
|
||||
|
||||
if (Fullscreen.isEnabled())
|
||||
Fullscreen.cancel();
|
||||
else
|
||||
Fullscreen.all();
|
||||
|
||||
};
|
||||
|
||||
$scope.disableMainSpeaker = function (value) {
|
||||
|
||||
var element = document.getElementById("buttonMainSpeaker");
|
||||
if (element.classList.contains("md-person")) { //on
|
||||
element.classList.remove("md-person");
|
||||
element.classList.add("md-recent-actors");
|
||||
ServiceParticipant.enableMainSpeaker();
|
||||
} else { //off
|
||||
element.classList.remove("md-recent-actors");
|
||||
element.classList.add("md-person");
|
||||
ServiceParticipant.disableMainSpeaker();
|
||||
}
|
||||
}
|
||||
|
||||
$scope.onOffVolume = function () {
|
||||
var localStream = ServiceRoom.getLocalStream();
|
||||
var element = document.getElementById("buttonVolume");
|
||||
if (element.classList.contains("md-volume-off")) { //on
|
||||
element.classList.remove("md-volume-off");
|
||||
element.classList.add("md-volume-up");
|
||||
localStream.audioEnabled = true;
|
||||
} else { //off
|
||||
element.classList.remove("md-volume-up");
|
||||
element.classList.add("md-volume-off");
|
||||
localStream.audioEnabled = false;
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$scope.onOffVideocam = function () {
|
||||
var localStream = ServiceRoom.getLocalStream();
|
||||
var element = document.getElementById("buttonVideocam");
|
||||
if (element.classList.contains("md-videocam-off")) {//on
|
||||
element.classList.remove("md-videocam-off");
|
||||
element.classList.add("md-videocam");
|
||||
localStream.videoEnabled = true;
|
||||
} else {//off
|
||||
element.classList.remove("md-videocam");
|
||||
element.classList.add("md-videocam-off");
|
||||
localStream.videoEnabled = false;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.disconnectStream = function () {
|
||||
var localStream = ServiceRoom.getLocalStream();
|
||||
var participant = ServiceParticipant.getMainParticipant();
|
||||
if (!localStream || !participant) {
|
||||
LxNotificationService.alert('Error!', "Not connected yet", 'Ok', function (answer) {
|
||||
});
|
||||
return false;
|
||||
}
|
||||
ServiceParticipant.disconnectParticipant(participant);
|
||||
ServiceRoom.getOpenVidu().disconnectParticipant(participant.getStream());
|
||||
}
|
||||
|
||||
//chat
|
||||
$scope.message;
|
||||
|
||||
$scope.sendMessage = function () {
|
||||
console.log("Sending message", $scope.message);
|
||||
var openVidu = ServiceRoom.getOpenVidu();
|
||||
openVidu.sendMessage($scope.roomName, $scope.userName, $scope.message);
|
||||
$scope.message = "";
|
||||
};
|
||||
|
||||
//open or close chat when click in chat button
|
||||
$scope.toggleChat = function () {
|
||||
var selectedEffect = "slide";
|
||||
// most effect types need no options passed by default
|
||||
var options = {direction: "right"};
|
||||
if ($("#effect").is(':visible')) {
|
||||
$("#content").animate({width: '100%'}, 500);
|
||||
} else {
|
||||
$("#content").animate({width: '80%'}, 500);
|
||||
}
|
||||
// run the effect
|
||||
$("#effect").toggle(selectedEffect, options, 500);
|
||||
};
|
||||
|
||||
var style = {
|
||||
hat: {
|
||||
"-1": "btn--indigo md-mood",
|
||||
"0": "btn--amber md-face-unlock"
|
||||
},
|
||||
marker: {
|
||||
"-1": "btn--indigo md-grid-off",
|
||||
"0": "btn--amber md-grid-on",
|
||||
"1": "btn--red md-grid-on"
|
||||
}
|
||||
};
|
||||
|
||||
$scope.filterIndex = "-1"; //off
|
||||
$scope.filterState;
|
||||
$scope.filterStyle;
|
||||
updateFilterValues();
|
||||
|
||||
function updateFilterValues() {
|
||||
$scope.filterState = parseInt($scope.filterIndex) < 0 ? "off" : "on";
|
||||
$scope.filterStyle = style[$scope.filter][$scope.filterIndex];
|
||||
}
|
||||
|
||||
$scope.applyFilter = function () {
|
||||
var reqParams = {};
|
||||
if ($scope.filter === "marker") {
|
||||
reqParams[$scope.filter] = parseInt($scope.filterIndex);
|
||||
} else {
|
||||
if (parseInt($scope.filterIndex) < 0) { //off -> on
|
||||
$scope.filterIndex = "0";
|
||||
reqParams[$scope.filter] = true;
|
||||
} else { //on -> off
|
||||
$scope.filterIndex = "-1";
|
||||
reqParams[$scope.filter] = false;
|
||||
}
|
||||
}
|
||||
|
||||
ServiceRoom.getOpenVidu().sendCustomRequest(reqParams, function (error, response) {
|
||||
if (error) {
|
||||
console.error("Unable to toggle filter, currently " +
|
||||
$scope.filterState, error);
|
||||
LxNotificationService.alert('Error!',
|
||||
"Unable to toggle filter, currently " + $scope.filterState,
|
||||
'Ok', function (answer) {
|
||||
});
|
||||
return false;
|
||||
} else {
|
||||
if ($scope.filter === "marker") {
|
||||
return;
|
||||
}
|
||||
|
||||
updateFilterValues();
|
||||
console.log("Toggled filter " + $scope.filterState + " (idx " +
|
||||
$scope.filterIndex + ")");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
ServiceParticipant.addEventListener("marker-filter-status-changed", function (status) {
|
||||
console.log("Filter status changed", status);
|
||||
if ($scope.filter === "marker") {
|
||||
$scope.filterIndex = status;
|
||||
updateFilterValues();
|
||||
$scope.$apply();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
|
||||
<div class="join">
|
||||
<div id="join-title">Kurento Room</div>
|
||||
|
||||
<div class="card" id="join">
|
||||
<form role="form" ng-submit="register(room)" accept-charset="UTF-8">
|
||||
|
||||
<div class="card__content">
|
||||
<lx-text-field label="Username" error="!nameValidation(room.userName)">
|
||||
<input type="text" id="name" ng-model="room.userName" required>
|
||||
</lx-text-field>
|
||||
|
||||
<span class="text-field-error" ng-if="!nameValidation(room.userName)">Invalid, please use:
|
||||
<em>a-zA-Z0-9</em></span>
|
||||
|
||||
<div class="grid">
|
||||
|
||||
<div ng-class="roomPickerClass">
|
||||
<lx-text-field label="{{roomPickerLabel}}" error="!nameValidation(room.roomName)">
|
||||
<input type="text" id="roomName" ng-model="room.roomName" required
|
||||
ng-change="nameValidation(room.roomName) && updateRoomUrl(room.roomName)"
|
||||
ng-disabled="existingRoomName">
|
||||
</lx-text-field>
|
||||
|
||||
<span class="text-field-error" ng-if="!nameValidation(room.roomName)">Allowed chars:
|
||||
<em>a-zA-Z0-9</em></span>
|
||||
</div>
|
||||
|
||||
<div class="grid__col6" ng-if="!existingRoomName">
|
||||
<lx-select ng-model="room.roomName" placeholder="Current rooms" choices="listRooms" floating-label>
|
||||
<lx-select-selected>
|
||||
{{ $selected }}
|
||||
</lx-select-selected>
|
||||
|
||||
<lx-select-choices>
|
||||
{{ $choice }}
|
||||
</lx-select-choices>
|
||||
</lx-select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card__actions">
|
||||
<div class="grid">
|
||||
<div class="grid__col6">
|
||||
<button class="btn btn--l btn--blue btn--raised" lx-ripple type="button" ng-click="clear()" title="Clear fields">Clear</button>
|
||||
</div>
|
||||
<div class="grid__col6">
|
||||
<button id="joinBtn" class="btn btn--l btn--green btn--raised" lx-ripple type="submit" ng-disabled="!nameValidation(room.userName) || !nameValidation(room.roomName) || joinInProcess">Join room!</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card bgc-grey-600 roomUrl" ng-if="!existingRoomName">
|
||||
<div class="card__content">
|
||||
<lx-text-field label="Share this URL for direct room access" theme="dark">
|
||||
<input type="text" id="roomUrlId" ng-model="roomUrl" ng-disabled="true">
|
||||
</lx-text-field>
|
||||
</div>
|
||||
|
||||
<div class="card__actions">
|
||||
<button class="btn btn--l btn--grey btn--raised" lx-ripple type="button" clipboard
|
||||
text="roomUrl" ng-disabled="!nameValidation(room.roomName)">Copy to clipboard</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -1,210 +0,0 @@
|
|||
/*
|
||||
* @author Micael Gallego (micael.gallego@gmail.com)
|
||||
* @author Radu Tom Vlad
|
||||
*/
|
||||
|
||||
openVidu_room.controller('loginController', function($scope, $rootScope, $http,
|
||||
$window, $routeParams, ServiceParticipant, ServiceRoom, LxNotificationService) {
|
||||
|
||||
$scope.existingRoomName = false;
|
||||
$scope.roomPickerClass = 'grid__col6';
|
||||
$scope.roomPickerLabel = 'Room';
|
||||
var name = $routeParams["existingRoomName"];
|
||||
if (name && name.length > 0) {
|
||||
$scope.room = {
|
||||
roomName: name
|
||||
}
|
||||
$scope.existingRoomName = true;
|
||||
$scope.roomPickerClass = 'grid__col';
|
||||
$scope.roomPickerLabel = 'Fixed room name';
|
||||
}
|
||||
|
||||
$scope.nameValidation = function(name) {
|
||||
return /^[a-zA-Z0-9]+$/.test(name);
|
||||
};
|
||||
|
||||
$rootScope.isParticipant = false;
|
||||
|
||||
var contextpath = (location.pathname == '/') ? '' : location.pathname;
|
||||
|
||||
$rootScope.contextpath = (location.pathname == '/') ? '' : location.pathname;
|
||||
|
||||
var roomsFragment = $rootScope.contextpath.endsWith('/') ? '#/rooms/' : '/#/rooms/';
|
||||
|
||||
$http.get($rootScope.contextpath + '/getAllRooms').success(function(data, status, headers, config) {
|
||||
console.log(JSON.stringify(data));
|
||||
$scope.listRooms = data;
|
||||
}).error(function(data, status, headers, config) {});
|
||||
|
||||
$http.get($rootScope.contextpath + '/getClientConfig').success(function(data, status, headers, config) {
|
||||
console.log(JSON.stringify(data));
|
||||
$scope.clientConfig = data;
|
||||
}).error(function(data, status, headers, config) {});
|
||||
|
||||
$http.get($rootScope.contextpath + '/getUpdateSpeakerInterval').success(function(data, status, headers, config) {
|
||||
$scope.updateSpeakerInterval = data
|
||||
}).error(function(data, status, headers, config) {});
|
||||
|
||||
$http.get($rootScope.contextpath + '/getThresholdSpeaker').success(function(data, status, headers, config) {
|
||||
$scope.thresholdSpeaker = data
|
||||
}).error(function(data, status, headers, config) {});
|
||||
|
||||
$scope.register = function(room) {
|
||||
|
||||
if (!room)
|
||||
ServiceParticipant.showError($window, LxNotificationService, {
|
||||
error: {
|
||||
message: "Username and room fields are both required"
|
||||
}
|
||||
}, contextpath);
|
||||
|
||||
$scope.userName = room.userName;
|
||||
$scope.roomName = room.roomName;
|
||||
|
||||
var wsUri = 'wss://' + location.host + $rootScope.contextpath + '/room';
|
||||
|
||||
//show loopback stream from server
|
||||
var displayPublished = $scope.clientConfig.loopbackRemote || false;
|
||||
//also show local stream when display my remote
|
||||
var mirrorLocal = $scope.clientConfig.loopbackAndLocal || false;
|
||||
|
||||
var openVidu = OpenVidu(wsUri, function(error, openVidu) {
|
||||
|
||||
if (error) {
|
||||
return console.error('Error in OpenVidu client', error);
|
||||
}
|
||||
|
||||
//TODO token should be generated by the server or a 3rd-party component
|
||||
//openVidu.setRpcParams({token : "securityToken"});
|
||||
|
||||
room = openVidu.Room({
|
||||
room: $scope.roomName,
|
||||
user: $scope.userName,
|
||||
updateSpeakerInterval: $scope.updateSpeakerInterval,
|
||||
thresholdSpeaker: $scope.thresholdSpeaker
|
||||
});
|
||||
|
||||
var localStream = openVidu.Stream(room, {
|
||||
audio: true,
|
||||
video: true,
|
||||
data: false
|
||||
});
|
||||
|
||||
localStream.addEventListener("access-accepted", function() {
|
||||
room.addEventListener("room-connected", function(roomEvent) {
|
||||
var streams = roomEvent.streams;
|
||||
if (displayPublished) {
|
||||
localStream.subscribeToMyRemote();
|
||||
}
|
||||
localStream.publish();
|
||||
ServiceRoom.setLocalStream(localStream.getWebRtcPeer());
|
||||
for (var i = 0; i < streams.length; i++) {
|
||||
ServiceParticipant.addParticipant(streams[i]);
|
||||
}
|
||||
});
|
||||
|
||||
room.addEventListener("stream-published", function(streamEvent) {
|
||||
ServiceParticipant.addLocalParticipant(localStream);
|
||||
if (mirrorLocal && localStream.displayMyRemote()) {
|
||||
var localVideo = openVidu.Stream(room, {
|
||||
video: true,
|
||||
id: "localStream"
|
||||
});
|
||||
localVideo.mirrorLocalStream(localStream.getWrStream());
|
||||
ServiceParticipant.addLocalMirror(localVideo);
|
||||
}
|
||||
});
|
||||
|
||||
room.addEventListener("stream-added", function(streamEvent) {
|
||||
ServiceParticipant.addParticipant(streamEvent.stream);
|
||||
});
|
||||
|
||||
room.addEventListener("stream-removed", function(streamEvent) {
|
||||
ServiceParticipant.removeParticipantByStream(streamEvent.stream);
|
||||
});
|
||||
|
||||
room.addEventListener("newMessage", function(msg) {
|
||||
ServiceParticipant.showMessage(msg.room, msg.user, msg.message);
|
||||
});
|
||||
|
||||
room.addEventListener("error-room", function(error) {
|
||||
ServiceParticipant.showError($window, LxNotificationService, error, contextpath);
|
||||
});
|
||||
|
||||
room.addEventListener("error-media", function(msg) {
|
||||
ServiceParticipant.alertMediaError($window, LxNotificationService, msg.error, contextPath, function(answer) {
|
||||
console.warn("Leave room because of error: " + answer);
|
||||
if (answer) {
|
||||
openVidu.close(true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
room.addEventListener("room-closed", function(msg) {
|
||||
if (msg.room !== $scope.roomName) {
|
||||
console.error("Closed room name doesn't match this room's name",
|
||||
msg.room, $scope.roomName);
|
||||
} else {
|
||||
openVidu.close(true);
|
||||
ServiceParticipant.forceClose($window, LxNotificationService, 'Room ' +
|
||||
msg.room + ' has been forcibly closed from server', contextpath);
|
||||
}
|
||||
});
|
||||
|
||||
room.addEventListener("lost-connection", function(msg) {
|
||||
openVidu.close(true);
|
||||
ServiceParticipant.forceClose($window, LxNotificationService,
|
||||
'Lost connection with room "' + msg.room +
|
||||
'". Please try reloading the webpage...');
|
||||
}, contextpath);
|
||||
|
||||
room.addEventListener("stream-stopped-speaking", function(participantId) {
|
||||
ServiceParticipant.streamStoppedSpeaking(participantId);
|
||||
});
|
||||
|
||||
room.addEventListener("stream-speaking", function(participantId) {
|
||||
ServiceParticipant.streamSpeaking(participantId);
|
||||
});
|
||||
|
||||
room.addEventListener("update-main-speaker", function(participantId) {
|
||||
ServiceParticipant.updateMainSpeaker(participantId);
|
||||
});
|
||||
|
||||
room.addEventListener("custom-message-received", function(data) {
|
||||
if (data.params.MarkerFilterState !== undefined) {
|
||||
ServiceParticipant.changeMarkerFilterStatus(data.params.MarkerFilterState);
|
||||
}
|
||||
});
|
||||
|
||||
room.connect();
|
||||
});
|
||||
|
||||
localStream.addEventListener("access-denied", function() {
|
||||
ServiceParticipant.showError($window, LxNotificationService, {
|
||||
error: {
|
||||
message: "Access not granted to camera and microphone"
|
||||
}
|
||||
});
|
||||
}, contextpath);
|
||||
localStream.init();
|
||||
});
|
||||
|
||||
//save openVidu & roomName & userName in service
|
||||
ServiceRoom.setOpenVidu(openVidu);
|
||||
ServiceRoom.setRoomName($scope.roomName);
|
||||
ServiceRoom.setUserName($scope.userName);
|
||||
ServiceRoom.setFilterRequestParam($scope.clientConfig.filterRequestParam);
|
||||
|
||||
$rootScope.isParticipant = true;
|
||||
|
||||
//redirect to call
|
||||
$window.location.href = '#/call';
|
||||
};
|
||||
$scope.clear = function() {
|
||||
$scope.room = "";
|
||||
$scope.updateRoomUrl();
|
||||
};
|
||||
$scope.updateRoomUrl = function(roomName) {
|
||||
$scope.roomUrl = (roomName && roomName.length > 0) ? location.protocol + '//' + location.host + $rootScope.contextpath + roomsFragment + roomName : '';
|
||||
};
|
||||
});
|
|
@ -1,399 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2016 OpenVidu (http://openvidu.io/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
function AppParticipant(stream) {
|
||||
|
||||
this.stream = stream;
|
||||
this.videoElement;
|
||||
this.thumbnailId;
|
||||
this.mainVideo;
|
||||
var that = this;
|
||||
|
||||
this.getStream = function () {
|
||||
return this.stream;
|
||||
}
|
||||
|
||||
this.setMain = function () {
|
||||
that.videoElement.className += " active-video";
|
||||
var mainVideosParent = document.getElementById('main-video');
|
||||
|
||||
if (elementExists(that.mainVideo)) {
|
||||
$(that.mainVideo).show();
|
||||
} else {
|
||||
that.mainVideo = stream.playOnlyVideo(mainVideosParent, that.thumbnailId);
|
||||
}
|
||||
}
|
||||
|
||||
this.removeMain = function () {
|
||||
$(that.videoElement).removeClass("active-video");
|
||||
if (elementExists(that.mainVideo)) {
|
||||
$(that.mainVideo).hide();
|
||||
} else {
|
||||
console.warn(stream.getGlobalID() + ': no main video element to remove');
|
||||
}
|
||||
}
|
||||
|
||||
this.remove = function () {
|
||||
if (that.videoElement !== undefined) {
|
||||
if (that.videoElement.parentNode !== null) {
|
||||
that.videoElement.parentNode.removeChild(that.videoElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function elementExists(element) {
|
||||
return element !== undefined && element.id !== undefined && $('#' + element.id).length > 0;
|
||||
}
|
||||
|
||||
function playVideo() {
|
||||
|
||||
that.thumbnailId = "video-" + stream.getGlobalID();
|
||||
|
||||
that.videoElement = document.createElement('div');
|
||||
that.videoElement.setAttribute("id", that.thumbnailId);
|
||||
that.videoElement.className = "video";
|
||||
|
||||
var speakerSpeakingVolumen = document.createElement('div');
|
||||
speakerSpeakingVolumen.setAttribute("id", "speaker" + that.thumbnailId);
|
||||
speakerSpeakingVolumen.className = 'btn--m btn--green btn--fab mdi md-volume-up blinking';
|
||||
speakerSpeakingVolumen.style.position = "absolute";
|
||||
speakerSpeakingVolumen.style.left = "3%";
|
||||
speakerSpeakingVolumen.style.top = "60%";
|
||||
speakerSpeakingVolumen.style.zIndex = "100";
|
||||
speakerSpeakingVolumen.style.display = "none";
|
||||
that.videoElement.appendChild(speakerSpeakingVolumen);
|
||||
|
||||
document.getElementById("participants").appendChild(that.videoElement);
|
||||
that.stream.playThumbnail(that.thumbnailId);
|
||||
}
|
||||
|
||||
playVideo();
|
||||
}
|
||||
|
||||
function Participants() {
|
||||
|
||||
var mainParticipant;
|
||||
var localParticipant;
|
||||
var mirrorParticipant;
|
||||
var participants = {};
|
||||
var roomName;
|
||||
var that = this;
|
||||
var connected = true;
|
||||
var displayingRelogin = false;
|
||||
var mainSpeaker = true;
|
||||
|
||||
var ee = new EventEmitter();
|
||||
|
||||
this.isConnected = function () {
|
||||
return connected;
|
||||
}
|
||||
|
||||
this.getRoomName = function () {
|
||||
console.log("room - getRoom " + roomName);
|
||||
roomName = room.name;
|
||||
return roomName;
|
||||
};
|
||||
|
||||
this.getMainParticipant = function () {
|
||||
return mainParticipant;
|
||||
}
|
||||
|
||||
function updateVideoStyle() {
|
||||
var MAX_WIDTH = 14;
|
||||
var numParticipants = Object.keys(participants).length;
|
||||
var maxParticipantsWithMaxWidth = 98 / MAX_WIDTH;
|
||||
|
||||
if (numParticipants > maxParticipantsWithMaxWidth) {
|
||||
$('.video').css({
|
||||
"width": (98 / numParticipants) + "%"
|
||||
});
|
||||
} else {
|
||||
$('.video').css({
|
||||
"width": MAX_WIDTH + "%"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
function updateMainParticipant(participant) {
|
||||
if (!mainParticipant || (mainParticipant != participant)) {
|
||||
if (mainParticipant) {
|
||||
mainParticipant.removeMain();
|
||||
}
|
||||
mainParticipant = participant;
|
||||
mainParticipant.setMain();
|
||||
}
|
||||
}
|
||||
|
||||
this.addLocalParticipant = function (stream) {
|
||||
localParticipant = that.addParticipant(stream);
|
||||
mainParticipant = localParticipant;
|
||||
mainParticipant.setMain();
|
||||
};
|
||||
|
||||
this.addLocalMirror = function (stream) {
|
||||
mirrorParticipant = that.addParticipant(stream);
|
||||
};
|
||||
|
||||
this.addParticipant = function (stream) {
|
||||
|
||||
var participant = new AppParticipant(stream);
|
||||
participants[stream.getGlobalID()] = participant;
|
||||
|
||||
updateVideoStyle();
|
||||
|
||||
$(participant.videoElement).click(function (e) {
|
||||
updateMainParticipant(participant);
|
||||
});
|
||||
|
||||
//updateMainParticipant(participant);
|
||||
|
||||
return participant;
|
||||
};
|
||||
|
||||
this.removeParticipantByStream = function (stream) {
|
||||
this.removeParticipant(stream.getGlobalID());
|
||||
};
|
||||
|
||||
this.disconnectParticipant = function (appParticipant) {
|
||||
this.removeParticipant(appParticipant.getStream().getGlobalID());
|
||||
};
|
||||
|
||||
this.removeParticipant = function (streamId) {
|
||||
var participant = participants[streamId];
|
||||
delete participants[streamId];
|
||||
participant.remove();
|
||||
|
||||
if (mirrorParticipant) {
|
||||
var otherLocal = null;
|
||||
if (participant === localParticipant) {
|
||||
otherLocal = mirrorParticipant;
|
||||
}
|
||||
if (participant === mirrorParticipant) {
|
||||
otherLocal = localParticipant;
|
||||
}
|
||||
if (otherLocal) {
|
||||
console.log("Removed local participant (or mirror) so removing the other local as well");
|
||||
delete participants[otherLocal.getStream().getGlobalID()];
|
||||
otherLocal.remove();
|
||||
}
|
||||
}
|
||||
|
||||
//setting main
|
||||
if (mainParticipant && mainParticipant === participant) {
|
||||
var mainIsLocal = false;
|
||||
if (localParticipant) {
|
||||
if (participant !== localParticipant && participant !== mirrorParticipant) {
|
||||
mainParticipant = localParticipant;
|
||||
mainIsLocal = true;
|
||||
} else {
|
||||
localParticipant = null;
|
||||
mirrorParticipant = null;
|
||||
}
|
||||
}
|
||||
if (!mainIsLocal) {
|
||||
var keys = Object.keys(participants);
|
||||
if (keys.length > 0) {
|
||||
mainParticipant = participants[keys[0]];
|
||||
} else {
|
||||
mainParticipant = null;
|
||||
}
|
||||
}
|
||||
if (mainParticipant) {
|
||||
mainParticipant.setMain();
|
||||
console.log("Main video from " + mainParticipant.getStream().getGlobalID());
|
||||
} else
|
||||
console.error("No media streams left to display");
|
||||
}
|
||||
|
||||
updateVideoStyle();
|
||||
};
|
||||
|
||||
//only called when leaving the room
|
||||
this.removeParticipants = function () {
|
||||
connected = false;
|
||||
for (var index in participants) {
|
||||
var participant = participants[index];
|
||||
participant.remove();
|
||||
}
|
||||
participants = [];
|
||||
};
|
||||
|
||||
this.getParticipants = function () {
|
||||
return participants;
|
||||
};
|
||||
|
||||
this.enableMainSpeaker = function () {
|
||||
mainSpeaker = true;
|
||||
}
|
||||
|
||||
this.disableMainSpeaker = function () {
|
||||
mainSpeaker = false;
|
||||
}
|
||||
|
||||
// Open the chat automatically when a message is received
|
||||
function autoOpenChat() {
|
||||
var selectedEffect = "slide";
|
||||
var options = {direction: "right"};
|
||||
if ($("#effect").is(':hidden')) {
|
||||
$("#content").animate({width: '80%'}, 500);
|
||||
$("#effect").toggle(selectedEffect, options, 500);
|
||||
}
|
||||
};
|
||||
|
||||
this.showMessage = function (room, user, message) {
|
||||
var ul = document.getElementsByClassName("list");
|
||||
|
||||
var chatDiv = document.getElementById('chatDiv');
|
||||
var messages = $("#messages");
|
||||
var updateScroll = true;
|
||||
if (messages.outerHeight() - chatDiv.scrollTop > chatDiv.offsetHeight) {
|
||||
updateScroll = false;
|
||||
}
|
||||
|
||||
var vetext = localParticipant.videoElement.textContent || localParticipant.videoElement.innerText;
|
||||
var localUser = vetext.replace("_webcam", "");
|
||||
if (user === localUser) { //me
|
||||
|
||||
var li = document.createElement('li');
|
||||
li.className = "list-row list-row--has-primary list-row--has-separator";
|
||||
var div1 = document.createElement("div1");
|
||||
div1.className = "list-secondary-tile";
|
||||
var img = document.createElement("img");
|
||||
img.className = "list-primary-tile__img";
|
||||
img.setAttribute("src", "http://ui.lumapps.com/images/placeholder/2-square.jpg");
|
||||
var div2 = document.createElement('div');
|
||||
div2.className = "list-content-tile list-content-tile--two-lines";
|
||||
var strong = document.createElement('strong');
|
||||
strong.innerHTML = user;
|
||||
var span = document.createElement('span');
|
||||
span.innerHTML = message;
|
||||
div2.appendChild(strong);
|
||||
div2.appendChild(span);
|
||||
div1.appendChild(img);
|
||||
li.appendChild(div1);
|
||||
li.appendChild(div2);
|
||||
ul[0].appendChild(li);
|
||||
|
||||
} else {//others
|
||||
|
||||
var li = document.createElement('li');
|
||||
li.className = "list-row list-row--has-primary list-row--has-separator";
|
||||
var div1 = document.createElement("div1");
|
||||
div1.className = "list-primary-tile";
|
||||
var img = document.createElement("img");
|
||||
img.className = "list-primary-tile__img";
|
||||
img.setAttribute("src", "http://ui.lumapps.com/images/placeholder/1-square.jpg");
|
||||
var div2 = document.createElement('div');
|
||||
div2.className = "list-content-tile list-content-tile--two-lines";
|
||||
var strong = document.createElement('strong');
|
||||
strong.innerHTML = user;
|
||||
var span = document.createElement('span');
|
||||
span.innerHTML = message;
|
||||
div2.appendChild(strong);
|
||||
div2.appendChild(span);
|
||||
div1.appendChild(img);
|
||||
li.appendChild(div1);
|
||||
li.appendChild(div2);
|
||||
ul[0].appendChild(li);
|
||||
autoOpenChat();
|
||||
}
|
||||
|
||||
if (updateScroll) {
|
||||
chatDiv.scrollTop = messages.outerHeight();
|
||||
}
|
||||
};
|
||||
|
||||
this.showError = function ($window, LxNotificationService, e, contextPath) {
|
||||
if (displayingRelogin) {
|
||||
console.warn('Already displaying an alert that leads to relogin');
|
||||
return false;
|
||||
}
|
||||
displayingRelogin = true;
|
||||
that.removeParticipants();
|
||||
LxNotificationService.alert('Error!', e.error.message, 'Reconnect', function (answer) {
|
||||
displayingRelogin = false;
|
||||
relogin($window, contextPath);
|
||||
});
|
||||
};
|
||||
|
||||
this.forceClose = function ($window, LxNotificationService, msg, contextPath) {
|
||||
if (displayingRelogin) {
|
||||
console.warn('Already displaying an alert that leads to relogin');
|
||||
return false;
|
||||
}
|
||||
displayingRelogin = true;
|
||||
that.removeParticipants();
|
||||
LxNotificationService.alert('Warning!', msg, 'Reload', function (answer) {
|
||||
displayingRelogin = false;
|
||||
relogin($window, contextPath);
|
||||
});
|
||||
};
|
||||
|
||||
this.alertMediaError = function ($window, LxNotificationService, msg, contextPath, callback) {
|
||||
if (displayingRelogin) {
|
||||
console.warn('Already displaying an alert that leads to relogin');
|
||||
return false;
|
||||
}
|
||||
LxNotificationService.confirm('Warning!', 'Server media error: ' + msg
|
||||
+ ". Please reconnect.", {cancel: 'Disagree', ok: 'Agree'},
|
||||
function (answer) {
|
||||
console.log("User agrees upon media error: " + answer);
|
||||
if (answer) {
|
||||
that.removeParticipants();
|
||||
relogin($window, contextPath);
|
||||
}
|
||||
if (typeof callback === "function") {
|
||||
callback(answer);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function relogin($window, contextPath) {
|
||||
//TODO call leaveRoom() in openVidu
|
||||
contextPath = contextPath || '/';
|
||||
$window.location.href = contextPath; //'#/login';
|
||||
}
|
||||
|
||||
this.streamSpeaking = function (participantId) {
|
||||
if (participants[participantId.participantId] != undefined)
|
||||
document.getElementById("speaker" + participants[participantId.participantId].thumbnailId).style.display = '';
|
||||
}
|
||||
|
||||
this.streamStoppedSpeaking = function (participantId) {
|
||||
if (participants[participantId.participantId] != undefined)
|
||||
document.getElementById("speaker" + participants[participantId.participantId].thumbnailId).style.display = "none";
|
||||
}
|
||||
|
||||
this.updateMainSpeaker = function (participantId) {
|
||||
if (participants[participantId.participantId] != undefined) {
|
||||
if (mainSpeaker)
|
||||
updateMainParticipant(participants[participantId.participantId]);
|
||||
}
|
||||
}
|
||||
|
||||
this.changeMarkerFilterStatus = function (status) {
|
||||
this.emitEvent("marker-filter-status-changed", [status]);
|
||||
console.log("New filter status: " + status);
|
||||
};
|
||||
|
||||
this.addEventListener = function (eventName, listener) {
|
||||
ee.addListener(eventName, listener);
|
||||
};
|
||||
|
||||
this.emitEvent = function (eventName, eventsArray) {
|
||||
ee.emitEvent(eventName, eventsArray);
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* @author Raquel Díaz González
|
||||
*/
|
||||
|
||||
openVidu_room.factory('ServiceParticipant', function () {
|
||||
|
||||
return new Participants();
|
||||
|
||||
});
|
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
* @author Raquel Díaz González
|
||||
*/
|
||||
|
||||
openVidu_room.service('ServiceRoom', function () {
|
||||
|
||||
var openVidu;
|
||||
var roomName;
|
||||
var userName;
|
||||
var localStream;
|
||||
var filterRequestParam;
|
||||
|
||||
this.getOpenVidu = function () {
|
||||
return openVidu;
|
||||
};
|
||||
|
||||
this.getRoomName = function () {
|
||||
return roomName;
|
||||
};
|
||||
|
||||
this.setOpenVidu = function (value) {
|
||||
openVidu = value;
|
||||
};
|
||||
|
||||
this.setRoomName = function (value) {
|
||||
roomName = value;
|
||||
};
|
||||
|
||||
this.getLocalStream = function () {
|
||||
return localStream;
|
||||
};
|
||||
|
||||
this.setLocalStream = function (value) {
|
||||
localStream = value;
|
||||
};
|
||||
|
||||
this.getUserName = function () {
|
||||
return userName;
|
||||
};
|
||||
|
||||
this.setUserName = function (value) {
|
||||
userName = value;
|
||||
};
|
||||
|
||||
this.closeOpenVidu = function () {
|
||||
if (openVidu && openVidu instanceof OpenVidu) {
|
||||
openVidu.close();
|
||||
} else {
|
||||
console.log('OpenVidu instance is not set');
|
||||
}
|
||||
};
|
||||
|
||||
this.getFilterRequestParam = function () {
|
||||
return filterRequestParam;
|
||||
};
|
||||
|
||||
this.setFilterRequestParam = function (value) {
|
||||
filterRequestParam = value;
|
||||
};
|
||||
});
|
|
@ -1,56 +0,0 @@
|
|||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Open Sans';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Open Sans'), local('OpenSans'), url(//fonts.gstatic.com/s/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
|
||||
}
|
|
@ -1,240 +0,0 @@
|
|||
html, body {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#buttonActions>button{
|
||||
font-size: 1.9rem;
|
||||
}
|
||||
|
||||
#room{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Open Sans', sans-serif;
|
||||
}
|
||||
|
||||
.roomUrl {
|
||||
margin: 40px auto 30px;
|
||||
}
|
||||
|
||||
#main-video {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#main-video>video {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#main-video video {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
video {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-color: black;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
right: 70%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#participants {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
float: right;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
.name {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
z-index: 99;
|
||||
background-color: transparent;
|
||||
margin: 0.5em;
|
||||
text-shadow: 0px 0px 10px #000000;
|
||||
}
|
||||
|
||||
.active-video {
|
||||
border: 2px solid white;
|
||||
}
|
||||
|
||||
.active-audio {
|
||||
border: 2px solid blue;
|
||||
}
|
||||
|
||||
.blinking {
|
||||
|
||||
animation-name: blinking;
|
||||
animation-duration: 2s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
|
||||
-webkit-animation-name: blinking;
|
||||
-webkit-animation-duration: 2s;
|
||||
-webkit-animation-timing-function: linear;
|
||||
-webkit-animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
@-moz-keyframes blinking{
|
||||
0% { opacity: 1.0; }
|
||||
50% { opacity: 0.0; }
|
||||
100% { opacity: 1.0; }
|
||||
}
|
||||
|
||||
@-webkit-keyframes blinking {
|
||||
0% { opacity: 1.0; }
|
||||
50% { opacity: 0.0; }
|
||||
100% { opacity: 1.0; }
|
||||
}
|
||||
|
||||
@keyframes blinking {
|
||||
0% { opacity: 1.0; }
|
||||
50% { opacity: 0.0; }
|
||||
100% { opacity: 1.0; }
|
||||
}
|
||||
|
||||
.video {
|
||||
width: 23%;
|
||||
/* whatever width you want */
|
||||
position: relative;
|
||||
float: right;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.video:after {
|
||||
padding-top: 56.25%;
|
||||
/* 16:9 ratio */
|
||||
display: block;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.video>div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
/* fill parent */
|
||||
background-color: #000000;
|
||||
/* let's see it! */
|
||||
color: white;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
/* align horizontal */
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#logo {
|
||||
position: absolute;
|
||||
display: inline;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
margin: 1em;
|
||||
}
|
||||
|
||||
#room-name {
|
||||
display: inline;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
margin: auto;
|
||||
background-color: transparent;
|
||||
margin: 0.5em;
|
||||
text-shadow: 0px 0px 10px #000000;
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
.join {
|
||||
position: relative;
|
||||
margin: auto;
|
||||
width: 500px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#join-title {
|
||||
display: inline-flex;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
color: #555;
|
||||
padding-left: 70px;
|
||||
padding-bottom: 35px;
|
||||
padding-top: 35px;
|
||||
background-image: url("../img/kurento.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: left;
|
||||
margin: auto 0 auto 0;
|
||||
}
|
||||
|
||||
/*.join p {
|
||||
margin: 20px 0 0;
|
||||
}
|
||||
|
||||
.join p:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.join input[type=text], .join input[type=password] {
|
||||
width: 278px;
|
||||
}
|
||||
|
||||
.join p.submit {
|
||||
text-align: center;
|
||||
}*/
|
||||
|
||||
:-moz-placeholder {
|
||||
color: #c9c9c9 !important;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
::-webkit-input-placeholder {
|
||||
color: #ccc;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/*chat effect*/
|
||||
|
||||
#effect {
|
||||
position: relative;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
.card__content {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.card__actions {
|
||||
border-top-width: 0px;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 41 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
|
@ -1,53 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Kurento Room Demo</title>
|
||||
<meta name="author" content="kurento.org">
|
||||
<link rel="shortcut icon" href="img/kurento.png" type="image/png" />
|
||||
|
||||
<!-- Bower CSS styles -->
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="webjars/jquery-ui/jquery-ui.min.css">
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="webjars/material-design-iconic-font/css/material-design-iconic-font.min.css">
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="webjars/lumx/dist/css/lumx.css">
|
||||
|
||||
<!-- Custom CSS styles -->
|
||||
<link type="text/css" rel="stylesheet" href="./css/room.css" />
|
||||
<link type="text/css" rel="stylesheet" href="./css/googleapis-fonts.css">
|
||||
|
||||
<!-- Bower JavaScript dependencies -->
|
||||
<script src="webjars/adapter.js/adapter.js"></script>
|
||||
<script src="webjars/jquery/dist/jquery.min.js"></script>
|
||||
<script src="webjars/jquery-ui/jquery-ui.min.js"></script>
|
||||
<script src="webjars/angular/angular.min.js"></script>
|
||||
<script src="webjars/angular-clipboard/angular-clipboard.js"></script>
|
||||
<script src="webjars/angular-route/angular-route.js"></script>
|
||||
<script src="webjars/angular-fullscreen/src/angular-fullscreen.js"></script>
|
||||
<script src="webjars/velocity/velocity.js"></script>
|
||||
<script src="webjars/moment/min/moment-with-locales.min.js"></script>
|
||||
<script src="webjars/lumx/dist/js/lumx.min.js"></script>
|
||||
<script src="webjars/EventEmitter.js/EventEmitter.min.js"></script>
|
||||
|
||||
<!-- Kurento JavaScript dependencies -->
|
||||
<script src="./js/kurento-utils.js"></script>
|
||||
<script src="./js/kurento-jsonrpc.js"></script>
|
||||
<script src="./js/OpenVidu.js"></script>
|
||||
|
||||
<!-- Custom JavaScript dependencies -->
|
||||
<script src="./angular/app.js"></script>
|
||||
<script src="./angular/call/callController.js"></script>
|
||||
<script src="./angular/login/loginController.js"></script>
|
||||
<script src="./angular/services/Participants.js"></script>
|
||||
<script src="./angular/services/serviceParticipant.js"></script>
|
||||
<script src="./angular/services/serviceRoom.js"></script>
|
||||
</head>
|
||||
|
||||
<body ng-app="openVidu_room">
|
||||
<div ng-view>
|
||||
<!--display the view (login/call) with route system-->
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.AddRemoveUsers;
|
||||
|
||||
/**
|
||||
* @see AddRemoveUsers
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class AddRemoveUsersDemoTest extends AddRemoveUsers {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.AddRemoveUsersNoSinkVerify;
|
||||
|
||||
/**
|
||||
* @see AddRemoveUsersNoSinkVerify
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class AddRemoveUsersNoSinkVerifyDemoTest extends AddRemoveUsersNoSinkVerify {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.NUsersEqualLifetime;
|
||||
|
||||
/**
|
||||
* @see NUsersEqualLifetime
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class NUsersEqualLifetimeDemoTest extends NUsersEqualLifetime {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.OneUserQuickReentry;
|
||||
|
||||
/**
|
||||
* @see OneUserQuickReentry
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class OneUserQuickReentryDemoTest extends OneUserQuickReentry {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.SeqAddRemoveUser;
|
||||
|
||||
/**
|
||||
* @see SeqAddRemoveUser
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class SeqAddRemoveUserDemoTest extends SeqAddRemoveUser {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.SeqNUsersEqualLifetime;
|
||||
|
||||
/**
|
||||
* @see SeqNUsersEqualLifetime
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class SeqNUsersEqualLifetimeDemoTest extends SeqNUsersEqualLifetime {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.TwoUsersEqualLifetime;
|
||||
|
||||
/**
|
||||
* @see TwoUsersEqualLifetime
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class TwoUsersEqualLifetimeDemoTest extends TwoUsersEqualLifetime {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.UnpublishMedia;
|
||||
|
||||
/**
|
||||
* @see UnpublishMedia
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class UnpublishMediaDemoTest extends UnpublishMedia {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.UnsubscribeFromMedia;
|
||||
|
||||
/**
|
||||
* @see UnsubscribeFromMedia
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class UnsubscribeFromMediaDemoTest extends UnsubscribeFromMedia {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.openvidu.demo.test;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.browser.WebAppAvailability;
|
||||
|
||||
/**
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
* @see WebAppAvailability
|
||||
*/
|
||||
public class WebAppAvailabilityDemoTest extends WebAppAvailability {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package io.openvidu.demo.test.fake;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.fake.ExtraKmsFakeUsers;
|
||||
|
||||
/**
|
||||
* @see ExtraKmsFakeUsers
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class ExtraKmsFakeUsersDemoTest extends ExtraKmsFakeUsers {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package io.openvidu.demo.test.fake;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.fake.MixedUsers;
|
||||
|
||||
/**
|
||||
* @see MixedUsers
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class MixedUsersDemoTest extends MixedUsers {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), CHROME_SPINNER_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* (C) Copyright 2015 Kurento (http://kurento.org/)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package io.openvidu.demo.test.fake;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
import org.kurento.test.browser.WebPageType;
|
||||
|
||||
import io.openvidu.test.fake.ParallelNFakeUsers;
|
||||
|
||||
/**
|
||||
* @see ParallelNFakeUsers
|
||||
* @author Radu Tom Vlad (rvlad@naevatec.com)
|
||||
*/
|
||||
public class ParallelNFakeUsersDemoTest extends ParallelNFakeUsers {
|
||||
|
||||
@Override
|
||||
public void setupBrowserTest() throws InterruptedException {
|
||||
webPageType = WebPageType.ROOT;
|
||||
super.setupBrowserTest();
|
||||
}
|
||||
|
||||
@Parameters(name = "{index}: {0}")
|
||||
public static Collection<Object[]> data() {
|
||||
return localChromes(MethodHandles.lookup().lookupClass().getSimpleName(), NUM_USERS,
|
||||
WebPageType.ROOT);
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
log4j.rootLogger=WARN,CONSOLE,file
|
||||
log4j.logger.org.kurento=INFO
|
||||
log4j.logger.org.kurento.client.internal=WARN
|
||||
log4j.logger.org.kurento.room=DEBUG
|
||||
log4j.logger.io.github.bonigarcia=DEBUG
|
||||
log4j.logger.org.kurento.commons=DEBUG
|
||||
log4j.logger.org.kurento.test=DEBUG
|
||||
|
||||
# Appenders
|
||||
log4j.threshold=ALL
|
||||
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %c [%t] (%F:%L) - %m%n
|
||||
|
||||
log4j.appender.file=org.apache.log4j.RollingFileAppender
|
||||
log4j.appender.file.File=target/kurento-room-demo-test.log
|
||||
log4j.appender.file.ImmediateFlush=true
|
||||
log4j.appender.file.MaxFileSize=10MB
|
||||
log4j.appender.file.MaxBackupIndex=50
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p [%t] %c (%F:%L(%M)) - %m%n
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"kurento": {
|
||||
"client": {
|
||||
//milliseconds
|
||||
"requestTimeout": 20000
|
||||
},
|
||||
"test": {
|
||||
"fake": {
|
||||
//"kmsUri": "ws://127.0.0.1:8888/kurento",
|
||||
"wr": {
|
||||
//absolute path on the KMS's machine or http resource
|
||||
//"files": "/tmp",
|
||||
|
||||
//readable by the user that runs KMS (default is nobody:nogroup)
|
||||
//"filenames": []
|
||||
}
|
||||
},
|
||||
"chrome": {
|
||||
//if not absolute path, is considered relative to user's home
|
||||
//"files": "/tmp",
|
||||
|
||||
//accessible to the user that runs the test
|
||||
"filenames": {
|
||||
"wav": [],
|
||||
"y4m": ["video/15sec/rgbHD.y4m"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
9
pom.xml
9
pom.xml
|
@ -10,7 +10,7 @@
|
|||
|
||||
<groupId>io.openvidu</groupId>
|
||||
<artifactId>openvidu</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>1.0.0-beta.1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>OpenVidu</name>
|
||||
|
@ -72,9 +72,7 @@
|
|||
<module>openvidu-client</module>
|
||||
<module>openvidu-browser</module>
|
||||
<module>openvidu-test</module>
|
||||
<module>openvidu-demo</module>
|
||||
<module>openvidu-testapp</module>
|
||||
<module>openvidu-sample-app</module>
|
||||
<module>openvidu-java-client</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
@ -123,11 +121,6 @@
|
|||
<artifactId>openvidu-test</artifactId>
|
||||
<version>${version.openvidu}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.openvidu</groupId>
|
||||
<artifactId>openvidu-demo</artifactId>
|
||||
<version>${version.openvidu}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.openvidu</groupId>
|
||||
<artifactId>openvidu-basicapp</artifactId>
|
||||
|
|
Loading…
Reference in New Issue