jackun / VLCTube

The Unlicense
16 stars 4 forks source link

HTML5 player is sometimes not removed from the site properly #66

Open FRex opened 9 years ago

FRex commented 9 years ago

I'm on a Linux machine with no flash plugin for Firefox and sometimes the script fails to kill HTML5 player so it starts playing in the background with no way to stop it other than closing the tab. This has happened very recently, but I'm not exactly sure when, I noticed today, before everything was working as indended. Everything I have is up to date.

I also noticed few things:

  1. If I pick video from somewhere like videos page of the user, then the HTML5 player won't start.
  2. If I go to another video while the one behind VLCTube plays, it won't stop. It seems the HTML5 player only plays when the video page is fully loaded, but not when the YouTube's AJAX-esque partial loads takes you from videos list or search result or between videos.

I tried to opt for Flash player instead of HTML5 one in YouTube so I'd get an error behind the VLCTube interface, but YouTube detects that I don't have Flash and HTML5 still works.

I have very few addons and scripts that work on YouTube, but they can't interfere with this, didn't interfere in the past and disabling everything except VLCTube didn't fix the issue.

My specs are: Fedora 21, Linux 3.19.7-200.fc21.i686 Mozilla Firefox 38.0 release 4.fc21 Greasemonkey 3.1 npapi-vlc-filesystem, npapi-vlc and npapi-vlc-gtk libs: 2.2.0 release 0.1.fc21 vlc and vlc-core packages: 2.2.1 release 2.fc21 libvlc.so.5 links to libvlc.so.5.5.0 and comes from vlc-core package

PierceZ commented 9 years ago

I've got the exact same issue as well. Windows 7 Firefox 38.0.1 Greasemonkey 3.1 VLC Web Plugin 2.2.1.0

Sonic0170 commented 9 years ago

try this https://addons.mozilla.org/en-us/firefox/addon/flashstopper/ tell me if it makes any difference, i suggest this one because flashblock doesnt always work anymore

FRex commented 9 years ago

Flash block doesn't work ever on HTML5 in Firefox for me anymore but it used to. This works when VLC is off, but with VLCTube on it doesn't and the video still starts in the background.

PierceZ commented 9 years ago

Thanks @Sonic0170 that did it for me. No longer getting double playing videos.

Sonic0170 commented 9 years ago

i see so it works for windows users but its something more complicated for linux users, that's interesting, hope this gives you some insight on what the issue could be @jackun

FRex commented 9 years ago

It might be that @PierceZ has Flash, and I don't at all because Flash from Adobe is really bad and feature frozen since version 11 for everything except Chrome which bundles its' own.

PierceZ commented 9 years ago

I do indeed have flash, I thought youtube stopped using flash though? Perhaps not entirely.

Sonic0170 commented 9 years ago

thing is when i have vlctube off html5 plays by default on firefox for windows on youtube, seems like flash has been nearly phased out, flash is only used as an emergency fallback now, i assume only if its played on a non-html5 compatible browser (webm/mp4)

PierceZ commented 9 years ago

Same for me @Sonic0170 I can only assume the flash stopper plugin is pausing it for me despite not actually using flash.

Sonic0170 commented 9 years ago

flashstopper works with flash and html5 like how flashblock used to, my theory i was hoping for is if both players are still loading at the same time thus playing the same videos twice that this would stop the html5 from playing while vlctube continues to play normally, but sadly this test didn't work for linux

Sonic0170 commented 9 years ago

now this double playing doesnt happen to me but i wanted to see if this solution would work for either of you 2

FRex commented 9 years ago

I tried and with Flash installed it doesn't happen. Disable yours in the plugins page and it probably will happen to you too. as in: playing of HTML5 under VLC player doesn't happen when FlashStopper and Flash are both installed and enabled.

Sonic0170 commented 9 years ago

its the same with flash disabled for me, html5 player loads by default and flashstopper prevents autoplay, if you look at the plugin page the author specifically states that it works for youtube html5

Sonic0170 commented 9 years ago

flashstopper doesnt have the specific click to play icon that flashblock does/did on youtube, it instead disables autoplay

jackun commented 9 years ago

Since I don't feel like dicking around with the script whole weekend I got a bit invasive and just disabled whole video element creation from createElement. Seemed to work kinda.

altunyurt commented 9 years ago

Cont. from #67: yep 61.11 fails to remove youtube player too.

altunyurt commented 9 years ago

Youtube player is still not removed completely on ff39 beta. None of the versions work since https://github.com/jackun/VLCTube/commit/96f4ad5e1e9ccf11ef5b8014ae303b822aec4714 , older ones work.

jackun commented 9 years ago

That's weird. How old version?

altunyurt commented 9 years ago

Even 60.0 works, I did not check for others. The last working one is https://github.com/jackun/VLCTube/commit/d635f02699f32f0568d9f844e620e8f2d519eb23 . Any commits after that one fails to remove youtube player.

I've also tried it with firefox developer edition(v40a.02), which has a clear history and cookie cache. It also fails with dev. ed too.

jackun commented 9 years ago

Tried 41, something weird like GM doesn't even run it. Just throws unreachable code errors. E: after 3 or 4 reloads it finally loaded EE: single console.log line in init delays code execution enough that it won't get replaced by flash..or something...oh yeah >_>

jackun commented 9 years ago

@altunyurt how's this?

altunyurt commented 9 years ago

@jackun player is not removed and seeing these in the console:

"Hijacked createElement:" "video" watch:10:4
"Hijacked createElement:" "video" watch:10:4
uncaught exception: j$@https://s.ytimg.com/yts/jsbin/html5player-en_US-vflPcWTEd/html5player.js:1701:471
g$@https://s.ytimg.com/yts/jsbin/html5player-en_US-vflPcWTEd/html5player.js:1697:448
g$.create@https://s.ytimg.com/yts/jsbin/html5player-en_US-vflPcWTEd/html5player.js:1699:111
ytplayer.load@https://www.youtube.com/watch?v=7zTCgMPZRuo:257:34666
@https://www.youtube.com/watch?v=7zTCgMPZRuo:257:34827
@https://www.youtube.com/watch?v=7zTCgMPZRuo:257:34763
 <unknown>
"video seems to be unavailable" watch:3882:4

VLC player first shows up, but then youtube player takes over. This happens with all since 61.9

I don't have flash in my system, this is what i get even though I've enabled html5 player in my profile

screenshot - 06262015 - 12 28 20 am

jackun commented 9 years ago

@altunyurt ok, so then if that video element removing code is not injected, works?

altunyurt commented 9 years ago

Yes the last one seems to work. I'll try a couple of videos.

altunyurt commented 9 years ago

@jackun works seamlessly, thank you.