diff --git a/dashboard-ui/apiclient/alt/events.js b/dashboard-ui/apiclient/alt/events.js
index 7022886df1..401879681b 100644
--- a/dashboard-ui/apiclient/alt/events.js
+++ b/dashboard-ui/apiclient/alt/events.js
@@ -4,20 +4,16 @@
on: function (obj, eventName, selector, fn) {
- Logger.log('event.on ' + eventName);
bean.on(obj, eventName, selector, fn);
},
off: function (obj, eventName, selector, fn) {
- Logger.log('event.off ' + eventName);
bean.off(obj, eventName, selector);
},
trigger: function (obj, eventName, params) {
- Logger.log('event.trigger ' + eventName);
-
// Need to push an extra param to make the argument order consistent with jquery
var newParams = [];
newParams.push({});
diff --git a/dashboard-ui/apiclient/events.js b/dashboard-ui/apiclient/events.js
index a95ba74f3a..06b85f58d2 100644
--- a/dashboard-ui/apiclient/events.js
+++ b/dashboard-ui/apiclient/events.js
@@ -13,7 +13,6 @@
},
trigger: function (obj, eventName, params) {
- Logger.log('event.trigger ' + eventName);
jQuery(obj).trigger(eventName, params);
}
};
diff --git a/dashboard-ui/bower_components/doc-ready/.bower.json b/dashboard-ui/bower_components/doc-ready/.bower.json
index d4d75eca65..adda4287b4 100644
--- a/dashboard-ui/bower_components/doc-ready/.bower.json
+++ b/dashboard-ui/bower_components/doc-ready/.bower.json
@@ -39,6 +39,6 @@
"commit": "cec8e49744a1e18b14a711eea77e201bb70de544"
},
"_source": "git://github.com/desandro/doc-ready.git",
- "_target": "~1.0.4",
+ "_target": "1.0.x",
"_originalSource": "doc-ready"
}
\ No newline at end of file
diff --git a/dashboard-ui/bower_components/paper-ripple/.bower.json b/dashboard-ui/bower_components/paper-ripple/.bower.json
index fc500c12fb..9a26a4dc8c 100644
--- a/dashboard-ui/bower_components/paper-ripple/.bower.json
+++ b/dashboard-ui/bower_components/paper-ripple/.bower.json
@@ -31,14 +31,14 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
},
- "homepage": "https://github.com/PolymerElements/paper-ripple",
+ "homepage": "https://github.com/polymerelements/paper-ripple",
"_release": "1.0.4",
"_resolution": {
"type": "version",
"tag": "v1.0.4",
"commit": "5f5893ca7bd6a8413d2f777c092a1a179b6bd45e"
},
- "_source": "git://github.com/PolymerElements/paper-ripple.git",
+ "_source": "git://github.com/polymerelements/paper-ripple.git",
"_target": "^1.0.0",
- "_originalSource": "PolymerElements/paper-ripple"
+ "_originalSource": "polymerelements/paper-ripple"
}
\ No newline at end of file
diff --git a/dashboard-ui/cordova/android/vlcplayer.js b/dashboard-ui/cordova/android/vlcplayer.js
index 6ec5afb6ba..3d38143392 100644
--- a/dashboard-ui/cordova/android/vlcplayer.js
+++ b/dashboard-ui/cordova/android/vlcplayer.js
@@ -169,6 +169,8 @@
var deviceProfile = MediaPlayer.getDeviceProfile();
+ var timeLimitMs = MediaController.playbackTimeLimitMs || 0;
+
AndroidVlcPlayer.playVideoVlc(val,
startPosMs,
item.Name,
@@ -184,7 +186,8 @@
ApiClient.getCurrentUserId(),
ApiClient.accessToken(),
JSON.stringify(deviceProfile),
- JSON.stringify(videoQualityOptions));
+ JSON.stringify(videoQualityOptions),
+ timeLimitMs);
playerState.currentSrc = val;
self.report('playing', null, startPosMs, false, 100);
diff --git a/dashboard-ui/cordova/imagestore.js b/dashboard-ui/cordova/imagestore.js
index 30c237d466..e20dc71339 100644
--- a/dashboard-ui/cordova/imagestore.js
+++ b/dashboard-ui/cordova/imagestore.js
@@ -90,13 +90,13 @@
}, function () {
- Logger.log('downloading: ' + originalUrl);
+ //Logger.log('downloading: ' + originalUrl);
var ft = new FileTransfer();
ft.download(originalUrl, path, function (entry) {
var localUrl = normalizeReturnUrl(entry.toURL());
- Logger.log(localUrl);
+ //Logger.log(localUrl);
deferred.resolveWith(null, [localUrl]);
});
});
diff --git a/dashboard-ui/cordova/ios/vlcplayer.js b/dashboard-ui/cordova/ios/vlcplayer.js
index fd99fca680..c2cc04a342 100644
--- a/dashboard-ui/cordova/ios/vlcplayer.js
+++ b/dashboard-ui/cordova/ios/vlcplayer.js
@@ -193,8 +193,6 @@
var duration = result.duration || 0;
var position = result.progress || 0;
- Logger.log('eventName: ' + eventName + '. position: ' + position);
-
var state = AudioRenderer.Current.playerState;
state.duration = duration;
@@ -202,12 +200,16 @@
state.paused = result.state == 3 || eventName == 'paused';
state.volume = 0;
+ if (eventName == 'positionchange') {
+ onTimeUpdate();
+ return;
+ }
+
+ Logger.log('eventName: ' + eventName + '. position: ' + position);
+
if (eventName == 'playbackstop') {
onEnded();
}
- else if (eventName == 'positionchange') {
- onTimeUpdate();
- }
else if (eventName == 'paused') {
onPause();
}
diff --git a/dashboard-ui/cordova/registrationservices.js b/dashboard-ui/cordova/registrationservices.js
index 711d7b4656..a427ea23aa 100644
--- a/dashboard-ui/cordova/registrationservices.js
+++ b/dashboard-ui/cordova/registrationservices.js
@@ -31,8 +31,7 @@
return;
}
- // Get supporter status
- getRegistrationInfo(prefix + 'appunlock').done(function (registrationInfo) {
+ function onRegistrationInfoResponse(registrationInfo) {
if (registrationInfo.IsRegistered) {
deferred.resolve();
@@ -49,14 +48,18 @@
}
var dialogOptions = {
- title: Globalize.translate('HeaderUnlockApp')
+ title: Globalize.translate('HeaderUnlockApp'),
+ enablePlayMinute: feature == 'playback',
+ feature: feature
};
- showInAppPurchaseInfo(subscriptionOptions, unlockableProductInfo, registrationInfo, dialogOptions, deferred);
+ showInAppPurchaseInfo(subscriptionOptions, unlockableProductInfo, dialogOptions, deferred);
});
+ }
- }).fail(function () {
- deferred.reject();
+ // Get supporter status
+ getRegistrationInfo(prefix + 'appunlock').done(onRegistrationInfoResponse).fail(function () {
+ onRegistrationInfoResponse({});
});
});
}
@@ -144,13 +147,19 @@
html += '
';
}
+ if (dialogOptions.enablePlayMinute) {
+ html += '';
+ html += '' + Globalize.translate('ButtonPlayTwoMinutes') + '';
+ html += '
';
+ }
+
html += '';
html += '';
dlg.innerHTML = html;
document.body.appendChild(dlg);
- initInAppPurchaseElementEvents(dlg, deferred);
+ initInAppPurchaseElementEvents(dlg, dialogOptions.feature, deferred);
PaperDialogHelper.openWithHash(dlg, 'iap');
@@ -169,7 +178,7 @@
dlg.classList.add('inAppPurchaseOverlay');
}
- function initInAppPurchaseElementEvents(elem, deferred) {
+ function initInAppPurchaseElementEvents(elem, feature, deferred) {
isCancelled = true;
@@ -194,15 +203,31 @@
clearCurrentDisplayingInfo();
- if (isCancelled) {
- deferred.reject();
- }
+ var overlay = this;
- $(this).remove();
+ if (isCancelled) {
+
+ if (feature == 'playback') {
+ Dashboard.alert({
+ message: Globalize.translate('ThankYouForTryingEnjoyOneMinute'),
+ title: Globalize.translate('HeaderTryPlayback'),
+ callback: function () {
+ deferred.reject();
+ $(overlay).remove();
+ }
+ });
+ } else {
+ deferred.reject();
+ $(overlay).remove();
+ }
+
+ } else {
+ $(this).remove();
+ }
});
}
- function showInAppPurchaseInfo(subscriptionOptions, unlockableProductInfo, serverRegistrationInfo, dialogOptions, deferred) {
+ function showInAppPurchaseInfo(subscriptionOptions, unlockableProductInfo, dialogOptions, deferred) {
require(['components/paperdialoghelper'], function () {
@@ -262,9 +287,7 @@
return;
}
- // Get supporter status
- getRegistrationInfo('Sync').done(function (registrationInfo) {
-
+ function onRegistrationInfoResponse(registrationInfo) {
if (registrationInfo.IsRegistered) {
deferred.resolve();
return;
@@ -273,14 +296,17 @@
IapManager.getSubscriptionOptions().done(function (subscriptionOptions) {
var dialogOptions = {
- title: Globalize.translate('HeaderUnlockSync')
+ title: Globalize.translate('HeaderUnlockSync'),
+ feature: 'sync'
};
- showInAppPurchaseInfo(subscriptionOptions, null, registrationInfo, dialogOptions, deferred);
+ showInAppPurchaseInfo(subscriptionOptions, null, dialogOptions, deferred);
});
+ }
- }).fail(function () {
- deferred.reject();
+ // Get supporter status
+ getRegistrationInfo('Sync').done(onRegistrationInfoResponse).fail(function () {
+ onRegistrationInfoResponse({});
});
});
}
diff --git a/dashboard-ui/css/nowplayingbar.css b/dashboard-ui/css/nowplayingbar.css
index 2c84eef4db..cd9b569e0a 100644
--- a/dashboard-ui/css/nowplayingbar.css
+++ b/dashboard-ui/css/nowplayingbar.css
@@ -126,7 +126,7 @@
}
.nowPlayingBarPositionSlider #sliderBar {
- top: 0;
+ padding-top: 0;
}
.nowPlayingBarPositionSlider #sliderContainer {
@@ -167,6 +167,7 @@
.nowPlayingBarVolumeSlider {
margin-left: -1em;
+ margin-right: 2em;
}
.nowPlayingBarUserDataButtons {
diff --git a/dashboard-ui/scripts/mediacontroller.js b/dashboard-ui/scripts/mediacontroller.js
index 7860d526aa..3f282f0d0d 100644
--- a/dashboard-ui/scripts/mediacontroller.js
+++ b/dashboard-ui/scripts/mediacontroller.js
@@ -256,10 +256,6 @@
$(self).trigger('beforeplaybackstart', [state, this]);
}
- function onPlaybackStart(e, state) {
- $(self).trigger('playbackstart', [state, this]);
- }
-
function onPlaybackStop(e, state) {
$(self).trigger('playbackstop', [state, this]);
}
@@ -462,10 +458,39 @@
}
requirejs(["scripts/registrationservices"], function () {
- RegistrationServices.validateFeature('playback').done(fn);
+
+ self.playbackTimeLimitMs = null;
+
+ RegistrationServices.validateFeature('playback').done(fn).fail(function () {
+
+ self.playbackTimeLimitMs = lockedTimeLimitMs;
+ startAutoStopTimer();
+ fn();
+ });
});
}
+ var autoStopTimeout;
+ var lockedTimeLimitMs = 120000;
+ function startAutoStopTimer() {
+ stopAutoStopTimer();
+ autoStopTimeout = setTimeout(onAutoStopTimeout, lockedTimeLimitMs);
+ }
+
+ function onAutoStopTimeout() {
+ stopAutoStopTimer();
+ MediaController.stop();
+ }
+
+ function stopAutoStopTimer() {
+
+ var timeout = autoStopTimeout;
+ if (timeout) {
+ clearTimeout(timeout);
+ autoStopTimeout = null;
+ }
+ }
+
self.toggleDisplayMirroring = function () {
self.enableDisplayMirroring(!self.enableDisplayMirroring());
};
diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js
index fd31666b6d..add177513b 100644
--- a/dashboard-ui/scripts/mediaplayer-video.js
+++ b/dashboard-ui/scripts/mediaplayer-video.js
@@ -722,14 +722,14 @@
html += '';
- html += '';
+ html += '';
html += '--:--
';
html += '';
html += '';
- html += '';
+ html += '';
html += '';
html += '';
diff --git a/dashboard-ui/scripts/nowplayingbar.js b/dashboard-ui/scripts/nowplayingbar.js
index 4b4aaf4eb1..e789aaf173 100644
--- a/dashboard-ui/scripts/nowplayingbar.js
+++ b/dashboard-ui/scripts/nowplayingbar.js
@@ -52,7 +52,7 @@
html += '';
html += '';
- html += '';
+ html += '';
html += '';
diff --git a/dashboard-ui/strings/javascript/en-US.json b/dashboard-ui/strings/javascript/en-US.json
index 84095b5c23..64b9f99415 100644
--- a/dashboard-ui/strings/javascript/en-US.json
+++ b/dashboard-ui/strings/javascript/en-US.json
@@ -921,5 +921,8 @@
"HeaderFavoriteSongs": "Favorite Songs",
"HeaderConfirmPluginInstallation": "Confirm Plugin Installation",
"PleaseConfirmPluginInstallation": "Please click OK to confirm you've read the above and wish to proceed with the plugin installation.",
- "MessagePluginInstallDisclaimer": "Plugins built by Emby community members are a great way to enhance your Emby experience with additional features and benefits. Before installing, please be aware of the effects they may have on your Emby Server, such as longer library scans, additional background processing, and decreased system stability."
+ "MessagePluginInstallDisclaimer": "Plugins built by Emby community members are a great way to enhance your Emby experience with additional features and benefits. Before installing, please be aware of the effects they may have on your Emby Server, such as longer library scans, additional background processing, and decreased system stability.",
+ "ButtonPlayTwoMinutes": "Play two minutes",
+ "ThankYouForTryingEnjoyOneMinute": "Please enjoy one minute of playback. Thank you for trying Emby.",
+ "HeaderTryPlayback": "Try Playback"
}
\ No newline at end of file
diff --git a/dashboard-ui/strings/javascript/javascript.json b/dashboard-ui/strings/javascript/javascript.json
index 1f25ce7f31..d1c96c71eb 100644
--- a/dashboard-ui/strings/javascript/javascript.json
+++ b/dashboard-ui/strings/javascript/javascript.json
@@ -931,5 +931,8 @@
"HeaderFavoriteSongs": "Favorite Songs",
"HeaderConfirmPluginInstallation": "Confirm Plugin Installation",
"PleaseConfirmPluginInstallation": "Please click OK to confirm you've read the above and wish to proceed with the plugin installation.",
- "MessagePluginInstallDisclaimer": "Plugins built by Emby community members are a great way to enhance your Emby experience with additional features and benefits. Before installing, please be aware of the effects they may have on your Emby Server, such as longer library scans, additional background processing, and decreased system stability."
+ "MessagePluginInstallDisclaimer": "Plugins built by Emby community members are a great way to enhance your Emby experience with additional features and benefits. Before installing, please be aware of the effects they may have on your Emby Server, such as longer library scans, additional background processing, and decreased system stability.",
+ "ButtonPlayTwoMinutes": "Play two minutes",
+ "ThankYouForTryingEnjoyOneMinute": "Please enjoy two minutes of playback. Thank you for trying Emby.",
+ "HeaderTryPlayback": "Try Playback"
}
diff --git a/dashboard-ui/vulcanize-out.html b/dashboard-ui/vulcanize-out.html
index 305fd8a15f..c28c2fd19e 100644
--- a/dashboard-ui/vulcanize-out.html
+++ b/dashboard-ui/vulcanize-out.html
@@ -18796,7 +18796,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN