The translation was generated automatically and may contain mistakes
The podcast episode
Add your favorite podcasts VKontakte to your site — visitors can listen to them without leaving the page. Widgets of different episodes can be added in unlimited quantities — this will allow you to create a whole collection.
Post on the site the best issues of their podcasts or the work of other authors — listeners will be able to go to their community, subscribe and find more interesting information.
Widget connection
To add a podcast episode widget to your VKontakte follow these steps:
Step 1. In the tag <head> On your website, add a link. openapi.js :
<script src="https://vk.com/js/api/openapi.js?169" type="text/javascript"></script>Step 2. Add an element to the body of the page <div> , which will display comments, give it a unique id, and add a widget initialization code to it. For example:
<div id="vk_podcast"></div>
<script type="text/javascript">
VK.Widgets.Podcast('vk_podcast', '-147415323_456242257', '87e3ea29cfd350c30e');
</script>The above code adds a default widget. The width of the block will be selected automatically, based on the size and position of the element with id="vk_podcast" .
If your website is already in use Open API , adding a widget is even easier. Simply add widget initialization.
Additional settings
Method VK.Widgets.Podcast It has three mandatory parameters:
- •
element_id(string), the required parameter is the id of the element that will be the container for the block with the widget. Our default constructor uses a valuevk_podcast. - •
episode_id(string), the required parameter is the podcast episode ID. - •
hash(string), a mandatory parameter is a service parameter. GethashYou can only use the widget constructor.
Example of use
<script type="text/javascript" src="//vk.com/js/api/openapi.js?169"></script>
<span class="wk_comment"> VK Widget </span>
<div id="vk_podcast"></div>
<script type="text/javascript">
VK.Widgets.Podcast('vk_podcast', '-147415323_456242257', '87e3ea29cfd350c30e');
</script>Код виджета
To add a widget to your site, simply copy the code to paste to the page you want to place the widget on.