Advertisement:

Author Topic: Ohara YouTube Embed  (Read 185917 times)

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,334
  • I don't really come from outer space
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #700 on: July 24, 2018, 01:08:01 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 -

Code: [Select]

<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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,239
  • 'Tis the gift to be simple (duh)
Re: Ohara YouTube Embed
« Reply #701 on: July 24, 2018, 04:53:31 PM »
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?

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,334
  • I don't really come from outer space
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #702 on: July 24, 2018, 05:06:47 PM »
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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,239
  • 'Tis the gift to be simple (duh)
Re: Ohara YouTube Embed
« Reply #703 on: July 24, 2018, 05:54:45 PM »
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. 

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,239
  • 'Tis the gift to be simple (duh)
Re: Ohara YouTube Embed
« Reply #704 on: July 25, 2018, 12:23:02 PM »
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.

« Last Edit: July 25, 2018, 12:34:15 PM by Sir Osis of Liver »

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,334
  • I don't really come from outer space
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #705 on: July 25, 2018, 02:38:11 PM »
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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline dowhelp

  • Semi-Newbie
  • *
  • Posts: 14
Re: Ohara YouTube Embed
« Reply #706 on: July 27, 2018, 06:47:11 AM »
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


Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,085
  • Gender: Male
    • Kindred-999 on GitHub
Re: Ohara YouTube Embed
« Reply #707 on: July 27, 2018, 07:04:12 AM »
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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline dowhelp

  • Semi-Newbie
  • *
  • Posts: 14
Re: Ohara YouTube Embed
« Reply #708 on: July 27, 2018, 12:10:40 PM »
Thank you kindred

Offline melanie1986

  • Jr. Member
  • **
  • Posts: 163
  • Gender: Female
  • Vet, Mum, Horse lover and sci-fi geek
    • Lost Worlds SciFi forum
Re: Ohara YouTube Embed
« Reply #709 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?

Offline FishingManMatt

  • Semi-Newbie
  • *
  • Posts: 42
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #710 on: October 11, 2018, 05:34:03 PM »
Hi!

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

Regards,
Matt

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 57,085
  • Gender: Male
    • Kindred-999 on GitHub
Re: Ohara YouTube Embed
« Reply #711 on: October 11, 2018, 06:03:00 PM »
they don't have to...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline FishingManMatt

  • Semi-Newbie
  • *
  • Posts: 42
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #712 on: October 13, 2018, 08:04:50 AM »
Ah, OK.
I thought it was some kind of a typo.
Thanks for the reply :)