rtvs-embed-podcast
rtvs-embed-podcast is a plugin for embed RTVS podcast player into iframe on any website with client private key.
installation
npm install @comsultia/rtvs-embed-podcast
usage
In your html add javascript build from node_modules/@comsultia/rtvs-embed-podcast/dist/bundle.js and choose the method you like the most.
1) method
<!DOCTYPE html>
<html>
<head>
<title>Podcast iframe RTVS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="robots" content="index,follow" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link href="./public/css/styles.css" media="all" rel="stylesheet" type="text/css" />
<script src="./node_modules/@comsultia/rtvs-embed-podcast/dist/bundle.js"></script>
</head>
<body>
<main>
<h1>
<a href="https://rtvs.sk" target="_blank">
<img src="./public/img/logo-rtvs.png" alt="rtvs" />
</a>Podcast iframe RTVS
</h1>
<!-- method 1) use by data attributes -->
<div data-podcast-id="1175" data-podcast-key="test-key" data-podcast-debug="true"></div>
<div data-podcast-id="1176" data-podcast-key="test-key"></div>
</main>
</body>
</html>
example available in 'node_modules/@comsultia/rtvs-embed-podcast/index.html'
attributes
data-podcast-debug: logs to browser console: true || false (1 || 0) (optional, false by default)
data-podcast-id: id of RTVS podcast (required)
data-podcast-key: client private key (required)
2) method
<!DOCTYPE html>
<html>
<head>
<title>Podcast iframe RTVS</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="robots" content="index,follow" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link href="./public/css/styles.css" media="all" rel="stylesheet" type="text/css" />
<script src="./node_modules/@comsultia/rtvs-embed-podcast/dist/bundle.js"></script>
</head>
<body>
<main>
<h1>
<a href="https://rtvs.sk" target="_blank">
<img src="./public/img/logo-rtvs.png" alt="rtvs" />
</a>Podcast iframe RTVS
</h1>
<!-- method 2) use as plugin (don't forget to init plugin) -->
<div id="iframe-1"></div>
</main>
<script>
// init podcast iframe plugin
podcastIframe.init({
debug: true, // true if development
elementId: 'iframe-1',
podcastId: 1175,
key: 'test-key'
});
</script>
</body>
</html>
example available in 'node_modules/@comsultia/rtvs-embed-podcast/index.html'
parameters
debug: logs to browser console: true || false (1 || 0) (optional, false by default)
elementId: id of element where iframe will be inserted (required)
podcastId: id of RTVS podcast (required)
key: client private key (required)
demo
available in 'node_modules/@comsultia/rtvs-embed-podcast/index.html'