I use video_filter module with video filter plugin for ckeditor (standalone). Whenever I put a youtube video in my content (autoplay unchecked), the video always start in autoplay. Any idea why is that ?
Thanks in advance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

b2f’s picture

Assigned: Unassigned » b2f
Status: Active » Closed (fixed)

I fixed it by adding one line to plugin.js where the checkbox is checked :

        if (params.autoplay) {
          str += ' autoplay:' + params.autoplay;
        }
	else{
	  str += ' autoplay:' + '0';
	}
blackdog’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Maybe this is because the "Autoplay" setting is set to Yes?

b2f’s picture

1. Where is this Autoplay setting configuration if it's not the autoplay checkbox ?

Rest of of the comment was not relevant so I deleted it.

Rich_Weiss’s picture

When I add a video link, and check the "Autoplay" box in the Video Filter Dashboard, it adds the autoplay:1 switch to the video filter line. I manually edited it to autoplay:0 and the video does not autoplay, which is the desired result when the "Autoplay" box is unchecked. However, when the "Autoplay" box is unchecked, the autoplay switch is not added, and subsequently the plugin.js script sets it to on.

Rather than relying on the plugin.js script, or other similar scripts, to decide how to set the autoplay when no switch is sent to it, or patching the scripts manually, perhaps it would be better if that switch was automatically included and set to 0 by default, and alternatively set to 1 when the Autoplay box is checked.

For now I'm manually adding autoplay:0 to all of my links so that I know they will default to off.

polskikrol’s picture

Have the same problem. When I do not check 'autoplay' I get the following error:

Autoplay field is required.

My only option is to enable autoplay. However, I do not want autoplay enabled.

joel_osc’s picture

Seeing same issue, fixed as per Zen Master by adding a couple of lines around line 35 of editors/tinymce/video_filter.js to:

 34       if ($('#edit-autoplay').is(':checked')) {
 35         str += ' autoplay:' + $('#edit-autoplay').val();
 36       }
 37       else {
 38         str += ' autoplay:0';
 39       }

Seems to work well now.

joel_osc’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
473 bytes

Here is a quick patch if interested.

ordermind’s picture

Here's a patch for ckeditor.

kalman.hosszu’s picture

Status: Needs review » Reviewed & tested by the community

I tested it with tinymce, and it works well.

Thanks

jenlampton’s picture

The patch in #7 also worked for me. Thanks guys!

trillex’s picture

Issue summary: View changes

Nevermind, sorry.

estoyausente’s picture

#7 work fine in my site. Plz commit. :)

DamienMcKenna’s picture

This should be added to the next release.

DamienMcKenna’s picture

Version: 7.x-3.0 » 7.x-3.x-dev
grom358’s picture

Status: Reviewed & tested by the community » Needs work

Tested in Chrome and does not work, due to window.showModalDialog is undefined. So it doesn't use the version of popup using the insert function. Need to also patch video_filterDialog

grom358’s picture

Sorry my bad. I notice my issue is due to also using the patch from https://www.drupal.org/node/2335169

So there is cross over between these issues.

grom358’s picture

Status: Needs work » Reviewed & tested by the community

I have created a patch for modal that includes this fix and applies the same fix to the modal dialog. So if you want both patches see https://www.drupal.org/node/2335169#comment-9727685

Shisha Điện tử’s picture

I don't wanna use patch. Can i use code only?

blackdog’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

So this is fixed by the commit in https://www.drupal.org/node/2335169?

DamienMcKenna’s picture

Status: Postponed (maintainer needs more info) » Fixed
Parent issue: #2297491: Plan for Video Filter v7.x-3.2 release »

Yes, this was fixed by #2335169: Reliance on showModalDialog breaks CKEditor plugin in Chrome, though the code looks a little silly.

DamienMcKenna’s picture

Status: Fixed » Closed (duplicate)