Editing a Chrome Extention - javascript

So i use this extension to record my online classes using a remote desktop .
it works perfect but when i stop my connection to the remote computer the recording stops.
i saw this post
In this post the answer says to use the Chrome extension source viewer
i tried it but i couldn't wrap my head around the code.
one thing i found is that the extension sends a runtime message called "RECORDING_STOPPED" when recording ends and when i disconnect my remote desktop connection it apparently sends it that time also
i checked the /static/js/main.c502a7e6.js file Line : 16 , Column : 4875 as the line is quite long i didn't understand it

Related

Twilio javascript client has no audio

I tried using the Twilio Javascript Client Quickstart and am having some audio issues. I am trying to place a call to a cell phone from the browser. In general, everything seems to work without errors. The issue I am having seems to be an audio problem.
Edge - The call goes through, I can hear the audio from the microphone on the client but I cannot hear the audio from the phone on the client.
Chrome - I cannot even get the call to connect because I cannot click the Call button. It seems to get hung up on the microphone permission.
Firefox - The call goes though but no audio on either end.
IE - The Call button and textbox too enter in the phone number on the client don't even display.
Does anyone have any suggestions? Thanks!!
EDIT: Based on the comments I tried to use the sample files without changing them. There were some errors and I had to add the bootstrap and modernizr packages in nuget. Same result. No audio.

Can I make a socket connection through Javascript

What I want to do
Make a simple socket connection to a server on the browser. I want to not send any header information with the socket connection.
The Problem
It looks like I am unable to make a socket connection with javascript that does not send header data (Is there a way to do a tcp connection to an IP with javascript?).
I thought maybe I could make a connection with a chrome extension, however it looks like the socket API is only available for chrome apps (Google Chrome Socket API in extensions).
I am thinking that I might need to make a native application that will make socket connections through requests made by the browser using Native Messaging.
Is there anyway I can achieve this or am I out of luck?
Raw socket connections through the browser are wrapped up in security concerns. Users can be easily manipulated to allow things to run that shouldn't.
TCP and UDP Socket API
W3C Editor's Draft 20 January 2016
is located here.
http://raw-sockets.sysapps.org/
Mozilla's API information here: https://developer.mozilla.org/en-US/docs/Archive/B2G_OS/API/TCPSocket "This API is available on Firefox OS for privileged or certified applications only."
If you work with raw TCP connections. I would suggest
(1) downloading PHP onto the local computer. PHP has a developer web host build in so you can run whatever application you want on PHP using the browser as your GUI.
(2) download node.js.
You are not out of luck you just need to achieve it with the understanding that you are working outside the box for normal browser based scripting created from security concerns, and that means the user/client needs to install something manually.
If you must use chrome browser on the client side, you will need to make an -extension- correction webapp. You can as a developer make one that you can use on your own computers.
https://developer.chrome.com/extensions/getstarted
https://developer.chrome.com/apps/first_app
Load the extension#
Extensions that you download from the Chrome Web
Store are packaged up as .crx files, which is great for distribution,
but not so great for development. Recognizing this, Chrome gives you a
quick way of loading up your working directory for testing. Let's do
that now.
Visit chrome://extensions in your browser (or open up the Chrome menu
by clicking the icon to the far right of the Omnibox: The menu's icon
is three horizontal bars. and select Extensions under the Tools menu
to get to the same place).
Ensure that the Developer mode checkbox in the top right-hand corner
is checked.
Click Load unpacked extension… to pop up a file-selection dialog.
Navigate to the directory in which your extension files live, and
select it.
Alternatively, you can drag and drop the directory where your
extension files live onto chrome://extensions in your browser to load
it.
If the extension is valid, it'll be loaded up and active right away!
If it's invalid, an error message will be displayed at the top of the
page. Correct the error, and try again.
This insures that non developers don't load an extension which does not comply with the normal security concerns.
Communicating between with the script on the web page to the extension.
Can be done with message passing ... https://developer.chrome.com/extensions/messaging
The extension can add content directly to the web page which is available to the script on the web page. If for example the extension replaced the web cam image with a static image when the webcam script reads what it believes is the webcam it gets the static image instead, which explains why I look like an alien from space on the webcam. Although I did not create an extension to do that, I merely modified an existing extension to replace the function that gets the webcam image with a function to get a static image.
You can use SignalR, it is javascript library (JQuery Plugin) and it enables you to open web sockets from the browser to a server. Please check the following links:
https://blog.3d-logic.com/2015/03/29/signalr-on-the-wire-an-informal-description-of-the-signalr-protocol/
http://blog.teamtreehouse.com/an-introduction-to-websockets
https://github.com/SignalR/SignalR

Mark of the Web and playing sounds in IE

I have some local html files saved on my computer that contain javascript. I am using the mark of the web to make them run in Internet Explorer without getting a security warning every time I open them.
However, I have some MP3 sounds that play when the page is loaded etc and they are not playing after I've inserted the Mark of the Web.
They played before I inserted the mark of the web and had to click on the security warning to run the webpage in IE. They play in firefox.
How can I get the sounds to play in IE when the mark of the web is inserted? Is there a hack or work around for this?
Thanks

Chrome extension crashes due to garbage collector not starting the cleanup

Chrome Version : 48.0.2564.109 m on Windows 7
We have a Chrome Extension developed for our project.
The extension within it has a video element the source of which is the stream selected from the "chrome.desktopCapture.chooseDesktopMedia". The image for every 500ms is captured as webp from the video played and sent back to the host application via long lived connections.
What we notice is that this extension is crashing after a brief usage in time (sometimes at 5mins sometimes at 30mins). Profiling the extension we see the Heap memory constant at ~2.6MB throughout until the extension getting crashed.
One odd behavior that we noticed is that clicking the "Collect Garbage" button in the Timeline tab of the Developers tool for the extension is helping the extension to run for longer period without getting crashed.
Questions :
1. Is there any existing issue with Google Chrome browser extension's garbage collection not getting triggered until it is manually started ?
2. By any means is it possible to kick start this garbage collection process from the extension's

iOS 5 Mobile Safari application cache changes?

I'm wondering if anyone has run into new problems with using the HTML5 application cache in Mobile Safari on iOS 5 devices? I had previously written an offline web app that worked well in iOS 4, but as devices that use this app are being moved over to iOS 5, I am discovering problems when devices are offline and attempting to access what should be cached resources.
I can confirm that the application caching procedure is working as expected, as I can track the hits to my webserver as resources are downloaded while the device is online.
The problem manifests itself in the form of the "Cannot Open Page: Safari cannot open the page because it is not connected to the Internet" dialog box when I attempt to follow a link to a page that should be cached while I am offline.
Interestingly, around the same time this error pops up, in the Debug Console one also gets the "JavaScript execution exceeded timeout" error, similar to what is mentioned in this thread. I'm not doing any computation nearly as complicated as what was posted there, but the suggestion to kill and restart Safari seems to fix both problems, at least for now.
So maybe this question is less a request for help and more of a landing place for future searchers to share their experiences.
Please check if you have added the cached page itself into the manifest file, in below example they are HTMLPage1.htm & HTMLPage2.htm. I have the same problem but it works after adding the cached page link.
CACHE MANIFEST
CACHE:
images/cover.png
HTMLPage1.htm
HTMLPage2.htm
NETWORK:
*

Categories