Skip to content

Instantly share code, notes, and snippets.

@TBertuzzi TBertuzzi/MainPage.xaml.cs
Last active Sep 12, 2019

Embed
What would you like to do?
opentok
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
You can’t perform that action at this time.