Url Winamp Command Handler



-->

Apps for Websites associates your app with a website so that when someone opens a link to your website, your app is launched instead of opening the browser. If your app is not installed, your website opens in the browser as usual. Users can trust this experience because only verified content owners can register for a link. Users will be able to check all of their registered web-to-app links by going to Settings > Apps > Apps for websites.

AFAIK, you can enter 'linein://' as a URL (click 'Add, URL') to make Winamp playback line-in audio. In theory, that should work with any odd output plugin; I haven't tried it, though. This only works if you have incdda.dll, the standard Audio CD/Line-In plugin, installed. Interface Description; IUrlAccessor: For a specified URL, the IUrlAccessor interface provides access to the properties of the item that is exposed in the URL. It can also bind those properties to a protocol handler-specific filter (that is, a filter other than the one associated with the file name). A leaked version of Winamp 5.8 recently spread over the Internet. Consequently, we have decided to make this new version available to you, revised by us. We therefore recommend that you download this version rather than any other as we guarantee it is safe for you to use. . SendMessage(hwndwinamp, WMCOMMAND,commandname,0);./ # define WINAMPOPTIONSEQ 40036 // toggles the EQ window # define WINAMPOPTIONSPLEDIT 40040 // toggles the playlist window # define WINAMPVOLUMEUP 40058 // turns the volume up a little # define WINAMPVOLUMEDOWN 40059 // turns the volume down a little # define WINAMPFFWD5S 40060.

To enable web-to-app linking you will need to:

  • Identify the URIs your app will handle in the manifest file
  • A JSON file that defines the association between your app and your website. with the app Package Family Name at the same host root as the app manifest declaration.
  • Handle the activation in the app.

Note

Starting with the Windows 10 Creators update, supported links clicked in Microsoft Edge will launch the corresponding app. Supported links clicked in other browsers (for example, Internet Explorer, etc.), will keep you in the browsing experience.

A leaked version of Winamp 5.8 recently spread over the Internet. Consequently, we have decided to make this new version available to you, revised by us. We therefore recommend that you download this version rather than any other as we guarantee it is safe for you to use.

Register to handle http and https links in the app manifest

Your app needs to identify the URIs for the websites it will handle. To do so, add the Windows.appUriHandler extension registration to your app’s manifest file Package.appxmanifest.

For example, if your website’s address is “msn.com” you would make the following entry in your app’s manifest:

The declaration above registers your app to handle links from the specified host. If your website has multiple addresses (for example: m.example.com, www.example.com, and example.com) then add a separate <uap3:Host Name=... /> entry inside of the <uap3:AppUriHandler> for each address.

Associate your app and website with a JSON file

List

To ensure that only your app can open content on your website, include your app's package family name in a JSON file located in the web server root, or at the well-known directory on the domain. This signifies that your website gives consent for the listed apps to open content on your site. You can find the package family name in the Packages section in the app manifest designer.

Important

The JSON file should not have a .json file suffix.

Create a JSON file (without the .json file extension) named windows-app-web-link and provide your app’s package family name. For example:

Windows will make an https connection to your website and will look for the corresponding JSON file on your web server.

Wildcards

The JSON file example above demonstrates the use of wildcards. Wildcards allow you to support a wide variety of links with fewer lines of code. Web-to-app linking supports two types of wildcards in the JSON file:

WildcardDescription
*Represents any substring
?Represents a single character

For example, given 'excludePaths' : [ '/news/*', '/blog/*' ] in the example above, your app will support all paths that start with your website’s address (for example, msn.com), except those under /news/ and /blog/. msn.com/weather.html will be supported, but not msn.com/news/topnews.html.

Multiple apps

If you have two apps that you would like to link to your website, list both of the application package family names in your windows-app-web-link JSON file. Both apps can be supported. The user will be presented with a choice of which is the default link if both are installed. If they want to change the default link later, they can change it in Settings > Apps for Websites. Developers can also change the JSON file at any time and see the change as early as the same day but no later than eight days after the update.

To provide the best experience for your users, use exclude paths to make sure that online-only content is excluded from the supported paths in your JSON file.

Exclude paths are checked first and if there is a match the corresponding page will be opened with the browser instead of the designated app. In the example above, ‘/news/*’ includes any pages under that path while ‘/news*’ (no forward slash trails 'news') includes any paths under ‘news*’ such as ‘newslocal/’, ‘newsinternational/’, and so on.

Handle links on Activation to link to content

Navigate to App.xaml.cs in your app’s Visual Studio solution and in OnActivated() add handling for linked content. In the following example, the page that is opened in the app depends on the URI path:

Important Make sure to replace the final if (rootFrame.Content null) logic with rootFrame.Navigate(deepLinkPageType, e); as shown in the example above.

Test it out: Local validation tool

Url

You can test the configuration of your app and website by running the App host registration verifier tool which is available in:

%windir%system32AppHostRegistrationVerifier.exe

Test the configuration of your app and website by running this tool with the following parameters:

AppHostRegistrationVerifier.exehostname packagefamilyname filepath

  • Hostname: Your website (for example, microsoft.com)
  • Package Family Name (PFN): Your app’s PFN
  • File path: The JSON file for local validation (for example, C:SomeFolderwindows-app-web-link)

If the tool does not return anything, validation will work on that file when uploaded. If there is an error code, it will not work.

You can enable the following registry key to force path matching for side-loaded apps as part of local validation:

HKCUSoftwareClassesLocalSettingsSoftwareMicrosoftWindowsCurrentVersion AppModelSystemAppDataYourAppAppUriHandlers

Keyname: ForceValidationValue: 1

Test it: Web validation

Close your application to verify that the app is activated when you click a link. Then, copy the address of one of the supported paths in your website. For example, if your website’s address is “msn.com”, and one of the support paths is “path1”, you would use http://msn.com/path1

Verify that your app is closed. Press Windows Key + R to open the Run dialog box and paste the link in the window. Your app should launch instead of the web browser.

Additionally, you can test your app by launching it from another app using the LaunchUriAsync API. You can use this API to test on phones as well.

If you would like to follow the protocol activation logic, set a breakpoint in the OnActivated event handler.

AppUriHandlers tips:

  • Make sure to only specify links that your app can handle.
  • List all of the hosts that you will support. Note that www.example.com and example.com are different hosts.
  • Users can choose which app they prefer to handle websites in Settings.
  • Your JSON file must be uploaded to an https server.
  • If you need to change the paths that you wish to support, you can republish your JSON file without republishing your app. Users will see the changes in 1-8 days.
  • All sideloaded apps with AppUriHandlers will have validated links for the host on install. You do not need to have a JSON file uploaded to test the feature.
  • This feature works whenever your app is a UWP app launched with LaunchUriAsync or a Windows desktop app launched with ShellExecuteEx. If the URL corresponds to a registered App URI handler, the app will be launched instead of the browser.

See also

Web-to-App example projectwindows.protocol registrationHandle URI ActivationAssociation Launching sample illustrates how to use the LaunchUriAsync() API.

Editor’s Note: This article was updated December 2019 to be more up-to-date.

“Script error” is one of the most cryptic error messages you may encounter. The main grievance is it provides no information about the actual cause of the problem. However, this secrecy is not a bug, but a feature that intends to protect your site from malicious attacks.

Command

Please refer to the Raygun technical documentation regarding Script errors for quick fixes to the most common causes.

Surface script errors quickly

What are Script errors?

Script errors occur when a client-side script that violates the same-origin policy of the user’s browser by making an invalid cross-origin HTTP request.

If you’re working on a website and have Raygun Crash Reporting hooked into your client-side JavaScript, “Script error” will probably be one of the first things you will notice appearing in your dashboard.

Quick Links

  • What causes Script errors?

What causes Script errors?

Script errors are mostly likely to be caused by an error within a script that’s hosted on a different domain (for example, CDN scripts). As a result, the user’s browser stops the script from executing in order to prevent an attack called cross-site request forgery. However, it may also be a problem if the script is stored on the same domain but uses a different port, protocol (for example http:// instead of https://), or subdomain.

Url For Music

For example, an error within a script on another domain might look like this:

In your domain, calling that script may look like this. This scenario will yield a script error being sent to Raygun4JS.

What is a Long Running Script?

You may also find an error similar to Script error in your Raygun dashboard, called “Long Running Script”. Their names are similar, but they are entirely different errors you need to handle differently.

While Script error is caused by violating the browser’s same-origin policy, a Long Running Script indicates performance issues. Every browser has a timeframe for script execution. If a script needs more time to execute, a Long Running Script error will occur. The user will also be presented with a dialog box where they can decide if they want to stop the script or keep waiting for their asset to load.

You can resolve the Long Running Script error by using coding best practices, modularizing your scripts, and thoroughly testing code before deployment under as many different conditions as possible.

Script error–The same-origin policy

CORS, or Cross-Origin Resource Sharing, is an official W3C recommendation that defines the mechanism of properly making cross-origin requests on the client side. The same-origin policy, enforced by modern browsers, means that scripts only have full access rights if they are loaded from the same origin domain as the original document—when the script passes the CORS validation.

With regards to the architecture of modern websites and applications, CORS and the same-origin policy present a problem. Due to the nature of HTTP 1.1, key resources (including JavaScript) are hosted on non-origin, or ‘third-party’, domains. Particular to this problem, CDNs use the massive resources of public clouds to keep both costs and response times low.

When your web application code is defined and loaded to a script hosted on a different domain to the one in the address bar, errors that hit the window.onerror event handler won’t have any stack trace or message context for you to debug.

Not having a stack trace isn’t a problem when developing locally. However, no information on an error becomes a critical issue when trying to figure out why a site is breaking on a user’s machine. This is most obvious when Raygun4JS reports these errors, and the error groups lack any indication as to what happened.

Control the same-origin policy

The specification and implementation for controlling the same-origin policy is documented nicely here. You’ll notice proper implementations are only available in modern browsers. See different browser behaviors in detail at the end of the article.

There are two critical pieces of metadata to include to allow a cross-domain script to pass the CORS validation in a modern browser. You need to use the first one on the script tag you add to the HTML on the origin domain and the second one on the HTTP response sent by the third-party domain.

1. On the origin domain

As the above documentation lists, you need to use the crossorigin attribute on the appropriate script tag. By example:

Pro-tip

Omitting the protocol from the URL when including the script will result in the current protocol being used when fetching the script. This can be useful in a development environment where https:// is not used.

Without the crossorigin attribute present, browsers don’t use CORS at all, meaning they assume that the requested script is hosted on the same origin and can load without security risks. However, when they recognize that the script is requested from a third-party domain, your browser will refuse to load it.

When you add the crossorigin attribute with the anonymous keyword, you notify the user’s browser that you want to use the CORS mechanism to perform a secure cross-site request. Thus, there is no exchange of user credentials via cookies or HTTP authentication when the request is sent back and forth.

2. On the third-party domain

The second critical bit of data is the presence of an HTTP header on the response from the third-party domain containing the JavaScript. In particular, the Access-Control-Allow-Origin header:

The wildcard in this example allows cross-site requests to any site. This is appropriate for a CDN where the script may be requested by any third-party domain. If this is a private host for a known set of domains, you can provide that list in place of the wildcard, for instance:

You need to implement the Access-Control-Allow-Origin response header on the third-party server where the external script is coming from. How and where to add the HTTP header depends on the type of the third-party server.

For example, here is a code example you can use on an Apache server. You can add it to the .htaccess file. It enables the third-party server to send all files using the .js extension to any external domain.

Or, if you don’t only want to add CORS support for scripts but other resources you may need, such as web fonts and CSS you can use the following code instead:

Url Winamp Command Handler Download

For instance, here’s what I get in Chrome 66, without the third-party server sending the proper HTTP header:

As you can see, the browser can’t load the external script, and an error message appears in the console.

After adding CORS support to the server, the Access-Control-Allow-Origin header appears in the response, the third-party script loads correctly, and the error message disappears from the console:

If you want to add CORS support to a different server platform, there’s a great website called Enable CORS you may find helpful. It shares code examples and implementations for several different platforms such as IIS, Nginx, Tomcat, and others. Besides, larger CDN providers such as KeyCDN also frequently have support pages that explain how you can set custom HTTP headers on their platform.

Use a web proxy

Using a web proxy is an alternative method you can use to get around the problem. It can be especially useful if, for some reason, you can’t modify the HTTP header sent by the third-party server. You need to set up a proxy on your web server, then make your Ajax requests, not to the third-party domain, but to the web proxy hosted on the same domain.

Url Winamp Command Handler Example

The proxy server forwards the request to the third-party server, fetches the script, and sends it back to your website. Thus, the browser interprets it as a same-origin request and allows your frontend code to access the third-party script. The web proxy, in fact, functions as an intermediary for your requests from other servers.

There are some open-source CORS proxies available on the web, such as crossorigin.me or CORS Anywhere. However, these services should be only used in development. Never use an open CORS proxy on a production site, they are unreliable and may pose serious security risks.

Different browser behaviors regarding Script error

Depending on what browser your users are running, the above properties may or may not have an effect. This sums up the situation as of writing, regarding browser support for the crossorigin attribute and CORS:

  • Chrome 30+
  • Firefox 13+
  • Opera 12.50+
  • Safari (at least 6+)
  • Edge 0.10+

In these browsers, if the script tag is present, the HTTP header needs to be also present. Otherwise, the script will be blocked.

Firefox has an additional behaviour for Runtime Errors. These will be provided to window.onerror, regardless of the two properties. These aren’t a security risk. Syntax errors, however, will be blocked in both Gecko and WebKit browsers, if the crossorigin attribute is present, but the associated cross-origin domain lacks the header.

Winamp Command Line Options

Internet Explorer <= 10

Errors will be reported with all available data in IE 10 and below. Now considered a security issue.

Internet Explorer 11+

Third-party errors won’t contain any data, and the attributes are not respected at time of writing.

Url Winamp Command Handler Free

Ready to blast away Script errors?

Url Winamp Command Handler Online

Raygun Crash Reporting surfaces your Script errors for you. See what the buzz is about and start your free 14-day trial.