-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Christmas Edition - Audio_service addon to flet_video #4558
base: main
Are you sure you want to change the base?
Conversation
I love your mood here! 😅🥂 |
Hey @syleishere, thanks for contributing. |
…t - throttle configurable
Sure, just adding on to example on Flet video page:
|
Well if that's it for review, then Merry Christmas everyone, now everyone can code a Flet music/video player, install it on their phones, pop in some wireless bluetooth buds and head to gym in New Year playing your own app and music in background :) Guess have to wait for Feodor sort out AndroidManifest.xml for this as it's a lot of mods, where on IOS it's like 2 lines in info.plist lol To recap on AndroidManifest.xml for audio_service from PR:
What this does is includes "tools" we need for audio_service
So again a complete example from flet client devel area PR:
The main required permissions for this:
and of course regular ones from media_kit people need like:
Flet developers will be required to use flet permissions package to enable these after. For testing in devel area while working on this, I just went to App Info on my phone or emulator and just enabled them all manually. IOS: Info.plist
Reference: |
@syleishere please dont mix up stuffs. |
Yeah I apologize, I normally wouldn't but Feodor asked me why I closed other PR, so figured he wanted it. Won't happen again. |
Can you move that into a separate PR, please? |
I am unsure how to do that, I can't seem to fork 2 copies of flet on github to do separate PR requests. Maybe I can create a branch as a workaround. |
* fix center_on * get default animation duration and curve
…let-dev#4525) * avoid jsonDecoding `Segment` and `BarChartRod` tooltips * avoid jsonEncoding `Segment` and `BarChartRod` tooltips * Unset theme visual density default * Unset `SegmentedButton` border side default * `TextField.hint_text` should be displayed if `label` is not specified
…et-dev#4526) * `BorderSideStrokeAlign` should inherit from float * properly parse `Chip.border_side`
…et-dev#4556) * ControlState: rename "" to "default" * resolve ControlState on user-defined order * fix failing tests * remove breaking line
Alright that worked, created a branch called popscope, allowed me do another PR to same repo. Done... |
Fixed race condition that happened when tracks switch and duration not updated yet, added buffer in seconds as someone may find it useful. Updating example with buffer, done with this PR, Merry Christmas.
|
So, this PR implements an ability to add background music for a silent video? Just trying to imagine how all that works without installing your PR on a real device :) |
It adds ability to play audio or video in background, I normally just load mp3s and hide the video player till I want to play a video, but only way to have it keep playing on android with phone screen off or backgrounded, needs a foreground service with a notification to do that which audio_service provides. You can just run it on an emulator for testing, I just hit the play button on android studio and select an emulator to use. When its installed on emulator, you can long press the app, go to permissions and just manually enable everything, every subsequent run of the app will run with full permissions. Only reason it would not work is if you haven't given it permissions on app itself, or your AndroidManifest.xml is not matching one from PR. When you can drag your mouse from the top down and see the audio_service notification, you have everything running correctly, i'd edit the SONG_LIST and use normal length mp3's for testing if your using the example. Here's a few links you can use with audio only: Without that audio_service plugin, flet users would not stand a chance of competing against other music players on play store, as they all use it. |
Description
Christmas Edition, full background play on android/IOS now, full bluetooth support, beautiful configurable notification screen, a function to update flet slider with percentages for position.
Test Code
Nothing changes to normal example except more configurable options.
Type of change
Checklist
Additional details
Requires heavy mods to flet-build-template, I will submit a PR to -dev branch there like I have done with client dev area manifest here.
Summary by Sourcery
Integrate audio_service to enable background media playback and Bluetooth control on Android and iOS. Add a configurable notification screen and a function to update the Flet slider with media position percentages. Update AndroidManifest.xml to support new features.
New Features:
Enhancements: