Automute query parameter is not working

Created on 11 July 2023, almost 2 years ago

Problem/Motivation

The query parameter is not respected.

Steps to reproduce

  1. Go to /admin/config/media/twentythree-widget
  2. Check "Enable query string parameters"
  3. Check "Disable/enable mute (autoMute=<0|1>)"
  4. Create a new media entity embedding a TwentyThree video with autoMute=1 as query parameter
  5. Create a new node with the video.

Proposed resolution

The problem is caused by the order of the two arrays merged at line 123 in TwentyThree.php. Changing

array_merge($query_parameters, $embed_code['#query']);

to

array_merge($embed_code['#query'], $query_parameters);

solves the problem.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇰Denmark beltofte Copenhagen 🇩🇰

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024