Fandom Developers Wiki
Advertisement

This is the talk page for discussing improvements to the YoutubePlayer page.

Simplification[]

Instead of nesting elements you can always store the data in attributes.

<div id="yt-player" ytcode="XXYYVVFoo" ytwidth="100px" ytheight="100px"></div>

You can then retrieve the values like so:

var code = $("#yt-player").attr("ytcode");
// etc...
Lil' Miss Rarity (message)Saturday, June 28th 2014, 09:58
¡Hi! Thanks for the suggestion, I've added! (except that instead of .attr, I used .data). Regards! P[ntor Kagam]ne [ talk me![[Special:Contributions/Pintor Kagamine|Special:EditCount/Pintor Kagamine contribs.]]] 18:42, June 28, 2014 (UTC)

Proper name[]

The script should technically be called YouTubePlayer. Do you think it should be moved? -- Monochromatic Bunny 19:06, June 11, 2016 (UTC)

Template[]

Why does this template work only on this page? I tried to use it on my page on this wiki and nothing showed OBI WAN KENOBI CONTACT 18:44, May 21, 2017 (UTC)

Because it's not supposed to work on any other page. YoutubePlayer isn't imported sitewidely but only on its documentation page, to demonstrate the capabilities of the script. If you're interested in how is it imported only on this page, see MediaWiki:DemoScripts.js. -- Cube-shaped garbage can 20:50, May 21, 2017 (UTC)

Reporting a bug[]

I found a bug. The function loop does not work when the parameters width and height are set to 0, this I checked in the next page from an external wiki: Usuario:Fabrix199/Pruebas. This test I make it with a video that last 5 seconds and this error only occur when the parameters previously mentioned are set to 0, it even works as how it should when both are set to 1. I hope this helps --Fabrix199 (talk) 02:10, January 9, 2018 (UTC)

Video keeps playing in tabview[]

If a video is embedded on a page transcluded through tabview, it will continue playing even if the tab containing the embedded video is switched to another tab. RoIento (talk) 17:35, February 26, 2018 (UTC)

Archive[]

Wasn't this script/template disabled by Wikia due to a "security review" a while ago? Why wouldn't the Archive template be appropriate for this page? —Vozhan [talkcontribs] 1:04, August 01, 2020 (UTC)

You must be thinking of something else since Staff never even edited the code page for this script since 2014. The script has been working well for me since the beginning of January 2016. Did you check the examples on the page? -- Cube-shaped garbage can 06:49, August 1, 2020 (UTC)
Yes, I checked the examples on the page and read the instructions, but the template did not work as intended when I imported it onto my wiki. It keeps displaying <MP> instead of the YouTube video. Is there anything I can do to fix this issue? —Vozhan [talkcontribs] 2:57, August 02, 2020 (UTC)
What is your wiki? -- Cube-shaped garbage can 09:13, August 2, 2020 (UTC)
Phineas and Ferb Wiki. —Vozhan [talkcontribs] 16:44, August 02, 2020 (UTC)
Your YoutubePlayer template on that wiki is completely different from what's written on the documentation page. Please copy the one from the documentation page to your wiki. -- Cube-shaped garbage can 17:58, August 2, 2020 (UTC)
Uh, that's a completely different template that was created years ago by a different person. The one I'm trying to use is the YouTubePlayer template, which is the same as what's written on the documentation page. —Vozhan [talkcontribs] 19:51, August 02, 2020 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── You linked to the exact same template I linked to. Anyways, using the right template works on that wiki. <MP> is displayed only when the other template is used. -- Cube-shaped garbage can 19:56, August 2, 2020 (UTC)

Okay, thanks. —Vozhan [talkcontribs] 20:00, August 02, 2020 (UTC)

UCP Migration[]

After the migration to UCP the template stopped displaying at all on Polish Sonic Wiki. Which is weird, considering that the exact same version is working properly on another Wiki on UCP that I'm working on. Any ideas what might be the cause? Pan Maciu (talk) 00:56, October 27, 2020 (UTC)

You have errors in your wiki's JS and etc which is stopping things from below it from running. In your wiki's JS, mwCustomEditButtons doesn't exist, and in your ImportJS, DiscordModule doesn't work with UCP, which is causing everything below it in your ImportJS to not run (including YoutubePlayer), and also, SpoilerAlert is also throwing an error. --Sophie ♦ 01:09, October 27, 2020 (UTC)
Oh I get it. Thank you so much for help. Pan Maciu (talk) 09:55, October 27, 2020 (UTC)
np~ (also, I think DiscordModule might have fixed its issues, so you could try it again if you want) --Sophie ♦ 21:44, October 27, 2020 (UTC)

Recommended size[]

What's the recommended size (width, height) for videos displayed with this extension and in general on UCP Fandom? TheLOLxd2 talk 13:49, 19 February 2021 (UTC)

There is none that I'm aware of, other than using the one that looks the best to you. -- Cube-shaped garbage can 22:23, 20 February 2021 (UTC)

Problem caused by FandomDesktop[]

When using the FandomDesktop, refreshing the page after changing the end of the URL (clicking the TOC link, etc.), the videos called by YoutubePlayer disappear.
It does not occur in Oasis. Is this a FandomDesktop issue? —Preceding unsigned comment added by KCMW (talkcontribs) . Please sign your posts with ~~~~!

Can you link to an example? -- Cube-shaped garbage can 11:50, 10 July 2021 (UTC)
*I'm sorry for not knowing how to use the talk section earlier.*
A new fact has been discovered, the bug occurs when double-byte characters are included at the end of the link. The example page is here.--KCMW 13:00, 10 July 2021 (UTC)
This looks like an issue caused by TableHash to me, and my change should have fixed it. Please check again when the TableHash revision is approved. -- Cube-shaped garbage can 13:17, 10 July 2021 (UTC)
Thank you for your support! --KCMW 13:42, 10 July 2021 (UTC)

"This video is unavailable." when using parameters list or playlist without passing a value.[]

Any video embedded without giving a playlist id in the template is giving a "This video is unavailable." error on YouTube, despite the video existing.

I messed with the embed url a bit and found out that removing or assigning values to the empty parameters list and playlist solves the problem, while the problem persists by using any of them without assigning a value.

I also checked the YouTube IFrame Player API but there are no recent changes about this in the Revision history.

D4rkWzd (talk) 00:52, 22 July 2021 (UTC)

Can you link to where you tried? -- Cube-shaped garbage can 06:36, 22 July 2021 (UTC)
I first identified it on Jpop Wiki, where it's used inside a module, but it can also be seen in the examples at YoutubePlayer documentation page. I reproduced the examples here, with the same output. D4rkWzd (talk) 12:59, 22 July 2021 (UTC)
This is now fixed. -- Cube-shaped garbage can 22:18, 22 July 2021 (UTC)
Advertisement