Skip to content

Commit

Permalink
[mirotalkbro] - fix switch camera for android #7
Browse files Browse the repository at this point in the history
  • Loading branch information
miroslavpejic85 committed Aug 4, 2024
1 parent 9bba140 commit 5f6dbf4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @license For open source under AGPL-3.0
* @license For private project or commercial purposes contact us at: license.mirotalk@gmail.com
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.0.53
* @version 1.0.54
*/

require('dotenv').config();
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mirotalkbro",
"version": "1.0.53",
"version": "1.0.54",
"description": "P2P WebRTC audio, video and screen live broadcast",
"main": "app/server.js",
"scripts": {
Expand All @@ -24,7 +24,7 @@
"license": "AGPLv3",
"dependencies": {
"@sentry/integrations": "^7.114.0",
"@sentry/node": "^8.20.0",
"@sentry/node": "^8.22.0",
"compression": "^1.7.4",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
Expand Down
5 changes: 3 additions & 2 deletions public/js/broadcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ function getStream() {
};
const constraints = screenShareEnabled ? screenConstraints : cameraConstraints;

stopWindowStream();
stopBroadcastStream();

if (screenShareEnabled) {
video.classList.remove('mirror');
isVideoMirrored = false;
Expand All @@ -870,8 +873,6 @@ function getStream() {
}

function gotStream(stream) {
stopWindowStream();
stopBroadcastStream();
window.stream = stream;
broadcastStream = stream;
if (!screenShareEnabled) {
Expand Down
2 changes: 0 additions & 2 deletions public/views/broadcast.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@
<script async src="../js/umami.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/sweetalert2@11.4.8"></script>
<script defer src="https://cdn.jsdelivr.net/npm/qrious@4.0.2/dist/qrious.min.js"></script>
<!-- <script defer src="https://unpkg.com/@popperjs/core@2"></script>
<script defer src="https://unpkg.com/tippy.js@6"></script> -->
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/tippy.js/6.3.7/tippy-bundle.umd.min.js"></script>
</body>
Expand Down
2 changes: 0 additions & 2 deletions public/views/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@
<script src="../js/recording.js"></script>
<script async src="../js/umami.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/sweetalert2@11.4.8"></script>
<!-- <script defer src="https://unpkg.com/@popperjs/core@2"></script>
<script defer src="https://unpkg.com/tippy.js@6"></script> -->
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/2.11.8/umd/popper.min.js"></script>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/tippy.js/6.3.7/tippy-bundle.umd.min.js"></script>
</body>
Expand Down

0 comments on commit 5f6dbf4

Please sign in to comment.