Last active
September 12, 2019 12:22
-
-
Save TBertuzzi/7b511459b09bae0b91322425531bf74e to your computer and use it in GitHub Desktop.
opentok
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
using Xamarin.Forms.OpenTok.Service; | |
namespace OpenTokExemplo | |
{ | |
// Learn more about making custom code visible in the Xamarin.Forms previewer | |
// by visiting https://aka.ms/xamarinforms-previewer | |
[DesignTimeVisible(false)] | |
public partial class MainPage : ContentPage | |
{ | |
public MainPage() | |
{ | |
InitializeComponent(); | |
} | |
private void OnEndCall(object sender, EventArgs e) | |
{ | |
CrossOpenTok.Current.EndSession(); | |
CrossOpenTok.Current.MessageReceived -= OnMessageReceived; | |
Navigation.PopAsync(); | |
} | |
private void OnMessage(object sender, EventArgs e) | |
{ | |
CrossOpenTok.Current.SendMessageAsync($"Path.GetRandomFileName: {Path.GetRandomFileName()}"); | |
} | |
private void OnSwapCamera(object sender, EventArgs e) | |
{ | |
CrossOpenTok.Current.CycleCamera(); | |
} | |
private void OnMessageReceived(string message) | |
{ | |
DisplayAlert("Random message received", message, "OK"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment