Using Xamarin.Android and Media Service in Azure for live broadcasting - azure

I am looking for integrating Media Service from azure to Xamarin Android for live broadcasting and viewing the live with on demand videos. For example I need to implement the live video broadcasting like a Facebook app using Azure Media Services and also view the live and archived videos from blob storage. I am unable to get the resource to implement that from official documents of Azure and Xamarin and through the Xamarin University.
So I am here to learn this which will be useful to almost every one willing to implement this kind of features in feature.
There is a official video showing the upload of a video recorded using xamarin application to Azure Media Service and viewing back on the Xamarin app the link is as follows, but there is no approach for making a live broadcasting possible through the same.
https://azure.microsoft.com/en-us/resources/videos/media-streaming-apps-with-azure-and-xamarin/
Xamarin.Android is not compulsory like it may be from Xamarin Forms also the thing is like we just need the android part, I will be happily looking forward to take any kind of help you can offer to get this working.
Scope of App Requirement/Workflow::
1) App should be able to broad cast live (like going live on Facebook application)
2) That should be capable to view the live broadcasts (like we can stream the live content in Facebook application)
3) That should be able to view the archived videos in blob storage (I know how to access the blob storage and download the video to view it on mobile but I don’t know the process to stream the video while it is being downloaded in the background like it does in Youtube or Facebook application).

Using Xamarin.Android and Media Service in Azure for live broadcasting
You could refer to the xamarin-azure-businessreview sample.
Demo app showing how to use several Azure services with Xamarin including Azure AD B2C, Azure Cosmos DB, Azure Functions, Azure App Services, and Azure Media Services

Related

Azure video streaming to Xamarin

We're planning to build a Xamarin app, where you can watch some videos that are hosted on microsoft Azure. Does the azure blob storage support streaming to my mobile app or can i only download the files?
The video urls shouldn't be exposed to public, as mentioned here.
Has anybody experience in this? I didn't find any reliable infos on the web.
Very important thing here - streaming and live-streaming. If you would like to just upload video files to Azur Blob and access them in the mobile app this is possible. I did tests with .mp4 (I did not test other formats) files and once they were uploaded I could play them in the mobile app without any problems.
You do not have to worry about the access too - you can secure URLs with Shared Access Signature or Storage Account Key.
You can read more about it below (Data Plane Security):
https://learn.microsoft.com/en-us/azure/storage/storage-security-guide

IMobileServiceSyncTable with generic API server

We have built a simple mobile app that connects to ASP.net Web-API 2.
We would like to use Microsoft client SDK for it's offline sync support.
Now that Azure Mobile Apps support custom authentication we could actually take the leap.
I want to know out if the offline sync SDK absolutely requires us to use Azure Mobile App or Azure Mobile Services.
Microsoft documentation is full of how-to guides but does not explain what happens under the hood. The best I could understand, both are just OData rest API's and swagger for documentation.
Can the Azure Mobile Client SDK work with API server created on top of ordinary ASP Web-App, outside Azure?
What is it about the Azure Mobile App that makes the magic happen?
Vladmir,
On top of OData, in order to support features like soft delete, offline sync and others, the Azure Mobile Client SDK expects the server to implement a certain protocol. So although the answer to your question:
[does the] sync SDK absolutely requires us to use Azure Mobile App?
... is no, and in theory, you could implement your own API, but I would recommend against doing so, since (among other reasons) even if you manage to implement the expected conventions and behaviors, this will become a maintenance challenge down the road if you need to upgrade the client SDK to take advantage of bug fixes and/or new features.
The good news is that with the latest release of the Azure Mobile Apps server SDK, adding mobile capabilities to an existing ASP.NET Web API application is trivial, and you should be able to enable the scenarios you're looking for simply by adding the appropriate Table controllers. So you can just enhance your existing application and not have to develop and maintain the Azure Mobile Apps specific logic yourself.
About your last question, since both, the client and the server SDK are both open source and developed in the open, you can look at what what makes the magic happen here:
https://github.com/Azure/azure-mobile-apps-net-server
https://github.com/Azure/azure-mobile-apps-net-client
I hope this helps!
The answer for your first question: Yes the SDK can be used in any Server API you have since it will be your entry point to work with Azure Mobile Services.
The Azure Mobile app creates a mobile services instance which has push notifications and SQL tables to store all messages you would like to send with the capability to customize the message as needed. Also it creates a notifications hub instance under the hood to manage notifications for all mobile platforms. Azure mobile apps provide offline capabilities through native sync services between db on your devices and the server when connectivity is present.
Feel free to ask more questions to have a full understanding on How mobile apps works.
Hope this helps.

