How to display youtube content for a particular playlist in web page or block

Vote:
 

I want to display the youtube content dynamically in the page.

#151554
Jul 28, 2016 14:07
Vote:
 

<iframe width="560" height="315" src="@Model.PropertyForYoutubePlaylistUrl" frameborder="0" allowfullscreen></iframe>

Go to youtube, select a playlist, then click on "Share", there you'll see some code (iframe), take the url and do whatever you want with it.

#151562
Jul 28, 2016 16:51
Vote:
 

My costumer would like to copy the share code from youtube and then paste it into the wysiwyg html editor (tinymce - XhtmlString property), but
the problem is that the tinymce removes the allowfullscreen attribute from the iframe tag.

Does anyone know how to allow allowfullscreen attribute in the iframe tag?

Here is the sample code:
<iframe width="560" height="315" src="https://www.youtube.com/embed/A_86zcpwlIk" frameborder="0" allowfullscreen></iframe>

#172398
Dec 01, 2016 21:35
Vote:
 

Hi!

I wrote a blog post on creating a featured videos block in Episerver, with code samples that work with YouTube Data API v3. You can check it out here:

http://blog.wsol.com/tutorial-time-build-an-episerver-featured-videos-block-using-youtube-data-api-v3

As for the stripping out of tags in the TinyMCE editor, you need to create a custom editor and use extended_valid_elements. Here is a quick snippet of how that would look:

[TinyMCEPlugin(AlwaysEnabled = true, EditorInitConfigurationOptions = "{ extended_valid_elements: 'allowfullscreen' }", PlugInName = "ExtendedValidElements", ServerSideOnly = true)]
public class TinyMceExtendedValidElements
{
}

You can read more about customising the TinyMCE editor here:
http://world.episerver.com/documentation/Items/Developers-Guide/Episerver-CMS/8/Editing/Customizing-the-TinyMCE-editor/

Hope this helps!

John

#172448
Edited, Dec 02, 2016 18:27
Vote:
 

There is also a YouTube content provider available on GitHub: https://github.com/episerver/YouTubeContentProvider

#172457
Dec 03, 2016 6:39
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.