Automute query parameter is not working

Created on 11 July 2023, 12 months 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.69.0 2024