question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Video don't start playing on iOS and Android Xamarin.Forms version : 4.5.0.530

See original GitHub issue

🐛 Bug Report

After install this nugets to all my projects in my solution :

Plugin.MediaManager (0.9.7)
Plugin.MediaManager.Forms (0.9.7)

Initialise plugin:

Android : CrossMediaManager.Current.Init(this);
iOS : CrossMediaManager.Current.Init();

Added to info.plist on iOS so i can use http://

<key>NSAppTransportSecurity</key>
<dict>
	<key>NSAllowsArbitraryLoadsInMedia</key>
	<true/>
</dict>

my xaml code is:

<ContentPage.Content>
        <StackLayout>
            <mm:VideoView
                BackgroundColor="Red"
                VerticalOptions="FillAndExpand"
                VideoAspect="AspectFit"
                ShowControls="True"
                Source="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"
                />
        </StackLayout>
    </ContentPage.Content>

******* I use navigation from Shell !!!

I’m testing android - iOS on Emulator - Simulator. And i get this:

No video is start playing just video view!

iOS:

Simulator Screen Shot - iPhone 11 - 2020-04-05 at 14 34 56

Android:

Screenshot_1586090143

Xamarin.Forms version : 4.5.0.530 No error.

Platform:

  • 🤖 Android
  • 📱 iOS

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
marsel-mocommented, May 23, 2020

@AndreasReitberger Yes you are right, when I posted my comment with new link I didn’t described that the problem was in https. Thanks for your comment hope it will help others to understand and solve this issue))))

1reaction
AndreasReitbergercommented, May 23, 2020

@marsel-mo I ran into the same error and figured out it’s related to the “https://” I tried your video here: Doesn’t work: http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4

Works: https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4

I guess it has something to do with this:

If you are playing audio from a http resource you have to take care of ATS. Optionally you can disable this for playing media. Add the following to your info.plist:

Edit: Just so this post: https://github.com/Baseflow/XamarinMediaManager/issues/646#issuecomment-565744088 I seems to be an issue of the simulators…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Video is not played in iOS project - xamarin
I have used Plugin.MediaManager in my Xamarin.Forms application. It works perfectly in Android project, but in iOS project it does not. I have ......
Read more >
Xamarin.Forms 4.5.0.725 (4.5.0 Service Release 6) ...
Release notes detailing new features, improvements, and issues fixed in Xamarin.Forms 4.5.0.725 (4.5.0 Service Release 6)
Read more >
Xamarin Community Toolkit MediaElement
This article explains how to use MediaElement to play video and audio in a Xamarin.Forms application.
Read more >
Custom Fonts in Xamarin.Forms app | by Sebastian Jensen
Forms it is way easier to add a custom font to your application. ... make sure that you are using at least version...
Read more >
4 New Features You Must Try in Xamarin.Forms 4.5
This blog post explains the new features you should try in the latest Xamarin.Forms 4.5 update, and its compatibility with Syncfusion ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found