Large

ViewTube

By sebaro Last update Apr 10, 2014 — Installed 112,546 times.

YouTube videos always autoplaying, controls missing

in
Subscribe to YouTube videos always autoplaying, controls missing 17 posts, 4 voices



hackepeter User
FirefoxWindows

Hi Sebaro,

Since 2012.01.18 some YouTube videos always start playing automatically even if Autoplay is disabled, and I see no controls to stop or mute them, for example:

https://www.youtube.com/watch?v=iSl2wxcnhpc

tested with Firefox 9.0.1, no Flash plugin but JavaScript and cookies enabled.

Clicking Play or Autoplay repeatedly or toggling HTML5 doesn't change anything, nor does entering or leaving the HTML5 trial on https://www.youtube.com/html5.

Any ideas how to solve this problem?

Regards,
Peter

EDIT: Sometimes the controls do appear when changing the format selector to WebM, but muting doesn't work anyway.

 
sebaro Script's Author
OperaX11

Hi Peter,
It's not a problem with 2012.01.18 version, with all versions of the script youtube embeds a html5 video even if it's turn off in youtube.com/html5. If I remove youtube part from the script I see the html5 player with the video playing. You can disable GM and see the html5 video starts. Did you try it with flash player? Does html5 starts when the flash player is enabled?
Thanks!

EDIT: Fixed in the 01.21 version (I hope). Let me know if it's OK.

 
sm00th Scriptwright
FirefoxWindows

If you using quicktime as external player for your script, the player is cropped on all sides, so no controls and missing half of the content. That comes from the fact your video object has only a style attribute for width and height on the window, you have to set width and height as separate attributes.

generated src:
<object data="videosource" type="application/x-mplayer2" style="width: 640px; height: 366px;" width="640" height="366">

I guess you can even drop the style part, but the normal size attributes external players shouldn't really be resized to fit in the video container.

 
sebaro Script's Author
OperaX11

Hi sm00th,
I know of this issue. Are you sure adding the width and height attributes for object element solves this? Did you test it? It happends for Window Media Player in Firefox too.
Thanks.

 
sm00th Scriptwright
FirefoxWindows

just tested it by modifying your script, didn't work at all

if (os == 'Windows') {
obj.type = 'application/x-mplayer2';
obj.width = player['vWidth'].replace("px","");
obj.height = player['vHeight'].replace("px","");
} else obj.type = 'video/' + mimetype;

will add the attributes, but has apparently no effect.

 
sm00th Scriptwright
FirefoxWindows

<param name="scale" value="tofit">
<param name="scale" value="exact">
<param name="stretchtofit" value="true">

welcome in the world of standardless bullshit. you have to add param tags to the object. 1st is for quicktime, 2nd for vlc, 3rd for wmp ... couldn't test it for wmp thou.

In addition to that you have to put the width and height attibutes to the object tag, otherwise it can produce horrible bugs.

you can add all tags at the same time, they don't conflict

 
sebaro Script's Author
OperaX11

For the second isn't exactfit not exact?
Do I have to add the width and height attributes for the param too?
Does VLC behaves the same as QT for HD videos?
Thanks.

 
hackepeter User
FirefoxWindows

Hi Sebaro,

For me today's version has solved the problem.

Regards,
Peter

 
sm00th Scriptwright
FirefoxWindows

oh yes, it was "exactfit", I'm bad at copy/paste ;)

param width/height has no effect, at least it doesn't exist on wmp objects.
http://msdn.microsoft.com/en-us/library/dd56399...

quicktime worked, after i hacked those params in. vlc is always a little bit jiffy and produces bugs when starting webm format. but mp4 worked after the video loaded fully. at least thats what I got from testing around. I wouldn't recommend vlc anyway, because it has only some controls in fullscreen.

another bug I've seen, if the video is available by youtube in html5, then the video is loaded and played anyway in the background, when you've joined the youtube html5 beta, after leaving the beta it worked normally.

 
sebaro Script's Author
OperaX11

I've added in the 1.22 version the params elements. Can you please tell me if it works now for large videos?

There's a problem in the HTML5 trial. The HTML5 player is embedded after the script began to load. So, a document.getElementsByTagName('video').length is 0 when the script loads. I can do a loop until the HTML5 video is loaded/created. Is there a better way?
Thanks.

 
hackepeter User
FirefoxWindows

Hi Sebaro,

In my post two days ago I forgot to mention that the problem is solved only when I don't join the HTML5 trial.
However, as most videos are now available as WebM and play natively in my Firefox without joining the trial, this is no longer a big problem for me.

Regards,
Peter

 
sebaro Script's Author
OperaX11

Hi Peter,
I'm trying to fix it for html5 trial too.

 
sm00th Scriptwright
FirefoxWindows

Works now fine with external plugin players, a friend uses wmp plugin and that works too, maybe I switch to that, because quicktime doesn't offer fullscreen.

About WebM, if a video is available in that, I usually use that in Firefox. would be great if you can implement a switch to prefer either mp4 or webm, working together with the hd/sd/ld switch.

 
sebaro Script's Author
OperaX11

sm00th,
In the next version application/x-mplayer2 mimetype is replaced with application/x-ms-wmp which seems to improve WMP's performance.

For now you can put WebM first in the vdoCont array from selectMyVideo function. I'll add a webm/mp4 switch button.

 
Oshido Satsuki User
FirefoxX11

Hello

i use the version of 19-02-2012 of viewtube, it has a problem with a machine equiped with Xubuntu 11.4, firefox 10.0.2, i can play the videos on youtube, i see the top controls, but the lower bar with play , pause stop button and evolution does appears at all.

I use a similar configuration with another computer but with ubuntu 10.4 and works fine.

It is a very nice tool , and save the old laptops to don't overheat, thank you for your work.

 
sebaro Script's Author
OperaX11

Hi,
You mean you don't see the video plugin control buttons? What video plugin do you use?

 
Oshido Satsuki User
FirefoxX11

I checked all the plugins installed on both firefox, and installing the totem firefox plug-in after disabling vlc firefox plugin it resolved the problem, it is working fine now, thanks for your reply.