Use azure media service / server with xamarin

Have anyone used azure media service with xamarin. I am trying to make an portable library which can upload / retrieves video asseset from a standard azure media server. However I am not able to install the nuget package into my project.
Can anyone point me in the right direction
I don't think the default azure media libary is a portable library therefore you cannot add it to your portable library project.
You could however implement this using the available rest documentation.
Media Services Rest Api
We've done something similar for access to blob storage. To avoid having to reference all the azure storage libraries in all our projects.

azure mobile service blob storage using xamarin

I have used the info on this link to create a windows phone sample of uploading images to Azure Blob Storage by using Mobile Services.
http://www.windowsazure.com/en-us/develop/mobile/tutorials/upload-images-to-storage-wp8/
I want to now try and use Xamarin Component of Azure Mobile Services to achieve the same result from Android and iOS. Does Xamarin component have support for this? Also, if anyone has done this before from Xamarin, could you please point me in the correct direction? I couldn't find much information on this topic of using blob storage from within Xamarin for Android or iOS
You can use Zach's Blob Uploader:
https://github.com/zgramana/IOSAzureBlobUploader
This is a lot simpler than using the AMS features for this (but lacks the features like expiration of the url and some auth bits).
You really want to use a web service between your blob storage account, and your Mobile app, unless your app is allowing users to access their own blob storage accounts. If you are determined to make a Xamarin app use Blob storage directly, you can use this Mono port.. it takes a bit of work to get it functioning. It also won't handle some functions in Azure Blob storage. I could only get "Download" to work. Deleting.. and uploading functions were broken. Maybe I screwed up the port to Xamarin.
Mono Azure sdk port
By using that sdk port, I was able to make an IOS app called "Blob Client" that allowed users to at least download their files on IOS. Made it as a tool for myself.. for a project I had, but then went ahead and put it out on the store.
Blob Client on IOS.
Here is an article on connecting to Blog Storage in Xamarin via the Azure Storage package. It's currently in preview but should be what you are looking for.
https://azure.microsoft.com/en-us/documentation/articles/storage-xamarin-blob-storage/

UDP File upload to Windows Azure Media Services

I'm trying to setup a video file upload using UDP protocol onto Windows Azure Media Services. I have not found any code sample or documentation to give me a headstart. Could somebody help me on this matter and provide me some code sample or a documentation or the concept?
Thanks in advance!!
Azure Media Services is a platform as a service which uses Azure as the backend. Specifically, it uses Azure Storage. If you are using the .Net Media Services SDK to upload, then you may not notice that it is wrapping the AzStorage SDK calls for transfer. If you are using the REST directly, you will notice that any PUT calls are heading straight for your storage account. In both of these cases, all Media Services is doing it providing the SAS URLs for uploading to the backend storage.
At this time, AzStorage supports only HTTP PUT for uploads.
In addition, Azure has recently on-boarded a 3rd party solution for fast uploading, look for Aspera in the marketplace. Note that this is a tiered subscription service and may require the purchase of client-side software (same model as Amazon S3, incase your doing side-by-side comparisons).
I did a full walk-through a few months ago on my blog:
http://blog-ndrouin.azurewebsites.net/?p=561
The blog needs a bit of maintenance since the service is no longer in preview, but you'll get the idea.
Media Services is still a preview feature. UDP will only be available in the RTM release:
By the RTM release, Media Services will offer integration with partner
components to provide fast UDP (User Datagram Protocol) upload
solutions.

Resources