ff-youtube-all-html5
ff-youtube-all-html5 copied to clipboard
Support for Youtube SPF
Please use this code to support for Youtube SPF
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
var observer = new MutationObserver(function(mutations) {
if (mutations[0].attributeName === 'class' && mutations[0].target.classList.contains("page-loaded")) {
// your code
}
});
observer.observe(document.querySelector('body'), {attributes: true} );
I just checked the current implementation and it still seems to work fine (except for the quality settings). Do you have any specific problems? Having said that, checking for page-loaded indeed seems much more sensible than the current approach.
Yes. Start videos paused and quality settings.
Implementing the former should be no problem, the quality-settings however rely on being run before any of the youtube code has the chance to run, which is why the addon disables spf by default.