Step 1 :
At first we are going to get API Key and API Code from streamvideoproviders
https://www.streamingvideoprovider.com/
Step 2 : Click on Web TV -> Click on AddMedia.
Additional Note : Web TV plays your playlist videos live 24×7. You can also select live stream and use OBS studio (mac) and play a live stream video directly to Xamarin Forms App.
Step 4: It’s time to get API credentials from streamingvideoprovider. Click on Settings> You will find API key and API Code on Right side. Don’t forget to click on save.
That’s all with streamingvideoprovider. We will be using API key and Code inside our Xamarin forms apps.
Plugins to be installed on all projects: Plugin.MediaManager.Forms
1. https://github.com/Baseflow/XamarinMediaManager
Step 1 : So at first we will try to check video player working on stable condition or not for both android and iOS.
1. On Android
Call from MainActivity: CrossMediaManager.Current.Init(this);
2.On Other platforms
Call from AppDelegate, etc: CrossMediaManager.Current.Init();
3. Add this line of code on Xamarin Forms APP on any pages of XF.
[ <mm:VideoView VerticalOptions=”FillAndExpand” Source=”http://yourwebsite\videos\test.3gpp” /> ]
This VideoView inherits from namespace :
xmlns:mm=”clr-namespace:MediaManager.Forms;assembly=MediaManager.Forms”
Note : If you are using http request on the Xamarin forms app. Then you have to enable App Transport Security on iOS and Http clear text on Android.
iOS : https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/ats
Android
That’s all
Then you can run your 1st video on the Xamarin Forms Project for both android and iOS:
Now it’s time to integrate the Platform independent code inside our XF .net shared project.
Full Source Code Link
thanks for sharinf wonderful information. guys you can find some more information related to React Native vs Xamarin
ReplyDelete