Skip to content

Commit

Permalink
feat: improve new plugin system by checking to make sure the social a…
Browse files Browse the repository at this point in the history
…nd email plugins only get loaded once
  • Loading branch information
bolt-bot committed Nov 27, 2018
1 parent 3e51afb commit f05966d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
4 changes: 3 additions & 1 deletion packages/components/bolt-video/plugins/email-plugin.js
@@ -1,3 +1,5 @@
export const emailPlugin = player => {
return player.emailSocialShare();
if (!player.activePlugins_.emailSocialShare) {
return player.emailSocialShare();
}
};
26 changes: 14 additions & 12 deletions packages/components/bolt-video/plugins/social-plugin.js
@@ -1,14 +1,16 @@
export const socialPlugin = player => {
return player.social({
url: '',
displayAfterVideo: true,
services: {
facebook: true,
google: true,
twitter: true,
linkedin: true,
pinterest: false,
tumblr: false,
},
});
if (!player.activePlugins_.social) {
return player.social({
url: '',
displayAfterVideo: true,
services: {
facebook: true,
google: true,
twitter: true,
linkedin: true,
pinterest: false,
tumblr: false,
},
});
}
};

0 comments on commit f05966d

Please sign in to comment.