Radiant Media Player provides flexible and customisable options to present social sharing of video content to your audience. This includes in-player sharing on Facebook or Twitter and copying a link or shareable iframe player code. The sharing module is in the top right corner of the player. When interacted with this module will show an overlay holding the selected sharing options.
sharing: Boolean
Activate or not the sharing module. When open the sharing module offers
various options to share the current content.
Default: false
.
sharingUrl: String
Set the URL that should be shared through
sharingNetworks
and the link field when the sharing module is displayed. The
player uses the page URL as default but this can
be overwritten through this setting. Default: ''
.
sharingNetworks: Array
Set which social networks to display when sharing module is open. Supported
social networks are: Facebook, Twitter,
LinkedIn, Reddit & email. Example for all social networks:
['facebook', 'twitter', 'linkedin', 'reddit', 'email', 'whatsapp']
.
Default: ['facebook', 'twitter', 'email']
.
sharingCode: String
Set the player code to be provided (iframe) for embedding purposes within
the sharing module. It is up to you to generate and host the iframe player code as
described
here. Default: ''
which means the code field is hidden in the sharing module.
<script src="https://cdn.radiantmediatechs.com/rmp/9.15.16/js/rmp.min.js"></script> <div id="rmp"></div> <script> const src = { hls: 'https://your-hls-url.m3u8' }; // Player settings const settings = { licenseKey: 'your-license-key', src: src, width: 640, height: 360, contentMetadata: { poster: [ 'https://your-poster-url.jpg' ] }, // Our social sharing settings sharing: true, sharingUrl: 'https://www.radiantmediaplayer.com/docs/latest/social-sharing.html', sharingNetworks: ['facebook', 'twitter', 'linkedin'], sharingCode: '<iframe width="640" height="360" title="Demo video content" src="https://www.radiantmediaplayer.com/docs/latest/gist/iframe/iframe.html" style="border:none;" allowfullscreen allow="autoplay; fullscreen; picture-in-picture; xr-spatial-tracking; encrypted-media; clipboard-write"></iframe>' }; const rmp = new RadiantMP('rmp'); rmp.init(settings); </script>
You can find an example of player with the sharing module enabled on our home page.
getSharingUrl()
rmp.getSharingUrl();
Returns the current sharing URL. '' if not available.
getSharingCode()
rmp.getSharingCode();
Returns the current sharing code. '' if not available.
setSharingUrl(newSharingUrl)
rmp.setSharingUrl('https://www.your-domain.com/content.html');
Set the current sharing URL for player sharing module.
setSharingCode(newSharingCode)
rmp.setSharingCode('<iframe width="640" height="360" title="Video content" src="https://www.your-domain.com/iframe-content.html" style="border:none;" allowfullscreen allow="autoplay; fullscreen; picture-in-picture; xr-spatial-tracking; encrypted-media; clipboard-write"></iframe>');
Set the current sharing code for player sharing module.
Additionally, the following social-related resources should be noted:
©2015-2024 Radiant Media Player. All Rights Reserved.