News:

Forum is currently set to Admin Approval for New Members
Pegasus Gofundme website



Main Menu

YOUTUBE EMBEDS NOT WORKING

Started by zorgon, August 14, 2016, 10:35:54 AM

Previous topic - Next topic

Pimander

Quote from: thorfourwinds on August 15, 2016, 03:52:40 PM
We be on a tablet running Chrome and see both and both work.
That may well be because Android uses a modified Linux kernel.  It's based on Linux.

ArMaP

Quote from: Pimander on August 15, 2016, 10:06:52 AM
Youtube appears to send Flash to Windows but html5 to Linux.
But Firefox on Windows shows both.

QuoteThis mod appears to be a solution.  It is supposed to embed most videos automatically when a user adds a link to a video.

http://custom.simplemachines.org/mods/?mod=2681
I will try that on my test system. :)

ArMaP

#17
Quote from: Pimander on August 15, 2016, 10:06:52 AM
This mod appears to be a solution.  It is supposed to embed most videos automatically when a user adds a link to a video.
It works, but although I didn't see it it supposedly has a copyright message that can be removed by paying 10$.

Edited to add that the copyright message appears at the bottom of the page, below the "SMF 2.0.11 | SMF © 2013, Simple Machines" line. That mod also allows embedding of Facebook videos, among many other sources.

As it replaces the links for the video with the video, all posts that have a link below the video will show the video instead of the link.

Pimander

Quote from: ArMaP on August 15, 2016, 05:43:00 PM
As it replaces the links for the video with the video, all posts that have a link below the video will show the video instead of the link.
Hmmmm....  That means lots of old threads will show the video twice.  I don't mind that.  How does everyone else feel about that?

It solves the problem but it's Zorgon's decision I guess.  What you sayin' Z?

ArMaP

Quote from: Pimander on August 15, 2016, 08:30:08 PM
Hmmmm....  That means lots of old threads will show the video twice.  I don't mind that.  How does everyone else feel about that?
It also means that old posts that had only the youtube tags will not work, as this is a workaround, not a solution to the current problem. As usual, I would prefer a real solution, but this alternative sounds good.

funbox

Quote from: ArMaP on August 15, 2016, 09:29:24 PM
It also means that old posts that had only the youtube tags will not work, as this is a workaround, not a solution to the current problem. As usual, I would prefer a real solution, but this alternative sounds good.

haven't you fixed it yet ? :D I have a few Video's I know you're just gagging to watch :D

sneekview link



synopsis* funwithmicrowaves*

funbox

Pimander

Quote from: ArMaP on August 15, 2016, 09:29:24 PM
It also means that old posts that had only the youtube tags will not work,
Yes, it doesn't solve the problem completely.  We need a patch that changes the way the [youtube] script works.  I expect a SMF update will have one eventually.

If people stop using Windows it would help.  Free software is cool.   8) :)

ArMaP

Quote from: Pimander on August 16, 2016, 11:13:31 AM
I expect a SMF update will have one eventually.
I don't, as that feature was a modification, and the people behind it stopped working on it some years ago.

QuoteIf people stop using Windows it would help.  Free software is cool.   8) :)
It would be cooler if Windows was free. ;D

Pimander

If only we could find or create a mod that uses the same [youtube] code it would be easy to fix.  I guess you would have to find a way of getting Youtube to send the html5 player every time.  I don't know how to do it.

Quote from: ArMaP on August 16, 2016, 12:14:00 PM
It would be cooler if Windows was free. ;D
FOSS rules!  :)

ArMaP

Quote from: Pimander on August 16, 2016, 01:28:00 PM
If only we could find or create a mod that uses the same [youtube] code it would be easy to fix.  I guess you would have to find a way of getting Youtube to send the html5 player every time.  I don't know how to do it.
After taking a look at what is stored in the database I could see that the method we have been using doesn't change a thing on the post, the youtube tags are still there, which means that what the modification does is change the contents of the post when it shows it on the page. That makes me think that maybe Firefox gets a different player because of the installed mod and not because of what YouTube sends to the browser.

The best solution (if possible) would be to change to code of the mod to make it post the HTML5 version instead of the Flash version.

I have to take a look at the code and see what I find. :)

QuoteFOSS rules!  :)
Yes, if the mod is FOSS then we can change the code and solve the problem. :)

Pimander

#25
Quote from: ArMaP on August 16, 2016, 01:56:05 PM
I have to take a look at the code and see what I find. :)
Yes, if the mod is FOSS then we can change the code and solve the problem. :)
I just tried  Chromium in Linux and it is black lining the first video in the OP.

Yes, if you can work out how to get the [youtube] mod to always display the html5 browser then problem solved. (or the other mod)

It seems strange that Chrome in Android displays the html5 player, but Chromium in Linux and Chrome in Windows doesn't.  Epiphany in Linux shows the html5 player but not in Windows!  But Firefox always shows the html5 player.  :o

WTF!

ArMaP

Quote from: Pimander on August 16, 2016, 02:11:53 PM
But Firefox always shows the html5 player.  :o
That part I can explain now. :)

Firefox, since version 46, has a new feature that automatically converts embedded YouTube videos to the  HTML player.

That behaviour is controlled by the "rewrite_youtube_embeds" flag (or whatever they call it), as it defaults to "true" all embedded Youtube have the code changed to the new HTML5 player. Changing it to "false" shows the black stripe.

ArMaP

After looking at the code of the modification that added the youtube tags I saw that the only difference in the code is when the browser is IE, as in that case the code puts the embed tags inside an object tag, but I found that, when the youtube tags are deactivated the code posts only the link, removing the tags.

So, to test it, I disabled the youtube tags on my test forum, added the Simple Audio Video Embedder modification and, as the disabled tags show only the links, the second modification replaces the links with the HTML5 player, so it looks like we only need to add this new modification to the forum and deactivate the youtube tags added by the first to have it working.

The only downside is that those posts that had both the player and the link now will show two videos, but I can live with that. :)

zorgon

#28
Just noticed today that the youtume embed code now uses THUIS url

https  ://www.youtube.com/embed/3lr7H7wm2tU

Before it used the standard one 

https    ://www.youtube.com/watch?v=3lr7H7wm2tU

I discovered that all the embeds on the website do actually still work It seem the ones I used to check were still the old code that i hand't fixed yet


zorgon

Quote from: ArMaP on August 16, 2016, 07:13:52 PM
So, to test it, I disabled the youtube tags on my test forum, added the Simple Audio Video Embedder modification and, as the disabled tags show only the links, the second modification replaces the links with the HTML5 player, so it looks like we only need to add this new modification to the forum and deactivate the youtube tags added by the first to have it working.

The only downside is that those posts that had both the player and the link now will show two videos, but I can live with that. :)

Sounds good to me  How many people go back several weeks to look at old posts anyway? :P

So can you do this on the forum files?  You should have access to them all via the admin access