kaltura plugin external resource - plugins

I am currently making an external plugin for kaltura video player. To embed the plugin in the video player we have set some variables in the flashvars such as:
"flashvars": {
"myComponent":{
"plugin":true,
"iframeHTML5Js" : "plugin.js"
}
}
I want to place my plugin.js at an external resource such as CDN or through github. Is there any way to do this?
Also, is there a way to reference the plugin code in the page itself without the need of a path to access it?

You can update it in the studio under ui vars - you can point to a cdn url there.
we dont allow external url from client flashvar configuration

Related

how to load workbench ui in vscode extension

I'm developing a vscode extension, and I'm currently facing a problem, and I'd like to seek your help.
I want to use the VScode UI in the webview created by the plug-in to ensure the consistency of the user's vision. How do I refer to the resource?
I tried the following:
Use appRoot to directly splice vscode-file://vscode-app/, displaying network errors
Use appRoot to refer to 'file://' and find: Not allowed to load local resource
Use asWebviewUri, display HTTP code 401
const cssfile = vscode.Uri.file(path.join(vscode.env.appRoot,"out/vs/workbench/workbench.desktop.main.css"));
const cssurl = this.view.webview.asWebviewUri(cssfile);
console.log(cssurl);
I found the reason through the official documentation, because of security restrictions, you need to add approot to the settings.
Use the WebviewOptions.localResourceRoots to allow access to additional local resources.
https://code.visualstudio.com/api/extension-guides/webview#loading-local-content

There is any method for webview cache Optimization in flutter?

I use flutter_inappwebview for fetching the website into the flutter app. I want to save all the resources like JS and CSS file content into the cache from website during webview start and then when I call same website the resources will intercept and inject the cached files into the webview. Is this possible.. If possible then how.. please explain with example. Thank you.
note: caching is already enabled for this plugin by default. but what you're asking is offline-mode which flutter_inappwebview plugin does not support yet.
the cache you're refering to is not the cache that browsers use (mobile or desktop) what you're refering to is basically called offline-mode in the world of browsers.
in regard to the flutter_inappwebview plugin there is already an issue (or two) about this feature you're looking for. and i believe it is not implemented yet.
you should keep an eye on these github issues issue-561 & issue-366
That flutter_inappwebview package has already a property, cacheEnabled with default parameter, true. You don't need to do anything about this. If you don't want to store cache files, then you can set it to false.
///Sets whether WebView should use browser caching. The default value is `true`.
///
///**NOTE**: available on iOS 9.0+.
bool cacheEnabled;
And, the clearCache property with the default value, 'false'.
///Set to `true` to have all the browser's cache cleared before the new WebView is opened. The default value is `false`.
bool clearCache;

merge large existing web app into Sailjs site

I'm trying to merge large existing web app into sails.js. so I moved the folders into assets and build a custom route , 'GET /': '/assets/client/launch.html' and get 404 when I point my browser to http://localhost:1337/ as the / is correctly redirected to http://localhost:1337/assets/client/launch.html which produces the 404.
Now the file exists in the folder assets/client (and in .tmp), so I am thinking the Sails router is getting in the way.
I would leave the client (70K lines of JS) that generates all the UI dynamically and sailjs server that provides authentication separate and enable CORS but my customer wants client packaged with server. This type of operation is simple in frameworks like ASP.NET MVC but am wondering if Sails is up to the task.
Well, If everything you tried did not work out. There might be another solution ,
First of all since you are talking about sails app I am assuming other bundle must be sails as well ,
So here is what you do-
Change the port for another app that you want to attach to this.
Second whenever you want to go to page on another app simply redirect the client to another port ie
in html or esp put a href tag with different port.
<a href="localhost:PORT/route_to_file">
</a>
I got it working by placing my app into assets where we need to launch from assets/client/index.html as there would be too many dependencies to change. As I said above could not just add a route as Sails must getting in the way. However as in Chapter 3.2.2 of Sails in Action I generated a static asset npm install sails-generate-static --save. then I redirected to assets/client/index.html. As an aside that book is great and would highly recommend it.

how to load external libraries into an SAPUI5 view?

In SAPUI5 I can load local files this way:
jQuery.sap.require("util.someFile");
But is it possible to load external libraries when required in some view using the above command or a similar approach? Ideally, I am looking for something like:
theLoadingCommand("some_url");
Thanks
Basically it is possible to register a module path to some URL.
jQuery.sap.registerModulePath('external.library', 'http://....'); //not working
There is only one problem with that. UI5 loads the resources via AJAX requests. Your browser will give you an error because you are trying to load files from a different host.
You can include external libraries by including the file in a normal script tag. It is also possible to include requireJS in your project and use its features. Unfortunately, at the moment UI5 doesn't support requireJS out of the box.
jQuery is supported by SAPUI5, so you can extend your heading from controller, for example:
var s = document.createElement("script");
s.type = "text/javascript";
s.src = "http://somedomain.com/somescript";
$("head").append(s);

How to find Itune software is installed in a client browser side?

I have a anchor tag with the url "itms://itunes.apple.com/us/app/movietickets-com-showtimes/id402114309?mt=8".If the client system doen't have the Itune software, then the browser is not opening the page.
Is there any way to know the whether the user installed Itune software or not.
Thanks in advance.
Note:
If you go to
https://itunes.apple.com/us/app/movietickets-com-showtimes/id402114309?mt=8
Here you can find or inspect "view in itune" button.There you can see
some javascript to detect that.But i dont know what there are doing!
Apple already has code to detect if iTunes is installed, you can find their code here: http://ax.itunes.apple.com/detection/itmsCheck.js
Finally i got a solution,
From the following site https://itunes.apple.com/us/app/movietickets.com-showtimes/id402114309?mt=8
You need to take two js files. (It contains some extra javascript and jquery - you can remove those if you know that it is no longer needed)
https://itunes.apple.com/htmlResources/99EF/web-storefront-base.js
https://itunes.apple.com/htmlResources/99EF/web-storefront-preview.js
And you need to add the below code to your page html,
""
Finally, Whenever you want to check the plugin, just call
if (its.detect.itunesDetected())
{
//Your code if plugin installed
}
else
{
//Your code if plugin not installed
}