News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ohara YouTube Embed

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

Previous topic - Next topic

Suki

Should be if using emulation.

Also have a 2.1 version: https://github.com/MissAllSunday/OharaYouTubeEmbed/releases/tag/v2.0  although its been a while and it might need some changes to work properly.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

1.1Nerd


AdeV73

Hi;

We've been using this mod for years (many thanks!) and it's been brilliant - but... recently YouTube have changed their policy & no longer serve content on http: //. Since this mod re-writes all YouTube URLs it finds to http: //etc., it's effectively *removing* video links (even valid ones)!

I've patched my copy, which has got it working again, but I suspect many other users of this mod are about to discover this problem...


TL;DR: Change all "http: //" references to "https: //" and the mod will work perfectly again!

[weird spacing added to prevent smiley generation :D]

Suki

Thank you for the report. Will issue a release for it shortly.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

Just tested the mod and couldn't reproduce the issue. The mod by default uses scheme-less urls  which means it doesn't add http or https to the iframe responsible for loading a video.

Do you have any other mod that might modify the default url behaviour?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

dekatria

Great mod, thanks!

However, when I check the autoembed option, the (many) video embeds I already did using [ html ] have stopped working.

for example this [html]<iframe width="560" height="315" src="https://www.youtube.com/embed/yNKjzzIvN0A" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>[/html]

produces a forbidden access error
http://prntscr.com/10yl36d

Suki

It would be too complex and CPU intensive to change all your html bbc tags on the fly for every request. It would be better if you could make a database edit and convert all of those bbc tags once.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

dekatria

Thanks for the reply. I was wondering if the mad could not mess with *html* embeds and leave them as they are already


Suki

Sorry for the late reply. Yes, I'm working on updating this mod to not rely on jquery, in the meantime you can safely remove this line:

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


From Sources/OharaYTEmbed.php as its only needed to check if an instance of jquery is already present.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Suki

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

jsx

@Suki

Thank you for this support, I installed Ohara YouTube Embed v1.2.12 and I was very surprised that in the modification settings the function where I could enter the width and height of the video has been removed. Currently, embedded video is very large. Can you add this feature back?


Suki

I did thought about leave that option but the more I was looking into it the more I realize it wasn't really needed since desktop view is in decline and even if you use a large screen, chances are you aren't viewing your browser on fullscreen.

I added some hardcoded fallbacks for large screens, can you tell me whats your desktop resolution or how you tipically view your videos?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

jsx

It is not good to see very large video windows when viewing a topic.

1920x1080 is my desktop resolution. I watch the videos that I have added in the topic, and probably forum users do the same. Currently embedded video is displayed in 1440x818 resolution. It depends on the theme. This resolution is displayed in the Curve theme.



Open this picture in a new tab. As you can see, the window is very large.

Kindred

so use CSS to limit the max size?
Сл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."

YogiBear

Quote from: jsx on March 07, 2022, 03:20:17 AM...and I was very surprised that in the modification settings the function where I could enter the width and height of the video has been removed. ...

I too would welcome this back Suki.

SMF v2.1.3  Mods : Snow & Garland v1.4,  PHP  v.7.4.33

jsx

@Suki

What's next with this topic?

Suki

New release: https://github.com/MissAllSunday/OharaYouTubeEmbed/releases/tag/v1.2.13

I didn't want to ditch support for mobile and other small screens since thats the way we are heading so I was having issues trying to incorporate the max width and height settings without affecting small screens. I went with this approach and introduced yet another setting, this new setting has the min screen size on which the width and height settings will start to be active.

The default value for this setting is 768 so this means for any screen larger than that size (wide) the width andd height settings will be aplied and thus videos will retain their sizes on those larger screens.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

jsx

@Suki

Thank you for restoring this feature. If I understood it correctly:

When I will browsing the topic on the forum from a device, e.g. a smartphone, which has a screen width greater than 768, my settings for the width and height of the embedded video will be applied?

When I will browsing the topic on the forum from a device, e.g. a smartphone which has a screen width smaller than 768, my settings for the width and height of the embedded video will not be applied?

Suki

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

Advertisement: