Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[video_player] Implemented playback speed feature #1400

Closed
wants to merge 34 commits into from

Conversation

JONA-Cureambit
Copy link

@JONA-Cureambit JONA-Cureambit commented Mar 26, 2019

Description

This feature will allow developers to give options to client for changing speed of playback while watching video. Video can be watch in slow , fast or normal speed depends on the speed value provided to video controller. To watch slow speed video set speed value less than 1.0 and to watch in fast speed sets speed value more than 1.0.

Related Issues

flutter/flutter#29900
flutter/flutter#16624
flutter/flutter#27591

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

Sorry, something went wrong.

…uld be played is set to playbackparameter instance. The same instance is been set to exoplayer.
Value can be 1x, 2x and accordingly speed of video will be set.

To watch video in slow motion set value of speed less than 1.0
Similary set value more than 1.0 to watch the playback in high speed.

By Default speed of video will be 1.0 which is normal speed.
@ened
Copy link
Contributor

ened commented Mar 29, 2019

Looks like a great PR. @bparrishMines Could you help to review this PR & merge? :-)

@amirh
Copy link
Contributor

amirh commented Mar 29, 2019

Note for reviewer: #860 seems to be doing the same.

@arronKler
Copy link

this functionality is very useful, nice job.

…uld be played is set to playbackparameter instance. The same instance is been set to exoplayer.
Value can be 1x, 2x and accordingly speed of video will be set.

To watch video in slow motion set value of speed less than 1.0
Similary set value more than 1.0 to watch the playback in high speed.

By Default speed of video will be 1.0 which is normal speed.
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@eltonmorais
Copy link

video_player from @JONA-Cureambit is awesome!
It works well.

pubspec.yaml

image

@luckypal , whick video server are you using? I'm trying with Vimeo, but receives that when I call setSpeed:
codec does not support config operating rate (err -1010)

@jerryzhoujw
Copy link
Contributor

jerryzhoujw commented Apr 24, 2020

@iskakaushik iskakaushik removed their request for review April 28, 2020 16:34
@MichealReed
Copy link

Has anyone gotten this to work with web yet? Using

  video_player:
    git:
      url: https://github.com/JONA-Cureambit/plugins.git
      path: packages/video_player

image

May be related to flutter/flutter#42880 @JONA-Cureambit @recastrodiaz

@eltonmorais
Copy link

Please, implement that! It's very important...

@wanjm
Copy link

wanjm commented May 18, 2020

I have waitting for one year for this, when will it be ready;

@z234009184
Copy link

+1

@ChristianKleineidam
Copy link

Can someone clarify which author consent currently can't be verified (and thus is blocking the PR)?

@MichealReed
Copy link

This PR will break web support and should not be merged until that is corrected. Web is now supported by the official video player.

@ChristianKleineidam
Copy link

@MichealReed : As far as I understand the general guidelines, then it's not required to support a feature on all platforms to add it: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-the-lowest-common-denominator

@wanjm
Copy link

wanjm commented May 28, 2020

I hope we can make it work in android and ios;

@JONA-Cureambit
Copy link
Author

@bparrishMines @iskakaushik can you please review this PR. It is waiting in Queue since 1 year.
Many will be benefited with this feature.

@MichealReed
Copy link

MichealReed commented May 29, 2020

@MichealReed : As far as I understand the general guidelines, then it's not required to support a feature on all platforms to add it: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#avoid-the-lowest-common-denominator

This section of the documentation is talking about providing proper support based on what supported platforms have available, not excusing a lack of support for a specific platform. It is perfectly viable to support this on web with full features. The video player plugin supports web today, and that support should not be broken because of this feature.

@ChristianKleineidam
Copy link

In general video player support for web wouldn't be broken. Everything that possible today with the web client would also be possible if this pull request would be merged.

If there's a general policy of "Pull request for new features should only be merged once the new feature is available for all supported platforms" such a policy should be explicit in the style guide (or another document such as the contributor guide).

While such a policy has some advantages it produces problem such as lower code quality (developers get forced to write code outside of their core languages to contribute a new feature) and it slows down the adoption of new features espcially as the number of supported platforms grows in the future.

@wanjm
Copy link

wanjm commented May 29, 2020

flutter for ios and android has been released for 1.5 years, but flutter for web still in beta yet; so it is reasonable for plugins to support ios and android first and then support for web in another step;

@eltonmorais
Copy link

Hope that you got this solved ASAP. Today almost everyone that consume information videos daily like and use that feature. The lack of it it's really annoying. And know that it's waiting for 1 year to be accepted it's unbelievable.

@devanflores
Copy link

Is there a reason why the feature isn't implemented for web? It seems as though these methods just have to be implemented in the video_player_web.dart file

@MichealReed
Copy link

In general video player support for web wouldn't be broken. Everything that possible today with the web client would also be possible if this pull request would be merged.

If there's a general policy of "Pull request for new features should only be merged once the new feature is available for all supported platforms" such a policy should be explicit in the style guide (or another document such as the contributor guide).

While such a policy has some advantages it produces problem such as lower code quality (developers get forced to write code outside of their core languages to contribute a new feature) and it slows down the adoption of new features espcially as the number of supported platforms grows in the future.

I manually merged this PR with a fork of master that works on web and can confirm that the video player on web entirely breaks from this PR. I understand that the new features might not need to function immediately on web, but it should at least retain functionality.

@danbai225
Copy link

Inspired by the project, I reimplemented the project in a basic new version and applied it to my current APP.But I'm sorry I'm not familiar with IOS development so it only supports Android.
video_player
Thanks to the author

@behnam-lum
Copy link

Any update here?

@zbarryte-luminopia
Copy link

Anything?

@behnam-lum
Copy link

behnam-lum commented Aug 24, 2020

@JONA-Cureambit 👇 It's mentioned that your consent is not verified.

@creativecreatorormaybenot
Copy link
Contributor

Just a note to anyone waiting for an update to this: I implemented the playback speed feature for the latest version of video_player and have a finished PR: #3031

However, I am still awaiting review and we can hopefully get the three parts merged soon 🙂

@ditman
Copy link
Member

ditman commented Sep 26, 2020

Published video_player v0.11.0, which contains the playback speed feature!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet