News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Ohara YouTube Embed

Started by Suki, December 21, 2011, 03:04:59 PM

Previous topic - Next topic

Suki

Quote from: Sir Osis of Liver on July 23, 2018, 11:19:15 PM
Just trying this on test forum, 2.0.15 Curve.  Video loads, but click play button it scrolls up and get black screen.  Video plays normally on youtube.  Showing this code -



<iframe src="//www.youtube.com/embed/FIeSFyV2tsI?autoplay=1&amp;autohide=1" frameborder="0" allowfullscreen="allowfullscreen" style="width: 480px; height: 270px;"></iframe>



You can see it here


This is most likely a JS issue, unfortunately, in order to avoid using iframes directly on the server side I rely on JS to create the video code on demand. This means the mod relies on the browser correctly handling whatever JS the page needs to run. THere might be cases where the browser doesn't parse/run JS and the mod will not work correctly.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Sir Osis of Liver

Works in FF60, not in IE11.  I'm running other code that uses iframe with js (not video), haven't had any problems in IE.  Any ideas for a fix?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Suki

will need to take a look at the console log for IE11 and if you have any other js running alongside this one.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Sir Osis of Liver

This is a clean install, no additional js is running.  What to look for in console log?  Most of the working parts seem to be in ohyoutube.js, but I'm not seeing where/how it runs video after play button is clicked. 
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Sir Osis of Liver

#704
Found the problem, Suki, it's not in your mod.  IE tracking protection blocks video from playing.  Apparently it doesn't see the trackers when video loads, only when it plays.  I use it for ad blocker, but I doubt many IE users even know it's there.  Odd that it doesn't block same video at youtube.com, just in forum.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Suki

Cool. Also worth to mention that things like noscript or other stuff that prevents JS execution will prevent this mod from working.

As for working on youtube.com probably because they have some kind of agreement, google likes to do that a lot to favor their own products.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

dowhelp

Hi Suki

I have Ohara installed but would like the functionality of facebook videos etc.

I had SAVE mod installed. When I installed your mod as well it gave the error :

Code: (Find) [Select]
if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '' && (!allowedTo('admin_forum') || strpos($_POST['message'], '') === false))
Code: (Replace) [Select]
if ($smcFunc['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img><iframe><video><div>')) === '' && (!allowedTo('admin_forum') || strpos($_POST['message'], '') === false))


Just like rad1701. I clicked on the "failed line.
Pressed "select" on the "replace".
The error still shows.
Is it ok to continue?

Will it interfere with SAVE (if you know)?

Will an uninstall of the mod remove it and the modification to the code?

Thank you for any help you can give.

Regards


Kindred

that indicator is telling you what you have to MANUALLY change.

pressing "select" just selects it in the browser window.
https://wiki.simplemachines.org/smf/Error_in_mod_installation
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

dowhelp


melanie1986

 Would it be possible at all to modify this mod to playback Dailymotion videos on my site?

FishingManMatt

Hi!

Just wanted to let you know that the language PHP files do not end with ?>

Regards,
Matt

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

FishingManMatt

Ah, OK.
I thought it was some kind of a typo.
Thanks for the reply :)

FishingManMatt

Let me report that the W3C validator shows warnings (see attached screenie) which are probably related to
line 659 in OharaYTEmbed.php
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="//code.jquery.com/jquery-1.9.1.min.js"%3E%3C/script%3E\'))</script>

njtweb

Quote from: melanie1986 on October 04, 2018, 01:39:38 AM
Would it be possible at all to modify this mod to playback Dailymotion videos on my site?

Use this instead if you want Daily motion support. https://custom.simplemachines.org/mods/index.php?mod=2681

Suki

Quote from: FishingManMatt on November 02, 2018, 09:20:01 AM
Let me report that the W3C validator shows warnings (see attached screenie) which are probably related to
line 659 in OharaYTEmbed.php
<script type="text/javascript">!window.jQuery && document.write(unescape(\'%3Cscript src="//code.jquery.com/jquery-1.9.1.min.js"%3E%3C/script%3E\'))</script>

Yeah I'm aware of those, its a false alarm. The W3C parser isn't particulary smart about handling JS.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Argon3000

#716
Quote from: Suki on December 21, 2011, 03:04:59 PM

For SMF 2.0.x only

Version 1.2.x and above requires PHP 5.3 or greater

Hello!

SMF 2.0.15 + Ohara YouTube Embed 1.2.9 on PHP 5.6 mod work.

PHP 7.0 mod does not work. On-screen text Youtube: "An error occurred. Please try again later (playback ID=...)"

Please, help?





SMF 2.0.15, PortaMx-SEF 1.54

jsx

Suki,

I added translation file for Polish. Please, put it in your modification.


FishingManMatt

Thanks for your translation, jsx.
Damn! I also made my Polish translation and completely forgot to send it to Suki. Now you've reminded me about that. I always sent my translations to authors via PM.
So here it is... Now you have two Polish translations  ;D

Cheers!

jsx

I was first with this translation. :)

Advertisement: