Open link using VLC on OSX - macos

I've seen that applications like Steam, Spotify, and others, are able to launch native applications from inside Chrome, after the user allows the invocation in the pop up box. How can I do this from my own website, for VLC, or failing that, the default system video streaming application.

Sure, Safari, for example, will open VLC for rtmp:// links like
<a target="_blank" href="rtmp://zozolala.com">text</a>
You can invoke video player from JavaScript:
window.open('rtmp://zozolala.com', '_blank');
You can specify URLs your OS X app can open by adding them to .plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLIconFile</key>
<string></string>
<key>CFBundleURLName</key>
<string>abc</string>
<key>CFBundleURLSchemes</key>
<array>
<string>abc</string>
</array>
</dict>
</array>
If you want to feed your VLC with HTTPS URI (this URI will be opened in Safari by default), you can do a trick: prepare .m3u playlist file with https:// entry inside and make this file be available via some other protocol (for which default app is VLC), like RSTP or SFTP.

Do not assume the user has VLC installed. To answer exactly your request :
If you are using web technologies, you'll probably have no other choice than a Java plugin, Flash, ActiveX or SilverLight to Exec an external application.
This one for ActionScript (Flash) : Execute external exe from projector flash
May be this one for your Java Plugin Executing an external program using process builder or apache commons exec
If you are using native technologies (C/C++, Objective-C, etc). You can use Exec... More specifically, on Mac OSx, you'll probably want to refer to Execute a terminal command from a Cocoa app

Related

Flutter MacOS : Additional implementation for sign in with google

I' ve developed a Flutter app based in Firebase Auth with the additional sign in method of Sign in With Google.
I implemented it using the package google_sign_in: ^4.5.6 .
It works easily for iOS, Android and Web. For MacOS I used the same Certificate and added this code in the info.plist file:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.*****/Private key/*</string>
</array>
</dict>
</array>
But it still doesn't work.
The macOS app works perfectly using Firebase Auth and is also connected to the network. So:
Is there a more action to do or code to add (like WEB support)?
If I press the google sign in button nothing is shown it doesn't open the page with google log in and Also in the console it returns nothing.
google_sign_in: ^5.0.2 is not currently supported, only android iOS and web

facetime - AutoAcceptInvites

Before High Sierra, I had the ability to automatically accept FaceTime calls in Mac OS X (within com.apple.FaceTime.plist).
After I had a chat today with an Apple supporter, I know that it no longer works with the following code (it has never been officially supported):
<key>AutoAcceptInvites</key>
<true/>
<key>AutoAcceptInvitesFrom</key>
<array>
<string>myadress#foobar.com</string>
</array>
This functionality is very important for me. Does anybody know another workaround?

Black screen when launching the app on device since XCode7 update

I've updated XCode7 and like everyone, i have to amend a part of my code to be compliant with Swift2.
But i have a problem, when i m testing the app on the simulator i have no problem. But when i m trying directly on my real device (Iphone 5S IOS9), a black screen displays just with the level of the battery.
I have tried during 3 days to find something on stackoverflow, but nothing seems working.
This topic seems to be the same problem, but doen't work actually. IOS 7 launch image, displaying black screen on device ONLY
I' ve followed the topic iOS 9 Black Launch Screen but it doesn't bring any correct solution
Any idea, or help will be appreciated.
Its worked for me:
You can solve this problem using following steps :
First select root level of project and then go in General tab and Find that below blocks.
By default, in "Launch images Source" it shows "Use assets catalogs", click on it
It will ask you to "Migrate launch images to an asset catalog", simply click on "migrate".
Now, In same block in "Launch Screen file", remove default launch screen xib or storyboard. because we don't need to specify it. Just put blank on there.
Now it shows, "Brand Assets" in *launch Images Source", just click on right side arrow of it and set all your app launch screen assets with specific naming scheme.
Press "alt + cmd + shift + k". It will clean build folder of your application.
Now, build and run your app in device.
When your app connects to an Webserver or to a domain with localhost or non https means http , than post below into your info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>127.0.0.1</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
This let the app make an exception to use Urls without SSL / https.

XPC communication between service and client app works only when launched from xcode

XPC communication works fine when I launch the targets from my Xcode. But, when I manually launch the service and client apps by double clicking them on the icons, the connection invalidation message shows up.Whay do they work fine inside xcode and not from outside ?.What magic is Xcode doing here to make the communication work.
For all folks, who met the same problem using xpc_connection_create_mach_service: XPC works through a lot of launchd stuff; when we are debugging the app in xCode, it mediates the app and launchd connection, but without xCode we need to do it ourselves.
To get this alive, the one should start it through launchd using the launch plist file.
There is an example of such plist here, but it's not enough.
The trick is the MachServices key, which looks like:
<key>MachServices</key>
<dict>
<key>com.server.bundle-id</key>
<true/>
</dict>
This is the way we are creating the mach service, so I guess our XPC connection may have some mach port below it.

register a protocol on mac osx?

I have done it in windows, how do i register a protocol on mac osx. I want to click links in firefox (a href="somename://mylinkAndData") and launch a binary?
Have a look at Apple's Launch Services Programming Guide. You have to add CFBundleURLTypes to your apps Info.plist and register your app with LSRegisterURL().
Excerpt from Firefox.app/Contents/Info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLIconFile</key>
<string>document.icns</string>
<key>CFBundleURLName</key>
<string>http URL</string>
<key>CFBundleURLSchemes</key>
<array>
<string>http</string>
</array>
</dict>
....
EDIT: See Handling URL schemes in Cocoa for a how-to article

Resources