Integrating youtube-direct-lite with angularjs app - angularjs

I was unable to find any open source video recorder that can be integrated with an angularjs app. I came across Youtube-direct-lite but I have no idea how to integrate this with an angular app. I am trying to host my own instance of youtube-direct-lite
I have already configured the config.js as been told in this doc. Should I just copy paste all the js, css files to my project and use the index.html as a partial to display the recorder?

about configuring direct lite:
in config.js enter your developer-key and client-id.
then read the README file
download nodejs console
browse to the folder with the source in it
run this command : node r.js -o app.build.js
and it'll build the minified source for you, then copy and paste that source into your website and use the index.html & admin.html as the
and i'll work just fine.
about angular with direct lite:
I've seen so far only one implementation for it that is in youtube/dev/demos
http://www.youtube.com/yt/dev/demos.html#/upload
if you opened the sources, you'll find that it is uses angular, and it applies ytdirectlite, but I don't know how to use it and I still cannot find the opensource for it.

Related

Unable to Obfuscate Hybrid code using Proguard in MFP 7.1

I am developing ionic application using mfp 7.1. I have to obfuscate theapplication, for that I have refer the following link,
https://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.deploy.doc/admin/t_pg_creating_obfus_cli.html
Using the above link I have done with the following steps:
1) In the project.properties file uncommented the line
proguard.config=proguard-project.txt.
2) Created keystore file and its added in the "ant.properties" file.
3) finally, we build the application.
We unable to get the "mapping.txt" file in the project
& also not able to get obfuscate code.*
Can any one tell me how to obfuscate it??
Anyone help will be Appreciated!!!
Proguard obfuscation will work on native code. You mention an Ionic application. As such you should try Javascript obfuscators for your application:
Google Closure
Compiler YUI Compressor
UgifyJS
More details here.
Within MFP, the options available are to perform JS and CSS concatenation and minification. The other options are outside of MFP and needs to be done using the respective tools.

For sencha app build , do we need to include all js files related to view in main.js(portal.js)?

I am using sencha cmd 6 for building my application.
my folder structure is
classic
src
model
view
account
jobs
portal
portal.js
controller
store
production build process execution is successful but when i load that build its giving .js file not found error.
So i include all js files in folder structure into main js portal.js then .js error is removed and build works.
But i dont want to include all these list of files in one single js, so can we skip the js include part from portal.js and use any property or attribute to include all js files ?
You can specify with * like 'Ext.chart.*' in requires section of Ext.app.Application.
Hope this helps.

How does angular know where ng-include file is located?

I'm looking at this sample Angular App.
In the main html file called [index.html][2], there is this line:
<div ng-include="'header.tpl.html'"></div>
However, there is not file header.tpl.html in the same directory.
How then does Angular know where to find this file?
The linked sample app is built using Grunt, so the file/folder structure of the built application differs from the one you see in the repository.
For example, the templates you are asking about, are collected by html2js (Grunt task) and compiled into a single JavaScript file containing code that adds all templates to $templateCache (causing them all to be included on app initialization instead of being lazily loaded when required). When the ng-include starts looking for files, its first step is looking into the $templateCache. Only when it cannot find the template there, it tries to load it from the server (and save it to $templateCache for subsequent uses).
See Gruntfile.js in the repository for build process details.

How can I restrict access to a directory inside web root?

I have an angular app and I concatenate and minify all of the angular.js files so it is more difficult for a user to "borrow" my code. I want to restrict access to my angular directory, which is inside the web root. I tried the following, but it doesn't work:
app.get('/angular/', function(req, res) {
res.redirect('/');
});
The problem is that anyone can enter mydomain.com/angular/controllers.js, for example, and see the controllers.js file. I am a bit surprised since I thought that I specified in the routes to redirect the user when attempting to access any file inside the angular directory. What am I doing wrong?
A user can just open the web inspector for their browser and read your code once it's running in their browser so doing this won't solve your problem.
You should instead minify and uglify the code into a single bundle perhaps? I do this using browserify as you can see in this project https://github.com/evanshortiss/cordova-angular-browserify. Then you can just run the code that has been bundled through uglify.
If you don't want to use browserify you could just find another way such as reading the JS files in your html file, then read them all and dump them into a single .js file in the correct order.
As there are beautify solutions, Minify or uglify can't be good solutions!
You can move your private files/folders into directories which are not http accessible.
Hope this helps! :)

How to include ext-js calendar in jsp?

I am new to EXT JS environment. I am working on a dynamic java project in eclipse indigo where i want to use ext-js calendar in one of my jsp.I saw the EXT_JS calendar demo from downloaded 'ext-4.1.1' sdk(index.html file in ext-4.1.1a\examples\calendar).
I want to create a .js file as like ext-js calendar page. So for that i followed the path given in
http://loianegroner.com/2010/11/spket-setting-up-eclipse-ide-for-ext-js-and-jquery-development/ to integrate ext-js in eclipse.
But now when i copy index.html to my webcontent folder then it is not working(Originally it is showing nothing). But when i copy the entire ext-js source code to my workspace web content then running the index.html file in example/calendar folder of ext-4.1.1a giving me required result.But I don't think this as a solution.
I could not find any way also how to start to do my task.
So Pls anybody help me here...
Regards :
Dev
When nothing shows up on the screen, it is commonly a case where the ExtJS library isn't loaded. Without seeing the code, it's hard to pinpoint the issue.
Using Chrome Dev tools or Firebug for Firefox, take a look at the console and/or network output.
The files you're looking for will be included in the <head> section of your index.html. There should be ext-all.js or possibly ext-all-debug.js at a minimum, plus the style sheets.
If this is your issue, then you need to include the proper paths to the ExtJS library. This can be the local installation, or you can use a CDN. For example:
<script src="http://cdn.sencha.com/ext-4.1.1-gpl/ext-all.js"></script>

Resources