Android Firefox 38 pageWorker don't work - javascript

I develop an extension for mobile version (as Android version) of Firefox borwser. I use sdk/page-worker high-level api for create a background page for connect with WebSocket server. But when I updated my Firefox to 38 version, page-worker dont'work!
In example I have a next source:
var pageWorker = require("sdk/page-worker");
var tmp = pageWorker.Page({
contentScript: 'console.log("Im loaded!!");'
});
It was work on older version of Firefox (etc 37).
But it don't work only in mobile version of Firefox. On desktop Firefox 38 page-worker is work.
It's a bug or a new feature? Thanks!

Related

Cannot record video+audio on iPhone Safari

I have used RecordRTC for capturing the video+audio from the browser.
For Android devices, it's working perfectly as expected. But in iPhone devices especially on the safari browser, it's not recording as expected.
Browser console produces the following error.
Your browser does not support Media Recorder API. Please try other modules e.g. WhammyRecorder or StereoAudioRecorder.
Could someone please help me out like:
Does Safari support basic video capturing?
It is better to use StereoAudioRecorder which is made in RecordRTC.js as Recorder for Safari.
This is the document of StereoAudioRecorder.
You're going to have to read this first :)
https://recordrtc.org/StereoAudioRecorder.html
const option = {
type: 'video',
recorderType: StereoAudioRecorder
};
const recorder = new RecordRTC(mic, options);
recorder.startRecording();
I hope this will help you.
https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder
MediaRecorder was introduced in iOS14 (Safari 14), if you have an older version, this can be your problem.

Selenium-webdrivers firefox ubuntu activate javascript

I have some issue with selenium-webdrivers on Ubuntu. Everything is working fine instead firefox has no javascript activated. When I open a website that requires javascript it pop the noscipt error. So the website is displaying <noscript>Javascript is required ....
Is there a function to enable JS on Firefox on Ubuntu or das this is a selenium failure and I need to set a driver.
Code:
require 'rubygems'
require 'headless'
require 'selenium-webdriver'
#headless = Headless.new
#headless.start
#driver = Selenium::WebDriver.for :firefox
#driver.navigate.to 'URL'
... actions
#headless.destroy
The Website navigate over HTTP:Headers and Ajax I think.
If someone have an idea I would be thankful.
On dev machine (win 10) all working fine.
Regards
Mat
EDIT
With recent modules you need firefox 65+, because firefox 65+ has his own headless module. Now everything is working fine and fast. Also need recent Geckodriver. Poorly not working with old firefox versions.
Refer comment here...
An alternative is to install a Firefox addon that disables JavaScript. This worked for me with Firefox 45 ESR, selenium-webdriver (2.53.4), and capybara (2.8.1):
profile.add_extension(File.expand_path('../quickjava-2.1.0-fx.xpi', FILE))
Configure the extension to disable JavaScript by default.
profile['extensions.thatoneguydotnet.QuickJava.startupStatus.JavaScript'] = 2
Disable loading the extension's first-run tab.
profile['extensions.thatoneguydotnet.QuickJava.curVersion'] = '2.1.0'
Reference : Disabling JavaScript when using Capybara + Selenium

WMP object not working in IE11

I am facing an issue with WMP object video playing in IE11.
Same video is playing well in IE10.
System configuration is as below:
OS: Windows 7 ultimate SP1
IE : 11.0.9600.18204
WMP version: 12.0.7601.18840
IE Document mode : 10 (Default)
User agent string : Default
I also tried to change document mode and user-agent string, but no luck.
I have searched a lot but not found any solution.

How to get the HTTP protocol version via JavaScript

Is it possible to determine the HTTP protocol version using JavaScript? I need to detect if the user is using HTTP/2 protocol (and congratulate him if this was the case).
console.log(performance.getEntries()[0].nextHopProtocol)
See also: https://caniuse.com/mdn-api_performanceresourcetiming_nexthopprotocol
Works in
Edge since 17
Firefox (Desktop and Mobile) since 45
Chrome (Desktop and Mobile) since 61
Safari Mac 14.1 (tested here, but not yet updated on MDN/caniuse)
if (location.protocol == "http/2"){
alert('congratulations!');
}

are websockets not supported in Firefox 19?

i am trying to write a websocket page, and it works in Chrome and some other browsers on my Ubuntu machine.
however, firefox would not run the websocket part, and both window[WebSocket] and window[MozWebSocket] return "undefined". does firefox not support websockets?
Use (from MDN docs):
var mySocket = new WebSocket("ws://www.example.com/socketserver", "protocol");
It is supported from Firefox 6.0 (known as MozWebSocket prior to Fx 11 - see #Dracs' comment).
Extensions like TorButton can set network.websocket.enabled to false in about:config. Make sure it's true.

Categories