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
Audio track switches when closing the lid of my mac book #4912
Comments
Similar to many open source projects IINA is layered on top of other projects. For audio/video playback and subtitle rendering IINA is using a library from the mpv project. For this reason the issue template contains this section which is frequently a source of confusion:
The idea is that if the problem reproduces using the mpv player then it is likely the root cause of the problem is in mpv code and an issue needs to be filed with the mpv project. IINA code registers listeners for events emitted by the Do you have external devices attached to the Mac, especially audio devices? Drag-n-drop a full mpv.log file to the comment box and post it. I will see if there is anything in that log that provides a clue as to what is happening. |
Hi low-batt, When using IINA, the issue happens with my macbook speakers (so no other devices) as well as with my airpods connected. Here are the logs for mpv, sorry I didn't know there was two logs in my first post, it definitly seems to have more to say about the track cycling 🤔 Inline Logs
|
Thank you for supplying the mpv logfile. The log has an important clue:
The API
Is being run on the aid option using the alias
It appears the audio track is changing because Which key bindings are you using? IINA will send a I created a video with multiple audio tracks and tried to reproduce this, but could not get the audio track to change. I'm confused by this behavior. |
You are experiencing IINA behavior that can't be explained. That is a valid IINA issue, even if it is triggered by a 3rd party app. I'm very glad you entered an issue asking for help. Although is seems the Amphetamine Can you describe the situation a little more. Is IINA actively playing a video when you close the lid? In full screen mode? That kind of thing. In IINA's settings on the |
Hey low-batt, thank you for taking this seriously. In the meantime I have looked in the key bindings and you were right to point me toward it, I was using IINA bindings and after making a duplicate of it and changed the binding for Cycle Audio Track the issue doesn't appear anymore. So it looks like Amphetamine is calling the same binding when the lid is closed. Just for the fun of it I made a video of the issue: https://youtu.be/ztyNghEbdUQ For for know the fix on my end would be to simply change the binding, but I'm pretty sure now that Amphetamine has to look into it. |
The video provides more evidence that something is sending IINA a key event as you showed the problem does not reproduce if the focus is not on the IINA window. By default the command to cycle audio is bound to The only other use of that I found was this entry from Mac keyboard shortcuts:
Seem like an odd key combination for Amphetamine to be sending. Could an additional 3rd party app be involved? Do you have installed any "helper" apps that send key events to apps? Alfred, BetterTouchTool, Butler, etc. Something that might trigger when the screen is locked? |
I also noticed that Amphetamine doesn't actually lock the screen when the lid is closed, so that's another clue tellling me that the feature isn't actually working and the shortcut might have just been mixed up. |
This seems like a good theory to ask Amphetamine about. |
I'll wait for their response, hopefully they'll have a look a this thread and might give us some answers. I'll be sure to let you know what's what. |
I am always frustrated when a computer refuses to obey me, especially if the reason for the rebellious behavior is a mystery. Hopefully Amphetamine will be able to explain the behavior. I do want to hear about it if the root cause is uncovered. If you need additional help, don't hesitate to ask. |
System and IINA version:
Expected behavior:
The track should not change.
Actual behavior:
When I close my lid, the track changes to the next one, it always switch to the next one and cycles over and over each time the lid closed again. My macbook doesn't go to sleep when i close the lid. I use Amphetamine to keep it awake. I tried disabling the automatic music mode as I thought maybe it has something to do with the fact that the screen turned off, but it didn't change anything.
My log:
mpv log: Note that those last three lines are three instances of me closing and reopening the lid.
Steps to reproduce:
Prevent your macbook from going to sleep when the lid is closed, then close the lid while a media is playing.
For me even media with only one track will switch to None.
Not sure about that one.
How often does this happen?
Always.
The text was updated successfully, but these errors were encountered: