VLCTube icon indicating copy to clipboard operation
VLCTube copied to clipboard

HTML5 player is sometimes not removed from the site properly

Open FRex opened this issue 9 years ago • 25 comments

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

FRex avatar May 21 '15 17:05 FRex

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

PierceZ avatar May 23 '15 16:05 PierceZ

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

Sonic0170 avatar May 23 '15 22:05 Sonic0170

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.

FRex avatar May 23 '15 22:05 FRex

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

PierceZ avatar May 23 '15 22:05 PierceZ

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

Sonic0170 avatar May 23 '15 22:05 Sonic0170

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.

FRex avatar May 23 '15 22:05 FRex

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

PierceZ avatar May 23 '15 22:05 PierceZ

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)

Sonic0170 avatar May 23 '15 22:05 Sonic0170

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

PierceZ avatar May 23 '15 22:05 PierceZ

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 avatar May 23 '15 22:05 Sonic0170

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

Sonic0170 avatar May 23 '15 22:05 Sonic0170

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.

FRex avatar May 23 '15 23:05 FRex

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 avatar May 23 '15 23:05 Sonic0170

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

Sonic0170 avatar May 23 '15 23:05 Sonic0170

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.

jackun avatar May 24 '15 07:05 jackun

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

altunyurt avatar Jun 05 '15 13:06 altunyurt

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.

altunyurt avatar Jun 25 '15 20:06 altunyurt

That's weird. How old version?

jackun avatar Jun 25 '15 20:06 jackun

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.

altunyurt avatar Jun 25 '15 20:06 altunyurt

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 avatar Jun 25 '15 20:06 jackun

@altunyurt how's this?

jackun avatar Jun 25 '15 21:06 jackun

@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

altunyurt avatar Jun 25 '15 21:06 altunyurt

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

jackun avatar Jun 25 '15 21:06 jackun

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

altunyurt avatar Jun 25 '15 21:06 altunyurt

@jackun works seamlessly, thank you.

altunyurt avatar Jun 25 '15 21:06 altunyurt