This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void StartMatchmakingGame() | |
{ | |
GameSettings settings = GameSettings.s_Instance; | |
settings.SetMapIndex(m_MapSelect.currentIndex); | |
settings.SetModeIndex(m_ModeSelect.currentIndex); | |
m_MenuUi.ShowConnectingModal(false); | |
Debug.Log(GetGameName()); | |
m_NetManager.StartMatchmakingGame(GetGameName(), (success, matchInfo) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void JoinMatch(NetworkID networkId, String matchName) | |
{ | |
MainMenuUI menuUi = MainMenuUI.s_Instance; | |
menuUi.ShowConnectingModal(true); | |
m_NetManager.JoinMatchmakingGame(networkId, (success, matchInfo) => | |
{ | |
//Failure flow | |
if (!success) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client.on('stream-published', function (evt) { | |
console.log('Publish local stream successfully'); | |
}); | |
// when a remote stream is added | |
client.on('stream-added', function (evt) { | |
console.log('new stream added: ' + evt.stream.getId()); | |
}); | |
client.on('stream-removed', function (evt) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setTranscodingConfig() { | |
console.log("save rtmp config"); | |
var width = parseInt($('#window-scale-width').val(), 10); | |
var height = parseInt($('#window-scale-height').val(), 10); | |
var configRtmp = { | |
width: width, | |
height: height, | |
videoBitrate: parseInt($('#video-bitrate').val(), 10), | |
videoFramerate: parseInt($('#framerate').val(), 10), | |
lowLatency: ($('#low-latancy').val() === 'true'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create broadcaster client and set the client role | |
var broadcastClient = AgoraRTC.createClient({mode: 'live', codec: 'vp8'}); | |
broadcastClient.setClientRole('host', function() { | |
console.log('Client role set as host.'); | |
}, function(e) { | |
console.log('setClientRole failed', e); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create audience client and set the client role | |
var audienceClient = AgoraRTC.createClient({mode: 'live', codec: 'vp8'}); | |
audienceClient.setClientRole('audience', function() { | |
console.log('Client role set to audience'); | |
}, function(e) { | |
console.log('setClientRole failed', e); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="buttons-container" class="row justify-content-center mt-3"> | |
<div id="audio-controls" class="col-md-2 text-center btn-group"> | |
<button id="mic-btn" type="button" class="btn btn-block btn-dark btn-lg"> | |
<i id="mic-icon" class="fas fa-microphone"></i> | |
</button> | |
<!-- insert mic selection drop-down --> | |
</div> | |
<div id="video-controls" class="col-md-2 text-center btn-group"> | |
<button id="video-btn" type="button" class="btn btn-block btn-dark btn-lg"> | |
<i id="video-icon" class="fas fa-video"></i> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- RTMP Config Modal --> | |
<div class="modal fade slideInLeft animated" id="addRtmpConfigModal" tabindex="-1" role="dialog" aria-labelledby="rtmpConfigLabel" aria-hidden="true" data-keyboard=true> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<h5 class="modal-title" id="rtmpConfigLabel"><i class="fas fa-sliders-h"></i></h5> | |
<button type="button" class="close" data-dismiss="modal" data-reset="modal" aria-label="Close"> | |
<span aria-hidden="true">×</span> | |
</button> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<title>Agora.io [HOST] - AllThingsRTC Live Stream</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="https://cdn.agora.io/sdk/web/AgoraRTCSDK-2.6.1.js"></script> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous"> | |
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.0/animate.min.css" rel="stylesheet"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<title>Agora.io - AllThingsRTC Live Stream</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<script src="js/AgoraRTCSDK-3.1.1.js"></script> | |
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.0/css/all.css" integrity="sha384-lZN37f5QGtY3VHgisS14W3ExzMWZxybE1SJSEsQp9S+oqd12jhcu+A56Ebc1zFSJ" crossorigin="anonymous"> | |
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script> |