Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve new plugin system by checking to make sure the social a…
…nd email plugins only get loaded once
- Loading branch information
Showing
2 changed files
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export const emailPlugin = player => { | ||
return player.emailSocialShare(); | ||
if (!player.activePlugins_.emailSocialShare) { | ||
return player.emailSocialShare(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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, | ||
}, | ||
}); | ||
} | ||
}; |