hoyois / clicktoplugin

Prevents plug-ins from loading automatically in Safari
http://hoyois.github.com/safariextensions/clicktoplugin/
229 stars 43 forks source link

Safari 9 October 1st Update Broke Compatibility #141

Closed asoksevil closed 9 years ago

asoksevil commented 9 years ago

It seems that Apple´s latest update on Mavericks, Yosemite and El Capitan has break compatibility with Click To Flash/Plugin.

swooshswoosh commented 9 years ago

Click to plugin still converts flash to html5 for me, but apparently the "open in quicktime"-option stopped working, I again set my browser to use the quicktime plugin in unsafe mode and I replaced the quicktime internet plugin with that one of 7.7.1. Are you guys having the same problem(s)? Solution?

asoksevil commented 9 years ago

I don´t have Flash installed but I can tell that it isn´t working as I don´t get the "normal HTML5 player" but YouTube´s default one. It isn´t working on Twitch either.

swooshswoosh commented 9 years ago

I recommend you check your clicktoplugin-settings, because I believe one of your settings not set correctly.

asoksevil commented 9 years ago

Will do but I am using Click To Flash not CTO so I am not sure if that implies anything.

El 02/10/2015, a las 11:40, swooshswoosh notifications@github.com escribió:

I recommend you check your clicktoplugin-settings, because I believe one of your settings not set correctly.

— Reply to this email directly or view it on GitHub.

bretello commented 9 years ago

Have you tried re-installing the plugin? Click2plugin is working fine for me on El Capitan (Safari 9)

MarcinSkoczylasQBurst commented 9 years ago

The same problem here on Mavericks and Safari 9 with no flash installed (no way, you'll never force me to install flash). Youtube displays the HTML5 player since Safari 9 update and ClickToPlugin seems to not work at all anymore.

asoksevil commented 9 years ago

@bretello

I have tried with CTP and I think it´s a problem related to Safari 9.0 (9537.86.1.56.2) on Mavericks as El Cap/Yosemite users don't seem to experience it.

hoyois commented 9 years ago

Is the only problem that YouTube serves HTML5 instead of Flash?

asoksevil commented 9 years ago

@hoyois

No, basically it doesn´t work at all as on Twitch and other pages it doesn´t replace the HTML5 player with CTF´s HTML5 one. I don´t have Flash installed so I can´t say.

MarcinSkoczylasQBurst commented 9 years ago

Important to note though is that YouTube Center's trick to force flash fixes the issue. So now I have a combo, in YTC I set force flash "aggressive mode", and now CTP is able to take over the video.

noahad commented 9 years ago

I've just updated to Safari 9.0 (9537.86.1.56.2) on Mavericks 10.9.5

I can confirm that YouTube now plays in the YouTube HTML5 player. Other Flash is correctly blocked with the placeholder.

asoksevil commented 9 years ago

That´s weird @noahad because it doesn´t work for me.

Do you have Flash installed? Are you using Click to Flash 3.1.6? Any other extensions besides CTF?

I just redownloaded CTF and it still doesn´t display the old player on YouTube and no longer blocks it.

noahad commented 9 years ago

I have ClickToPlugin 3.1.6 (is that different from the version in this repo?) and have Flash installed.

Just to be clear, my preferred behavior with CTP is to play YouTube (and everything else) with Safari's generic HTML5 player, so I think there is a compatibility issue with YouTube in Safari 9.

asoksevil commented 9 years ago

@noahad

I don´t have Flash installed (which might be the main issue why CTF is not triggering anymore). I think CTF is a replacement for Flash and we should´t be forced to install it (like we did previously) in order to use it.

asoksevil commented 9 years ago

Just installed Flash to see if this would solve my issue but no, CTF won´t load up unfortunately.

hoyois commented 9 years ago

Are there any errors (not warnings) in the console on YouTube's /watch pages?

asoksevil commented 9 years ago

@hoyois

This is what I got from the console when loading a random video:

09/10/15 10:35:46,600 com.apple.WebKit.WebContent[96587]: AVF error: Branch_QT0::pushBits, Context Creation Failed. 09/10/15 10:35:46,627 com.apple.WebKit.WebContent[96587]: HDDec_Thread_HWSliceDecoder_SampleID: CreateGPUInterface renderer 1040008 09/10/15 10:35:46,638 com.apple.WebKit.WebContent[96587]: ava error: InitDriver call failed, call DeleteDriver ...

hoyois commented 9 years ago

I mean the web inspector console.

asoksevil commented 9 years ago

Got it.

No, no warnings, just errors.

hoyois commented 9 years ago

Do you mean "no errors, just warnings"?

asoksevil commented 9 years ago

Yeah, sorry.

No errors, just warnings.

Now, I just tried it today and it is not showing up anything not even warnings.

Just to make sure that I am doping this right. I randomly choose a video from YouTube and then I head directly to the console window and look for either warnings or errors, right?

The only thing showing up are registers: cs:- start:- Object autoRedirect: false domain: null lang: null redirectURL: null Prototipo de Object defineGetter(propertyName, getterFunction) defineSetter(propertyName, setterFunction) lookupGetter(propertyName) lookupSetter(propertyName) constructor: function() hasOwnProperty(propertyName) isPrototypeOf(property) propertyIsEnumerable(propertyName) toLocaleString() toString() valueOf()

hoyois commented 9 years ago

Does it change anything if you choose a Safari < 9 user agent?

asoksevil commented 9 years ago

Yes, that actually made it work.

My current user agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/9.0 Safari/537.86.1

I changed that to Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.1.56 (KHTML, like Gecko) Version/7.1 Safari/537.86.1 (not sure if this is right as from Safari 9 onward it seems that you can't´change it back to Safari 6 or 7) and I got it working.

It is not showing the previous fullscreen control panel but the new one? (Yosemite perhaps?)

captura de pantalla 2015-10-10 a la s 17 53 07

hoyois commented 9 years ago

@asoksevil That's the new default video player, yes (Safari 9 or WebKit nightlies only).

On one of these YT video pages, with Safari 9 user agent, what's the output of the following command in the web console?

document.createElement("video").canPlayType

hoyois commented 9 years ago

Try replacing the built-in YouTube.js with this:

https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTube-test.js

asoksevil commented 9 years ago

I got this output:

function canPlayType() { [native code] } = $1

and the new script doesn´t seem to work unfortunately.

hoyois commented 9 years ago

What about the outputs of ytspf.enabled and ytplayer.config.min_version ?

asoksevil commented 9 years ago

For ytspf.enabled

false = $1

For ytplayer.config.min_version

"0.0.0" = $2

hoyois commented 9 years ago

OK, these two are what I'd expect, but the canPlayType output is problematic. I updated https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTube-test.js, please try it again (restart Safari).

asoksevil commented 9 years ago

Just tried that again... no luck...

Is this the correct way to add Flask killers (just in case)

captura de pantalla 2015-10-11 a la s 12 51 59

@hoyois please let me know if there´s anything else I can help you with.

hoyois commented 9 years ago

The problem seems to be that the canPlayType method cannot be redefined, but I'm puzzled because it doesn't throw any errors. Let's try something more extreme: what's the output of the following two lines? (can be checked on any webpage whatsoever)

delete HTMLMediaElement.prototype.canPlayType HTMLMediaElement.prototype.canPlayType

asoksevil commented 9 years ago

delete HTMLMediaElement.prototype.canPlayType shows:

true = $1

HTMLMediaElement.prototype.canPlayType

undefined

I have checked again the console for other warnings/errors that might be useful... still, the only warning is the following:

Invalid CSS property declaration at: * www-player-new-vfl1mGUtZ.css:1:39252 which leads to

* overflow: visible;

(full text available here) http://pastebin.com/DynLQFgL

hoyois commented 9 years ago

OK, try https://raw.githubusercontent.com/hoyois/plugin-to-html5/master/YouTube-test.js once more (restart Safari). Logically the output of document.createElement("video").canPlayType should now be undefined on YouTube's /watch pages.

asoksevil commented 9 years ago

Not sure why but it still shows as after inputting document.createElement("video").canPlayType

function canPlayType() { [native code] } = $1

hoyois commented 9 years ago

Not sure why either... I assume HTMLMediaElement.prototype.canPlayType has the same output?

asoksevil commented 9 years ago

Yeah you are right:

function canPlayType() { [native code] } = $1

BTW, I have noticed CTP does indeed block Flash but it does not replace the player... I´ve been browsing some new websites and videos were being blocked.

hoyois commented 9 years ago

I've added a couple of JS popups to YouTube-test.js. Please reload the killer and let me know what you see on a YouTube page.

BTW, I have noticed CTP does indeed block Flash but it does not replace the player... I´ve been browsing some new websites and videos were being blocked.

I assume the only thing that does not work compared to Safari 8 is the hack in YouTube.js. The rest of the extension seems to work exactly as before.

asoksevil commented 9 years ago

No, I can´t see anything different whatsoever... it looks exactly as it was before.

hoyois commented 9 years ago

OK, what about now? You should see a "YouTube killer loaded" popup as soon as the remote killer is loaded.

asoksevil commented 9 years ago

Yes, I can see that:

YouTube killer loaded!

It shown up twice.

hoyois commented 9 years ago

But you don't see any other popups when you visit https://www.youtube.com?

asoksevil commented 9 years ago

Yes, I do.

Somehow it just started popping up now.

function canPlayType() { [native code] }

undefined

undefined

undefined

And it does seem to be working now!

hoyois commented 9 years ago

OK, I've removed the popups now, but it should still work.

asoksevil commented 9 years ago

This is weird.

I have done some testing and although it does work, it is certain conditions.

I can only get it to working if I reloaded youtube.com (by that I mean literally entering Youtube.com and not another /watch page or another video). If I am watching a video and I restart Safari, the CTF does not work until I go to youtube.com.

I am just thinking that I should downgrade back to Safari 7.1.7 as CTP didn´t have any problems and liked the player more...

asoksevil commented 9 years ago

It also "flickers" between the "you need to install Flash or this is not supported in your browser warning" (can´t really read it) and the HTML5 video preview.

hoyois commented 9 years ago

That last part is normal, YouTube takes some nonzero amount of time to replace its HTML5 player with Flash.

I have a guess as to what's causing the problem on Mavericks: what does window.MediaSource say?

asoksevil commented 9 years ago

I don´t remember seeing that before upgrading to Safari 9... and if it did happen it was probably 0.1 0.5 seconds as it was barely noticeable.

undefined

hoyois commented 9 years ago

OK, everything is clear now. I feel pretty dumb for not thinking about this earlier, but I didn't realize until now that Mavericks was an older version of OS X.

I don´t remember seeing that before upgrading to Safari 9...

Yes, but it's been like this since Safari 8 on Yosemite.

asoksevil commented 9 years ago

That´s great news! Anything that I should test or it should be fine from now on?

Considering that Safari 9 for Mavericks is just a plain "security upgrade" it should´t have change anything at all... I mean, I would prefer ir at least like when there´s an embedded video where it just flickers grey instead of the other text.

mymacmini commented 9 years ago

It's working just fine, but I find it odd that I had to dig for it and was only able to install it after I stumbled into it. It's bizarre that https://safari-extensions.apple.com/?q=ClickToFlash yields no results when searching.

— Ls

On Oct 12, 2015, at 12:13 AM, asoksevil notifications@github.com wrote:

That´s great news! Anything that I should test or it should be fine from now on?

Considering that Safari 9 for Mavericks is just a plain "security upgrade" it should´t have change anything at all... I mean, I would prefer ir at least like when there´s an embedded video where it just flickers grey instead of the other text.

— Reply to this email directly or view it on GitHub.