Reputation: 944
i have tried Rox Xamarin Video in xamarin. the code in the xaml is below
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:rox="clr-namespace:Rox;assembly=Rox.Xamarin.Video.Portable"
x:Class="FightAthleteApp.Views.Exercise.ExerciseDetails">
<StackLayout VerticalOptions="Center" HorizontalOptions="Center">
<rox:VideoView AutoPlay="True" LoopPlay="True" ShowController="True" Source="http://fightathlete.com.rose.arvixe.com/Upload/Late%20For%20Work.mp4" />
</StackLayout>
</ContentPage>
i have folowed this form https://www.nuget.org/packages/Rox.Xamarin.Video/
But it doesnot work. it shows the following problem...
Xamarin.Forms.Xaml.XamlParseException: Position 7:6. Type rox:VideoView not found in xmlns clr-namespace:Rox;assembly=Rox.Xamarin.Video.Portable
What is the problem?
Upvotes: 0
Views: 1227
Reputation: 2617
Hello there I think I know how to solve your problem
Do not put the view inside a stacklayout , it wont show, try to put it in a grid instead.
If you are running an iOS project then make sure to call Rox.VideoIos.Init();
before Xamarin.Forms.Forms.Init();
inside the AppDelegate.CS
Change the source of the video to something that actually works
<Grid>
<roxv:VideoView AutoPlay="True"
LoopPlay="True"
ShowController="True"
Source="https://bitdash-a.akamaihd.net/content/MI201109210084_1/m3u8s/f08e80da-bf1d-4e3d-8899-f0f6155f6efa.m3u8" />
</Grid>
I made a dummy project that might help you , you can download it from here
Upvotes: 1