Problem/Motivation
Dreambroker videos have some new parameters that can be used when embedding videos:
- quality -> for example "1080p" and this will automatically set the video quality
- lang -> for example "sv" and this will allow the use of subtitles in the video for the provided language code
Steps to reproduce
Just add parameters to the url, like &quality=1080p&lang=sv
Proposed resolution
Allow using those parameters. Currently the module just strips away all the other parameters except "autoplay" that can be set in the module settings.
The optimal solution would be some kind of system that would be more flexible if the parameters change or there will be more of them in the future.
Remaining tasks
Devise a solution and apply a patch.
User interface changes
None, unless something will be added to the module settings because of this.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | interdiff-8-11.txt | 3.53 KB | kekkis |
| #11 | dreambroker-query-parameters-3366926-11.patch | 7.66 KB | kekkis |
Issue fork media_entity_dreambroker-3366926
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hartsak commentedHere is a quick fix that allows using just those mentioned parameters - "lang" and "quality".
Obviously, this could be made much better, but like mentioned, this is a quick fix :)
Comment #3
hartsak commentedOk, another try.
The first patch was a failure as it would not allow using DreamBroker videos without lang and quality parameters. That should be fixed now. In addition, I tried to fix deprecated/broken tests. So let's see how this attempt turns out (fingers crossed).
Comment #4
kekkisThank you for the contribution! Here are a couple of notes on the patch.
I would like to see variable names conforming better to coding standards, e.g.
$channel_id.Coding standards mandate ending all inline comments with a full stop.
Comment #5
mrinalini9 commentedUpdated patch #3 by addressing #4, please review it.
Thanks!
Comment #6
hartsak commentedThanks @mrinalini9! The patch in #5 seems to work.
Comment #7
vsheokeen commentedadd parameters to the url with quality=1080p&lang=sv and it worked well.
Moing it to RTBC.
Comment #8
hartsak commentedSorry about mixing things up a bit, but I just noticed that the patch in this issue also fixes a lot of Drupal 10 compatibility issues. Because this project doesn't have the Automated D10 patch, I guess we could use this issue to come up with a simple D10 support at the same time?
I checked the patch from #5 with Upgrade Status module and only thing missing from it is the version number. So here is another patch that should add it as well. After that this could be used for Drupal 10 upgrade too?
Comment #9
kekkisI am choosing a different path with the versions. I created a different issue for pure D10 support (see https://git.drupalcode.org/project/media_entity_dreambroker/-/merge_requ... and #3395467). I will publish that version as 2.0.0 and will add a 2.1.x branch where I'll incorporate these changes. Thanks again for the efforts!
Comment #10
kekkisUpdating status and base version to rerun some testing and to create a MR.
Comment #11
kekkisUploading new patch which is based on 2.1.x. Also providing interdiff, even if that now contains changes already present in the published version 2.0.0 since they weren't yet present in the patches here.
Please @hartsak if you are able, test the issue fork with a D10 installation to see whether my changes are valid.
Comment #13
hartsak commentedHello @kekkis!
I finally had time and an opportunity to test the issue fork in my D10 (10.1.5) project. Works as expected: D10 compatible, both quality and lang parameters work. The videos also work without the additional parameters.
Thank you for your efforts in maintaining this!
Comment #15
kekkisComment #16
kekkisThank you for the contributions here, I assigned credit to everyone involved. Sorry that I didn't think to add this comment in the same status update.