Wowza Client Plugin For Xamarin [PRE-RELEASE]

Hey Guys!

Recently we had the need for supporting streaming and broadcast playback for one of our App’s, making use of the Wowza Media Services but the only issue was that they were only available on their iOS and Android native SDK’s. Well not anymore!🥳XamBoy and I got to work and now we have just pre-released a brand new Plugin and set of Xamarin Bindings for the community.

Set Up

The setup process for the plugin is pretty simple and it’s well documented on the Wowza Client Plugin GitHub page. you can complete the Setup process following these steps:

  • Install the nuget package into your PCL project and Client projects.

Use It

You just have to use WowzaClient.Current

Playback Stream

The Wowza Client Plugin renders its playback on a Native Custom View called WowzaPlayer on each platform, so to give support to it on Xamarin Forms we are simply going to create custom renderers and initialize our view correctly for each platform, let’s start by creating a custom Xamarin Forms View in our Controls Folder.

STEP 1: CREATE CUSTOM Xamarin forms control FOR OUR WOWZA PLAYER

Step 2: Create Custom Renderers for oUR Wowza Player

Android:

iOS:

STEP 3: USE CUSTOM CONTROL

To add our WowzaPlayer to our page we first need to add the namespace where we can find our new component, in my case it’s under my controls directory so the namespace looks like this:

Once we have added the namespace correctly we can now use our WowzaPlayer in our Page normally like any other component.

Setup player and playback the livestream in viewmodel

STEP 1: Create config class

Before we can setup our player we will need to send it a config class that inherits from the IWowzaConfig interface containing the details of our previously created Wowza Cloud Console Live streaming session:

STEP 2: setup player

To tell our Wowza Client to setup our player and prepare for playing our livestream we simple need to call the Setup method and send our newly created config.

STEP 3: PLAY LIVESTREAM

Ce finito Guys!! 🥳Congrats, now you have everything ready to start the playback of the livestream in our Xamarin Forms App! Simply call the Play() method and you should now be able to see your livestream running smoothly!

Available Properties

  • IsPlaying 
  • Volume 

Events

  • OnPlayerStatusChanged
  • OnError

Future Improvements for release:

  • Enable Broadcasting from Mobile App

Official Wowza SDK Documentation:

https://www.wowza.com/resources/developers

Full documentation of the project:

https://github.com/CrossGeeks/WowzaClientPlugin

Xamarin Forms sample project:

Wowza Client Plugin Sample

Made with ❤ by Pujols

Author: Pujolsluis

I'm Luis Pujols a Software Engineer originally from the Dominican Republic. I currently work at CrossGeeks as part of an awesome team, developing in Xamarin Forms, and I'm currently working towards my certification on it as well. In my free time, I'm co-organizer of the DotNetDo software community, I also enjoy experimenting with new tech's, mentoring peers and attending or organizing software community events.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.