Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[Proposal] Add ThumbnailImageSource and OnBuffering Properties

Open PrathamsGithub opened this issue 1 year ago • 2 comments

Feature name

Add ThumbnailImageSource and OnBuffering Properties

Link to discussion

https://github.com/CommunityToolkit/Maui/issues/1749

Progress tracker

  • [X] Android Implementation
  • [X] iOS Implementation
  • [X] MacCatalyst Implementation
  • [X] Windows Implementation
  • [ ] Tizen Implementation
  • [ ] Unit Tests
  • [x] Samples
  • [ ] Documentation

Summary

This proposal if for adding two properties:

  1. "ThumbnailImageSource" This property can be use to show thumbnail image when video is not loaded.
  2. "OnBuffering" This Property will be an event which will trigger when the video is buffering. Using this we can show/hide activity indicator when this event triggers.

Motivation

This can improve the user experience and enhance the video rendering

Detailed Design

public class MediaElement {

public static readonly BindableProperty ThumbnailImageSourceProperty; public static readonly BindableProperty OnBufferingProperty;

public ImageSource ThumbnailImage
{
    get ;
    set ;
}

public EventHandler<CurrentState> OnBuffering
{
    get ;
    set ;
}

}

Usage Syntax

<toolkit:MediaElement 
Source="https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
ShouldShowPlaybackControls="True"
ThumbnailImageSource="Bunny.png"
OnBuffering="MediaElement_OnBuffering" />

Drawbacks

No response

Alternatives

No response

Unresolved Questions

No response

### Tasks

PrathamsGithub avatar Mar 13 '24 06:03 PrathamsGithub

Hi @PrathamsGithub!

This Proposal is missing two things before we can move forward:

  1. The Link to Discussion points to a Discussion on Disposing MediaElement. Please correct this link to point to your Discussion on ThumbnailImageSource
  2. Detailed Design needs to include code and show the API Design. See other Proposals, like RatingView, for examples.

TheCodeTraveler avatar Mar 13 '24 15:03 TheCodeTraveler

Hi @PrathamsGithub!

This Proposal is missing two things before we can move forward:

  1. The Link to Discussion points to a Discussion on Disposing MediaElement. Please correct this link to point to your Discussion on ThumbnailImageSource
  2. Detailed Design needs to include code and show the API Design. See other Proposals, like RatingView, for examples.

Thanks for helping me. I didn't found any discussion regarding this proposal. So, I added this as Link to Discussion.

PrathamsGithub avatar Mar 13 '24 15:03 PrathamsGithub