blynx Posted October 13, 2015 Share Posted October 13, 2015 Hi, this is a textformatter-module to globally set all kinds of YouTube and Vimeo options to embedded videos. It works well with TextformatterVideoEmbed and I think also with TextformatterOEmbed - https://github.com/blynx/TextformatterVideoEmbedOptions ... this is my first module - so I hope the code is acceptable ... ; ) What do you think about the way I implemented the configuration? I Seperated all the config and defaults into a JSON file and generated all fields automatically ... I was wondering if this was already possible or a good idea at all here: https://processwire.com/talk/topic/11155-create-inputfields-from-json-array/ Looking forward hearing your feedback! Cheers, Steffen 7 Link to comment Share on other sites More sharing options...
Peter Posted October 20, 2015 Share Posted October 20, 2015 Hi, I get a parse error when trying to install this module: Parse Error: syntax error, unexpected '.1' (T_DNUMBER), expecting ')' (line 27 of /var/lib/openshift/xxxxxxxxxxxxxxxxxxxxx/app-root/runtime/repo/site/modules/TextformatterVideoEmbedOptions/TextformatterVideoEmbedOptions.module) Link to comment Share on other sites More sharing options...
blynx Posted October 20, 2015 Author Share Posted October 20, 2015 Ah, that one - It should be fixed now. I made a stupid mistake in the version number Link to comment Share on other sites More sharing options...
Peter Posted October 20, 2015 Share Posted October 20, 2015 Sorry, but I still get errors with the latest version: Parse Error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' (line 49 of /var/lib/openshift/xxxxxxxxxxxxxxxxxxxxx/app-root/runtime/repo/site/modules/TextformatterVideoEmbedOptions/TextformatterVideoEmbedOptions.module) Link to comment Share on other sites More sharing options...
blynx Posted October 20, 2015 Author Share Posted October 20, 2015 Ok, I should have fixed that now - it worked for me before, though. May I ask which PHP version you are running? I was using the self::class thing to get the classname and that didn't seem to be working for you. Link to comment Share on other sites More sharing options...
Peter Posted October 20, 2015 Share Posted October 20, 2015 Thanks, I´m running PHP Version 5.4.40. It works now, but the module seems to output the parameters in text too: <section id='video'>yt_autoplayyt_hlyt_relyt_startyt_autoplayyt_hlyt_relyt_start<div class='TextformatterVideoEmbed'... I'm using your module in addition to TextformatterVideoEmbed and I have added it after that one. Another question: Do you know how to mute the sound or set a low volume level when using the autoplay parameter? I know this is not possible using parameters in the url, but there must be way Regards, Peter Link to comment Share on other sites More sharing options...
blynx Posted October 20, 2015 Author Share Posted October 20, 2015 Arrrgh!ok - hum, so it is just adding it additionally but the url-parameters are ok? Will have a look into this later - I don't know if or how it is possible to control the volume. At least you are able to activate some "JS API" - so I guess it should be possible. You should have a look into it here: https://developers.google.com/youtube/js_api_reference But it seems to be deprecated ... EDIT: Use the iFrame API --> https://developers.google.com/youtube/iframe_api_reference There are some functions: player.mute():Void player.unMute():Void player.setVolume(volume:Number):Void player.getVolume():Number Link to comment Share on other sites More sharing options...
blynx Posted October 21, 2015 Author Share Posted October 21, 2015 The other bug should also be fixed now! Link to comment Share on other sites More sharing options...
csa6130 Posted June 6, 2016 Share Posted June 6, 2016 Update to 3.3 is not possible. I am running pw in 3.0.18. I created a field named videos - put textformatter to embed youtube... - $page->video is just showing the url CKEditor is used and the <p> tags are set. What am I doing wrong? Link to comment Share on other sites More sharing options...
blynx Posted June 7, 2016 Author Share Posted June 7, 2016 Hi, mh, does it also 'not work' without this options module? Maybe there is something wrong with the TextformatterVideoEmbed/Inputfield setup already because the link didn't get transformed in the first place. This module, the TextformatterVideoEmbedOptions only applies the embed options to the embedded object. Also make sure that the VideoEmbedOptions module is run after the VideoEmbed module. (Though it might actually be that it doesn't matter) Is the url transformed into an <a> link? 1 Link to comment Share on other sites More sharing options...
csa6130 Posted June 7, 2016 Share Posted June 7, 2016 Thank you - was my fault. While installing the module with modulesmanager I just found the options module. Daaaaaaaah hours for nothing . Great support! So People get both modules and watch the pw magic happen. 1 Link to comment Share on other sites More sharing options...
PWaddict Posted February 2, 2017 Share Posted February 2, 2017 The YouTube: Show Info field is broken. When the value is 0 it doesn't add the parameter: &showinfo=0 at the video url to hide the info but if the value is changed to 1 then it adds &showinfo=1 on the url which is useless cause YouTube shows info by default. Please fix it. Link to comment Share on other sites More sharing options...
blynx Posted February 2, 2017 Author Share Posted February 2, 2017 Oh! Thanks for the tip - will try to take care of that today if I find the time - otherwise next week, will be away from the computer for the weekend. I will let you know when it is fixed - Link to comment Share on other sites More sharing options...
PWaddict Posted February 2, 2017 Share Posted February 2, 2017 2 hours ago, blynx said: Oh! Thanks for the tip - will try to take care of that today if I find the time - otherwise next week, will be away from the computer for the weekend. I will let you know when it is fixed - Ok Thanks. I will be waiting. Link to comment Share on other sites More sharing options...
PWaddict Posted February 2, 2017 Share Posted February 2, 2017 I found another problem. ProcessWire doesn't display the correct version of your module. It keeps saying that I have 0.2.7 and that there is a newer version 0.3.3 which is false cause I already have the latest module version installed. I opened the module file to confirm that: 'version' => 033. Please fix that too. Link to comment Share on other sites More sharing options...
adrian Posted February 2, 2017 Share Posted February 2, 2017 31 minutes ago, PWaddict said: I found another problem. ProcessWire doesn't display the correct version of your module. It keeps saying that I have 0.2.7 and that there is a newer version 0.3.3 which is false cause I already have the latest module version installed. I opened the module file to confirm that: 'version' => 033. Please fix that too. @blynx - FYI that is because of the way you have declared the version number: 033 Either use: 33 or '0.3.3' 2 Link to comment Share on other sites More sharing options...
PWaddict Posted February 2, 2017 Share Posted February 2, 2017 9 hours ago, blynx said: Oh! Thanks for the tip - will try to take care of that today if I find the time - otherwise next week, will be away from the computer for the weekend. I will let you know when it is fixed - To quickly fix the issue just replace the below code from TextformatterVideoEmbedOptions.config.json "yt_showinfo": { "type": null, "value": 0, "label":"YouTube: Show Info", "description":"Supported values are 0 and 1.", "notes": "Default: 0" } to this: "yt_showinfo": { "type": null, "value": 1, "label":"YouTube: Show Info", "description":"Supported values are 0 and 1.", "notes": "Default: 1" } 2 Link to comment Share on other sites More sharing options...
blynx Posted February 9, 2017 Author Share Posted February 9, 2017 Thanks all for the hints! Yup, it was just the wrong default value: Fixed now: https://github.com/blynx/TextformatterVideoEmbedOptions 4 Link to comment Share on other sites More sharing options...
tires Posted May 17, 2018 Share Posted May 17, 2018 Very helpful module! Is there a setting to hide this ugly "ytp-pause-overlay"? Link to comment Share on other sites More sharing options...
blynx Posted May 17, 2018 Author Share Posted May 17, 2018 Hi! It should be the "rel" attribute, but if it doesn't work anymore then YouTube has obviously changed their API.. 😕 edit: Ah, you are talking about the pause overlay ... yep, not sure about that atm. All documented attributes: https://developers.google.com/youtube/player_parameters Link to comment Share on other sites More sharing options...
tires Posted May 17, 2018 Share Posted May 17, 2018 FYI: According to this information:https://stackoverflow.com/questions/44027851/how-to-remove-pause-menu-class-ytp-pause-overlay-from-youtube-embed The overlay is influenced by this code: showinfo=0?ecver=2 Link to comment Share on other sites More sharing options...
PWaddict Posted May 17, 2018 Share Posted May 17, 2018 3 hours ago, tires said: Very helpful module! Is there a setting to hide this ugly "ytp-pause-overlay"? Change the "YouTube: Show Related Videos at the End" to 0 value. It hides the related videos when you pause too. 1 Link to comment Share on other sites More sharing options...
tires Posted May 30, 2018 Share Posted May 30, 2018 On 5/17/2018 at 5:35 PM, PWaddict said: Change the "YouTube: Show Related Videos at the End" to 0 value. It hides the related videos when you pause too. No, these "ytp-pause-overlay" is displayed anyway. Is there another way to hide this? Link to comment Share on other sites More sharing options...
PWaddict Posted May 30, 2018 Share Posted May 30, 2018 14 minutes ago, tires said: No, these "ytp-pause-overlay" is displayed anyway. Is there another way to hide this? Can you show me a screenshot of the "ytp-pause-overlay"? Link to comment Share on other sites More sharing options...
tires Posted May 30, 2018 Share Posted May 30, 2018 1 hour ago, PWaddict said: Can you show me a screenshot of the "ytp-pause-overlay"? Just googled that one where you can see a screenshot:https://www.freedomdv.com/youtube-adds-another-relatedsuggested-videos-overlay-on-embedded-videos/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now