-
Notifications
You must be signed in to change notification settings - Fork 121
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
Fixing Media Player Behaviour #884
Conversation
Michael Neuwert seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
@michaelstingl I ensured that all media files are played continuously.. Everything else in current directory (pictures, documents) is filtered out. Don't think we should try to do special handling for pictures in scope of this change especially considering that playing media also does work when the app is in background (I think we discussed that may be we should sort of have a gallery mode in which we skip to the next item when picture was displayed for couple of seconds.. guess this would need significantly more work given current preview architecture). |
@mneuwert okay, perfect 👍 Could be future option: Include images is auto-play. |
May be also separate it? Like if you open picture, then you just have pictures changed one after another? Not mixing pictures and audio / video files? |
extension OCItem { | ||
var isPlayable: Bool { | ||
guard let mime = self.mimeType else { return false } | ||
|
||
guard let uti = UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, mime as CFString, nil) else { | ||
return false | ||
} | ||
|
||
return UTTypeConformsTo(uti.takeUnretainedValue(), kUTTypeAudiovisualContent) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice new addition to the OCItem
class.
We already have a OCItem+Extension
. I think it makes sense to move this code into this class, because it is more discoverable there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, this is context specific extension.. so for me it was easier to have it closer to the context in which it is used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this extension is also interesting for an upcoming shortcut extension. For that I the OCItem+Extension
is a better place in my opinion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to the extension you mentioned.
Now, media files played in a row (audio & video). Other files, filtered. Approved |
Description
Fix for an issue when playing multiple items in the same directory. If e.g. image item is the next one, multi media playback would stop.
Related Issue
n/a
Motivation and Context
User would like to play all audio-visual files in a row without interruption.
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: