Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cross-Platform Media in Xamarin

Cross-Platform Media in Xamarin

Building an application that needs to consume media, such as audio or video? In this session, Martijn explains how you can play any media in a cross-platform manner and how to play media using external plugins like VLC and ExoPlayer.

Martijn van Dijk

April 28, 2016
Tweet

More Decks by Martijn van Dijk

Other Decks in Technology

Transcript

  1. Image in code // IBitmap is a type that provides

    basic image information such as dimensions IBitmap profileImage = await BitmapLoader.Current.Load(imageBytes, null, null); // ToNative always converts an IBitmap into the type that the platform // uses, such as UIBitmap on iOS or BitmapSource in WPF ImageView.Source = ViewModel.ProfileImage.ToNative(); // This works in a Portable Library, or even in your ViewModel Var ProfileBackgroundAccentColor = new Color(255, 255, 255, 255); ImageView.Background = ViewModel.ProfileBackgroundAccentColor.ToNativeBrush();
  2. Android • Android Support V4 ◦ MediaSessionCompat ◦ MediaControllerCompat ◦

    PlaybackStateCompat ◦ MediaBrowserServiceCompat ◦ NotificationCompat ◦ MediaButtonReceiver
  3. UX / UI • People spend more time using other

    apps than yours • (Unless you’re Facebook) • Users appreciate standard patterns over original solutions • An understandable user interface is crucial for a good user experience
  4. Get help on Slack xamarinchat.herokuapp.com Follow influencers @Mhvdijk @migueldeicaza @JamesMontemagno

    @Cheesebaron + Many more! Join on LinkedIn linkedin.com/ Contribute on Github github.com/Xamarin github.com/MvvmCross 19 Get involved!