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

iOS: POC: Added option to open webm files in iOS VLC app #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chinese-soup
Copy link
Collaborator

@chinese-soup chinese-soup commented Feb 4, 2021

Hello.

This is a very simple PoC enabling opening webm in the iOS VLC application when it's installed and therefore enabling at least somewhat of a good user experience with webms sent to the user on IRC if he's willing to use VLC on his device.

Link to VLC for Mobile: https://apps.apple.com/us/app/vlc-for-mobile/id650377962

Pros:
This adds option "Attempt to open webms in VLC" to the Settings dialog only when the platform is iOS, otherwise the setting is set to false and not rendered in the Settings dialog.

When this setting is enabled:

  • If the user is using Directly open links -> it will prepend "vlc://" to the link and open the link using Qt.openUrlExternally()
  • If the user is using the link popup window with actions (open in browser/preview) the preview & open in browser buttons BOTH do the same thing and again, prepend "vlc://" the URL & open Qt.openUrlExternally() -- this is the only thing that is probably nonsensical and the "Open in browser" button should maybe actually open the browser?
  • Note: If the user never opened a vlc:// link from Lith before, he will get a dialog about "Lith wants to open VLC", tested on iOS 13.7, 14 and up might have different behavior/dialog, cannot test that.

Before & after behavior can be seen on this video:
https://user-images.githubusercontent.com/5108747/106830915-4477f200-668f-11eb-860d-5db94275aac7.mp4

Cons:

  • As of right now (and probably no way around it), if the user doesn't have VLC installed, enabling this option right now will result in no operation (aka link won't be opened at all since there's no app that would open the vlc:// scheme). Should maybe warn the user when he sets the option to true that "he makes sure he actually has VLC installed otherwise webms won't be opening"?
  • Additional Info.plist permission needed so that the app can call the vlc:// scheme link. This poses a potential "rejection on AppStore by Apple" problem, since it's vlc:// and not stuff like instagram://, who knows what's their stance on this stuff.

Suggestions, discussion, opinions welcome :)
BTW: If iOS 14 somehow "fixes" this and you can somehow associate .webms in Safari to directly open in an app, then this may be useless and I apologize, but on iOS 13.7 that I'm running the only option after opening in Safari (or any other browser) is to "Download" and open in VLC manually or "Share" to VLC which downloads it and opens it in VLC instead of streaming it.

@chinese-soup
Copy link
Collaborator Author

Also sorry for the irrelevant changes in the Info.plist file, QtCreator did that for some reason, I'll fix if neccessary. The relevant change in Info.plist is:

	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>vlc</string>
	</array>

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

Successfully merging this pull request may close these issues.

None yet

2 participants