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.

[Proposal] MediaElement

See original GitHub issue

MediaElement

  • Proposed
  • Prototype: Not Started
  • Implementation: Not Started
    • iOS Support
    • Android Support
    • macOS Support
    • Windows Support
  • Unit Tests: Not Started
  • Sample: Not Started
  • Documentation: Not Started

Summary

MediaElement is a view for playing video and audio. Media that’s supported by the underlying platform can be played from the following sources:

  • The web, using a URI (HTTP or HTTPS).
  • A resource embedded in the platform application, using the ms-appx:/// URI scheme.
  • Files that come from the app’s local and temporary data folders, using the ms-appdata:/// URI scheme. The device’s library.

Detailed Design

MediaElement.shared.cs

public class MediaElement : View, IMediaElementController
{
  public static readonly BindableProperty AspectProperty;
  public static readonly BindableProperty AutoPlayProperty;
  public static readonly BindableProperty BufferingProgressProperty;
  public static readonly BindableProperty CurrentStateProperty;
  public static readonly BindableProperty DurationProperty;
  public static readonly BindableProperty IsLoopingProperty;
  public static readonly BindableProperty KeepScreenOnProperty;
  public static readonly BindableProperty PositionProperty;
  public static readonly BindableProperty ShowsPlaybackControlsProperty;
  public static readonly BindableProperty SourceProperty;
  public static readonly BindableProperty VideoHeightProperty;
  public static readonly BindableProperty VideoWidthProperty;
  public static readonly BindableProperty VolumeProperty;
  public static readonly BindableProperty SpeedProperty;
  
  public double BufferingProgress { get; }
  public bool CanSeek { get; }
  public MediaElementState CurrentState { get; }
  public TimeSpan? Duration { get; }
  public int VideoHeight { get; }
  public int VideoWidth  { get;}
  
  public Aspect Aspect { get; set; }
  public bool AutoPlay { get; set; }
  public bool IsLooping { get; set; }
  public bool KeepScreenOn { get; set; }
  public bool ShowsPlaybackControls { get; set; }
  public TimeSpan Position { get; set; }
  [Forms.TypeConverter(typeof(MediaSourceConverter))]
  public MediaSource? Source { get; set; }
  public double Volume { get; set; }
  public double Speed { get; set; }
  
  public event EventHandler? MediaEnded;
  public event EventHandler? MediaFailed;
  public event EventHandler? MediaOpened;
  public event EventHandler? SeekCompleted;
  
  public void Play() ;
  public void Pause();
  public void Stop();
}

Usage Syntax

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:14
  • Comments:52 (18 by maintainers)

github_iconTop GitHub Comments

8reactions
jfversluiscommented, Oct 5, 2021

The MediaElement needs some love, I think what is there now is pretty stable, lots of room for improvement though. But I think a control to play media should actually be part of .NET MAUI in-the-box. While it’s not that, I think we should definitely have it in the Toolkit to provide something, hopefully build it out and move it over to .NET MAUI as a mature control.

7reactions
brminnickcommented, Sep 30, 2022

Removing the blocked label now that Xam.Plugins.Android.ExoPlayer has added support for net6.0-android

Read more comments on GitHub >

github_iconTop Results From Across the Web

MediaElement proposal for animation & interactive video
MediaElement proposal for animation & interactive video · IDLE Champions - visual formations and effects guide · TuneMingo Review & Demo - A.I...
Read more >
Media Multitrack Change Proposal - HTML accessibility ...
Synchronize separate media elements through attributes. SUMMARY. This is a change proposal for ISSUE-152, introducing markup, an API, and rendering ...
Read more >
MediaElement Class (System.Windows.Controls)
Represents a control that contains audio and/or video.
Read more >
Blog | Liqvid
MediaElement is a proposed interface for general-purpose imperative animation, patterned after HTMLMediaElement .
Read more >
MediaElement Player style breaks for logged in users
MediaElement Video/Audio player breaks when logged in as a user or admin. It breaks for both ... Proposed resolution. Remaining tasks.
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