Changes to the Quality options coding?

Hello all,
Ive been developing a chrome extension that changes the quality of the stream using the video stats, I was getting pretty close but it seems to have stopped working.

I rolled back to a solid working version of my code and it still seems not to work.

The part in question was the script I was using to change the quality, it no longer triggers the stream to the new quality and I was wondering if this was due to a change in Twitch’s player.js code.

You can simulate what my extension inst doing by making the following chrome bookmarklet:


I had incorporated the above into the extension like so ;

background.js had this

document.write("<button id='mybutton'>High</button>");
  var button = document.getElementById('mybutton');

 button.onclick = (function (tab) {
// for the current tab, inject the "inject.js" file & execute it in this case changing quality to high 
chrome.tabs.executeScript(tab.ib, {
	file: 'inject.js'
}) ;

// creating the button in the js on-the-fly was my workaround for inline-javascript violations

Which executed a separate inject script inject.js with this;

var scriptNode          = document.createElement ('script');
scriptNode.textContent  = '(function(){$("select.js-quality").val("high");$(".js-quality").trigger("select");})();';

document.body.appendChild (scriptNode);

Essentially I’m wondering why this would have stopped working, have Twitch changed the Trigger that pushed the actual quality change? The extension now just changed the quality option in the drop down but no longer pushed this new quality.

Sorry if this is horrendously worded, this is my first Chrome extension so I’ve been learning as I go.

Thanks in Advance


Mysteriously as it stopped this has begun working again. No replies needed

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.