implement 'cantPlay' config options
This commit is contained in:
parent
7660f171ee
commit
4841e2c0a8
4 changed files with 23 additions and 0 deletions
|
@ -12,6 +12,11 @@
|
|||
"annotations": {
|
||||
"showUsers": false
|
||||
},
|
||||
"cantPlay": {
|
||||
"icon": "NoCopyright",
|
||||
"link": "/rights",
|
||||
"text": "This part of this video is not available in<br/>your part of your country. Sorry for that."
|
||||
},
|
||||
/*
|
||||
Capabilities are per user level.
|
||||
They can either be general:
|
||||
|
|
|
@ -14,6 +14,8 @@ pandora.ui.editor = function(data) {
|
|||
annotationsSize: pandora.user.ui.annotationsSize,
|
||||
annotationsSort: pandora.user.ui.annotationsSort,
|
||||
censored: data.censored,
|
||||
censoredIcon: pandora.site.cantPlay.icon,
|
||||
censoredTooltip: pandora.site.cantPlay.text,
|
||||
clickLink: pandora.clickLink,
|
||||
cuts: data.cuts || [],
|
||||
duration: data.duration,
|
||||
|
@ -106,6 +108,9 @@ pandora.ui.editor = function(data) {
|
|||
annotationssort: function(data) {
|
||||
pandora.UI.set({annotationsSort: data.sort});
|
||||
},
|
||||
censored: function() {
|
||||
pandora.URL.push(pandora.site.cantPlay.link);
|
||||
},
|
||||
define: function(data) {
|
||||
var dialog = data.type + 'sDialog';
|
||||
pandora.$ui[dialog] && pandora.$ui[dialog].remove();
|
||||
|
|
|
@ -14,6 +14,8 @@ pandora.ui.player = function(data) {
|
|||
annotationsSize: pandora.user.ui.annotationsSize,
|
||||
annotationsSort: pandora.user.ui.annotationsSort,
|
||||
censored: data.censored,
|
||||
censoredIcon: pandora.site.cantPlay.icon,
|
||||
censoredTooltip: pandora.site.cantPlay.text,
|
||||
clickLink: pandora.clickLink,
|
||||
cuts: data.cuts || [],
|
||||
duration: data.duration,
|
||||
|
@ -61,6 +63,12 @@ pandora.ui.player = function(data) {
|
|||
annotationssort: function(data) {
|
||||
pandora.UI.set({annotationsSort: data.sort});
|
||||
},
|
||||
censored: function() {
|
||||
pandora.$ui.player.options('fullscreen') && pandora.$ui.player.options({
|
||||
fullscreen: false
|
||||
});
|
||||
pandora.URL.push(pandora.site.cantPlay.link);
|
||||
},
|
||||
downloadvideo: function(data) {
|
||||
document.location.href = '/' + pandora.user.ui.item + '/torrent/';
|
||||
},
|
||||
|
|
|
@ -14,6 +14,8 @@ pandora.ui.timeline = function(data) {
|
|||
annotationsSize: ui.annotationsSize,
|
||||
annotationsSort: ui.annotationsSort,
|
||||
censored: data.censored,
|
||||
censoredIcon: pandora.site.cantPlay.icon,
|
||||
censoredTooltip: pandora.site.cantPlay.text,
|
||||
clickLink: pandora.clickLink,
|
||||
cuts: data.cuts || [],
|
||||
duration: data.duration,
|
||||
|
@ -59,6 +61,9 @@ pandora.ui.timeline = function(data) {
|
|||
annotationssort: function(data) {
|
||||
pandora.UI.set({annotationsSort: data.sort});
|
||||
},
|
||||
censored: function() {
|
||||
pandora.URL.push(pandora.site.cantPlay.link);
|
||||
},
|
||||
follow: function(data) {
|
||||
pandora.UI.set('followPlayer', data.follow);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue