Skip to content
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

VideoController.mixWithOthers has no effect #172

Open
AlexV525 opened this issue Oct 25, 2024 · 15 comments
Open

VideoController.mixWithOthers has no effect #172

AlexV525 opened this issue Oct 25, 2024 · 15 comments
Assignees
Labels
enhancement New feature or request

Comments

@AlexV525
Copy link
Contributor

Describe the bug

When using fvp on iOS, setting mixWithOthers in the VideoPlayerController will still cause the background playback to stop when calling the VideoPlayerController.initialize or VideoPlayerController.play.

Also, playing background audio when the video is playing will cause the video to run into a very slow framerate.

Logs
mdk.log

@wang-bin wang-bin self-assigned this Oct 27, 2024
@wang-bin wang-bin added the enhancement New feature or request label Oct 27, 2024
@wang-bin
Copy link
Owner

try master branch

@AlexV525
Copy link
Contributor Author

Error (Xcode): ../../../../.pub-cache/git/fvp-8281ae0ab6057e6665d181fb7ed1ebd99da06f71/lib/src/video_player_mdk.dart:344:26: Error: The method 'setMixWithOthers' isn't defined for the class 'FvpPlatform'.

@AlexV525
Copy link
Contributor Author

@AlexV525
Copy link
Contributor Author

AlexV525 commented Oct 29, 2024

How about Android and other platforms (I know that macOS has nothing to do with the playback mode support)?

@wang-bin
Copy link
Owner

Error (Xcode): ../../../../.pub-cache/git/fvp-8281ae0ab6057e6665d181fb7ed1ebd99da06f71/lib/src/video_player_mdk.dart:344:26: Error: The method 'setMixWithOthers' isn't defined for the class 'FvpPlatform'.

i forgot to commit some files. try master branch again

@AlexV525
Copy link
Contributor Author

i forgot to commit some files. try master branch again

The code is working.

@wang-bin
Copy link
Owner

How about Android and other platforms (I know that macOS has nothing to do with the playback mode support)?

android should be similar. i guess desktop platforms have no such feature

@AlexV525
Copy link
Contributor Author

So I guess the remain thing is to implement this with the Android platform.

@wang-bin
Copy link
Owner

So I guess the remain thing is to implement this with the Android platform.

yes, but i don't have enough time recently

@AlexV525
Copy link
Contributor Author

Is the repo open for pull requests? If so I can try to add the functionality.

@wang-bin
Copy link
Owner

yes

@AlexV525 AlexV525 changed the title VideoController.mixWithOthers has no effect on iOS VideoController.mixWithOthers has no effect Oct 31, 2024
@AlexV525
Copy link
Contributor Author

I took some investigation with Android. video_player deals with the audio session within the ExoPlayer, but we don't seem to have such an interface to control that behavior. The video's audio track is always mixed with other audio on Android, so we should implement the contrary. I don't think there is anything I can do further.

@wang-bin
Copy link
Owner

wang-bin commented Nov 1, 2024

same as #72, audio_session package support this feature

@AlexV525
Copy link
Contributor Author

AlexV525 commented Nov 1, 2024

same as #72, audio_session package support this feature

Absolutely! But it would be better to perform the same behavior as the video_package since the library declares itself as a plugin set.

@wang-bin
Copy link
Owner

wang-bin commented Nov 1, 2024

yes, so that issue is still open. we can use audio_session's implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants