Ohara YouTube Embed

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

Previous topic - Next topic

dodos26

#820
Hi! I unistall now v11 and now instal v13 and now have problem, shows a black screen and creates a new iframe each time you click it:
The thumbnail image appears but no play button. After clearing the cache, the button appears, but the problem is still the same.
Also, the sound starts working, and clicking on the black background causes many to play. (creates more players)



GOOD VS BAD:

dodos26

When I installed v13 on the clean forum and I downgrade to v11, the v11 version also has no problem with the black screen, but it does not play the sound back to v13 will fix it o0 I cleaned the forum cache and the cache of my browsers and nothing helped, surprisingly, installing the new theme helps o0

Scooter Trash

Hi Suki,

I realized last night that I was using an older version of your mod, so I uninstalled it and deleted it using Package Manager. Then I installed the new version using Package Manager.

Everything works great, but in this version, if there's a smiley after a video, the smiley doesn't display, just the smiley code. :whatever_smiley:

I Googled, and found "Fixed the parsing smiles after a video issue." but could not find anything else related to this since around 2011. Any idea why this is happening, and how I can resolve the issue?

Thanks

Scooter Trash

Anyone?

Post with smiley looks fine

YouTube video

Post with smiley not working

YouTube video

Post with smiley looks fine

YouTube video

Post with smiley not working


..... Lather, rinse, repeat.

Suki

the smiley is right next to the video? as in no spaces between them? can you post a link to a public post where this issue happens? and an example of how you are putting the video link plus the smiley in code tags.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Scooter Trash

Thank you SO much for the reply. This particular user ate a LOT of popcorn lol.

- SMF 2.0.19
- Default theme
- Ohara YouTube Embed 1.2.13

Example here >> https://whiterockeaglechat.com/forum/index.php?topic=3221.msg13813#msg13813

Quote from: Suki on May 10, 2022, 09:19:42 AMthe smiley is right next to the video? as in no spaces between them? can you post a link to a public post where this issue happens? and an example of how you are putting the video link plus the smiley in code tags.

Scooter Trash

FYI: I changed the theme to Ant's Mutant so Google would consider the forums mobile-friendly.
The issue is the same in both themes.

Quote from: Scooter Trash on May 10, 2022, 10:31:19 PMThank you SO much for the reply. This particular user ate a LOT of popcorn lol.

- SMF 2.0.19
- Default theme
- Ohara YouTube Embed 1.2.13

Example here >> https://whiterockeaglechat.com/forum/index.php?topic=3221.msg13813#msg13813

Quote from: Suki on May 10, 2022, 09:19:42 AMthe smiley is right next to the video? as in no spaces between them? can you post a link to a public post where this issue happens? and an example of how you are putting the video link plus the smiley in code tags.


dodos26


dodos26

#828
Quote from: dodos26 on April 27, 2022, 12:01:23 PMHi! I unistall now v11 and now instal v13 and now have problem, shows a black screen and creates a new iframe each time you click it:
The thumbnail image appears but no play button. After clearing the cache, the button appears, but the problem is still the same.
Also, the sound starts working, and clicking on the black background causes many to play. (creates more players)

attach

GOOD VS BAD:
attach

Bro I found this bug, a large number of styles and various mods use the bootstrap library.
That add css:
* {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}
or
* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

This causes a problem with your css iframe temporarily you can use this style or try to look for it in bootstrap.min.css However, I'd prefer you solve this on the mod side so it doesn't cause collisions.
* :not(.oharaEmbed iframe){
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
}

For change in ur css u can set:
Code (this) Select
.oharaEmbed iframe, .oharaEmbed object, .oharaEmbed embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
Code ("for this") Select
.oharaEmbed iframe, .oharaEmbed object, .oharaEmbed embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-sizing: unset;
-webkit-box-sizing: unset;
-moz-box-sizing: unset;
}

FragaCampos

Hello.

I just uninstalled an older version and installed the most recent one of this mod, but I have a problem.
Youtube videos work fine, but Vimeo videos only show if I disable the autoembed option, which is odd.
What am I missing?

Using SMF 2.0.19.

Melonking

Seconded; Vimeo videos have been broken for about 6 months - I get an message that says "This is not a Vimeo link" when I try and post Vimeo links.

Also it would be great if videos would respect text alignment instead of centring all the time!

Annndd I guess it would be cool have have some system for adding custom video sites  ;D

Kindred

Since Suki has been caught up in real life and has not been online in almost a year...  probably no updates to this mod any time soon.
Сл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."

Melonking

I have identified the cause Vimeo issue - Vimeo's api is misidentifying "fetch_web_data()" calls as being from an Internet Explorer browser, and showing a screen saying "Internet Explorer is not supported" instead of returning the api call to get the video embed code.

I tried changing the user agent in fetch_web_data but it seemed to have no effect, Im not sure whats causing Vimeo to make this mistake.

Melonking

To follow this up: here is the fix for Vimeo videos!

Open: Class-CurlFetchWeb.php in your Sources folder

Change the CURLOPT_USERAGENT on line 51 to something modern like:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0"

Save the file! Your Vimeo links should now be working!

Also an additional recommendation:
Open: OharaYTEmbed.php in your Sources

Find the line "https://vimeo.com/api/oembed.json?url="
and change it to "https://vimeo.com/api/oembed.json?dnt=true&url="
this will disable Vimeo from tracking your forum members!


Melonking

Quote from: Scooter Trash on May 08, 2022, 02:10:58 PMAnyone?

Post with smiley looks fine

YouTube video

Post with smiley not working

YouTube video

Post with smiley looks fine

YouTube video

Post with smiley not working


..... Lather, rinse, repeat.

Did you ever find a solution to this; Im seeing exactly the same effect on my forum; I know that smiley parsing is done via regex.. but I have no idea why this mod would affect that..

Sir Osis of Liver

2.0.19, mod ver. 1.2.13. Getting this error from OharaYTEmbed.english.php in php 8.0, not in 7.4 -


count(): Argument #1 ($value) must be of type Countable|array, null given

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

                                     - R. Waters

Suki

Quote from: Melonking on March 20, 2023, 09:32:48 AM
Quote from: Scooter Trash on May 08, 2022, 02:10:58 PMAnyone?

Post with smiley looks fine

YouTube video

Post with smiley not working

YouTube video

Post with smiley looks fine

YouTube video

Post with smiley not working


..... Lather, rinse, repeat.

Did you ever find a solution to this; Im seeing exactly the same effect on my forum; I know that smiley parsing is done via regex.. but I have no idea why this mod would affect that..

I'm trying to replicate this issue, can you explain how to reproduce it?  what settings does the mod have, for example, is autoembed feature on?  does the video and the smiley are posted on the same post or are posted separately?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

Quote from: Melonking on February 07, 2023, 09:40:07 PMTo follow this up: here is the fix for Vimeo videos!

Open: Class-CurlFetchWeb.php in your Sources folder

Change the CURLOPT_USERAGENT on line 51 to something modern like:
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0"

Save the file! Your Vimeo links should now be working!

Also an additional recommendation:
Open: OharaYTEmbed.php in your Sources

Find the line "https://vimeo.com/api/oembed.json?url="
and change it to "https://vimeo.com/api/oembed.json?dnt=true&url="
this will disable Vimeo from tracking your forum members!

Thank you for your reports and the solutions, for the first one I'm afraid it cannot be solved by this mod unless it modifies that file on install as well but I'm wondering if doing so will not have any impact on other parts of SMF or even other modifications.

The second one makes sense and will try to add a way to make it more easy to admins to change those variables.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

Theres a new version:

1.2.14 - May 06, 2023
- Remove imgur support
- Fix correctly displaying smileys after posting a video
- Use curl to make request to vimeo for getting the oembed info.

Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Advertisement: