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

[PoC]Added very basic support of theme Pause/Resume music and Music name #57, #63 #78

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ashpynov
Copy link

Please Here a PR to implement on 'old' version of extension abilty to integrate with theme to Pause/Resume music and expose current music name.

As soon as there is new extension major version development - I done modification to be as small as possible.

Information how to use it in theme added to readme.

@ashpynov ashpynov force-pushed the main branch 2 times, most recently from 9cc9cbe to 0d3f687 Compare May 27, 2024 19:01
@cnapolit
Copy link
Collaborator

cnapolit commented Jun 8, 2024

Hey @ashpynov! Sorry for letting this PR linger for so long. The plans I had for developing this plugin were interrupted by a lot of unexpected road blocks.

As you might have noticed, I work out of a fork (https://github.com/cnapolit/PlayniteSound) that I merge into this repo once I'm ready for the next release. This fork is drastically different than the current state of this repo, with even more changes I have yet to commit. Thus, there would be some stellar conflicts that will be easier to handle via a fresh branch.

With that in mind, I'll try and finalize all the changes I have locally and let you know once it's complete.
After which, we can try and work in the fundamental idea behind these changes.

I will still look through this PR and drop a comment here and there.

If at any point you want to chat more directly, feel free to message me over discord.
Text or audio both work for me.

Value="{StaticResource False}">
<Setter
Property="Tag"
Value="{Binding ElementName=ExtraMetadataLoader_VideoLoaderControl_NoControls_Sound, Path=Content.SettingsModel.Settings.IsVideoPlaying}"
Copy link
Collaborator

@cnapolit cnapolit Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Judging from this line and the use of SettingsModel, Content is the plugin object itself.
However, it's not clear how the plugin is being injected. My best guess would be Playnite itself.
Lines 117 & 126 throw me off a little, since I don't see a IsPlayerMuted property in any of the changes in this PR.
Is this readme up to date?

Copy link
Author

@ashpynov ashpynov Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well this part is outdated a little but as soon as now Mod injectect itself handling MediaElement.MediaOpenedEvent https://github.com/ashpynov/PlayniteSound/blob/66033f8eb7b41e590526c7bd6ace5f2f4e62fb34/PlayniteSounds.cs#L167 and https://github.com/ashpynov/PlayniteSound/blob/66033f8eb7b41e590526c7bd6ace5f2f4e62fb34/MediaElementsMonitor.cs#L47

Afrer it enumerate existing MediaElements with audio/video and pool their status.

So it no more actual to manually control extension from theme size but Mute music control via Tag remains

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a replacer, we could have a settings option to toggle between the two in case one or the other has issues.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only in case if it will load on runtime. Cause now it prevent loading of extension at all.

@ashpynov ashpynov changed the title Added very basic support of theme Pause/Resume music and Music name #57, #63 [PoC]Added very basic support of theme Pause/Resume music and Music name #57, #63 Jun 8, 2024
@ashpynov
Copy link
Author

ashpynov commented Jun 8, 2024

Hey @ashpynov! Sorry for letting this PR linger for so long. The plans I had for developing this plugin were interrupted by a lot of unexpected road blocks.

As you might have noticed, I work out of a fork (https://github.com/cnapolit/PlayniteSound) that I merge into this repo once I'm ready for the next release. This fork is drastically different than the current state of this repo, with even more changes I have yet to commit. Thus, there would be some stellar conflicts that will be easier to handle via a fresh branch.

With that in mind, I'll try and finalize all the changes I have locally and let you know once it's complete. After which, we can try and work in the fundamental idea behind these changes.

I will still look through this PR and drop a comment here and there.

If at any point you want to chat more directly, feel free to message me over discord. Text or audio both work for me.

Please consider this PR as Proof-Of-Concept. I will support this functionality in my modded version till you will complete your part of work. Then I will try reimplement approved/confirmed ideas on new codebase.

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

Successfully merging this pull request may close these issues.

None yet

2 participants