From 3c567fe9ebd6320aea5a493aade19113fd96bf36 Mon Sep 17 00:00:00 2001 From: samcm Date: Fri, 16 Jun 2017 01:58:03 +1000 Subject: [PATCH] Fixed PTPlayer + start to 1.2 release --- package.json | 2 + src/App.vue | 14 +- src/assets/css/styleNew.css | 322 +++++++++++++++++- src/assets/js/plex/PlexTv.js | 12 +- src/components/Navbar.vue | 2 +- src/components/application.vue | 28 +- src/components/application/joinroom.vue | 19 +- src/components/application/plexbrowser.vue | 4 +- .../application/plexbrowser/plexcontent.vue | 13 +- src/components/application/plexclient.vue | 2 +- src/components/application/ptplayer.vue | 7 +- .../application/ptplayer/videoplayer.vue | 1 - src/components/application/walkthrough.vue | 61 ++-- src/components/home.vue | 24 +- src/components/signin.vue | 98 +++--- src/components/signout.vue | 12 +- src/main.js | 9 +- src/sidebar.vue | 142 ++++---- 18 files changed, 565 insertions(+), 207 deletions(-) diff --git a/package.json b/package.json index 238752f8..e6d58baf 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,10 @@ "stylus-loader": "^3.0.1", "sweet-modal-vue": "^1.1.0", "url-loader": "^0.5.8", + "vue-clipboards": "^1.0.2", "vue-loader": "^11.3.4", "vue-observe-visibility": "^0.1.3", + "vue-resource": "^1.3.4", "vue-style-loader": "^2.0.5", "vue-template-compiler": "^2.2.6", "vue-video-player": "^3.1.1", diff --git a/src/App.vue b/src/App.vue index 4298c169..3c67cbd4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,13 +20,13 @@ - - + + - {{ item.icon }} + - - {{ item.title }} + + @@ -39,7 +39,7 @@ - + more_vert @@ -59,7 +59,7 @@
- +
diff --git a/src/assets/css/styleNew.css b/src/assets/css/styleNew.css index 0a938d99..796ba0f1 100644 --- a/src/assets/css/styleNew.css +++ b/src/assets/css/styleNew.css @@ -6,6 +6,9 @@ text-overflow: ellipsis; } +.center-text { + text-align: center; +} /* Headers */ @@ -48,7 +51,12 @@ html { } main { - background: #272c38; + /*background: #272c38;*/ + background: #2b5876; /* fallback for old browsers */ + background: -webkit-linear-gradient(to top, #182848, #2b5876); /* Chrome 10-25, Safari 5.1-6 */ + background: linear-gradient(to bottom, #1F1C2C, #182848); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ + + } .navigation-drawer { @@ -66,6 +74,9 @@ main { span { color: #fff; } +.menu__content { + margin-top:35px !important; +} .stepper { background: #323948; @@ -186,4 +197,313 @@ span { height:40vw; border:1px solid; font-size:10vw; +} + + +/* PTPlayer */ + +.ptplayer .video-js .vjs-menu-button-inline.vjs-slider-active, .video-js .vjs-menu-button-inline:focus, .video-js .vjs-menu-button-inline:hover, .video-js.vjs-no-flex .vjs-menu-button-inline { + width: 10em +} + +.vjs-volume-bar { + width: 100% !important; +} + +.ptplayer .video-js .vjs-controls-disabled .vjs-big-play-button { + display: none !important; +} + +.ptplayer .video-js .vjs-control { + width: 5em +} + +.ptplayer .video-js .vjs-volume-control { + width: 10em; +} + +.ptplayer .video-js .vjs-menu-button-inline:before { + width: 1.5em +} + +.vjs-menu-button-inline .vjs-menu { + left: 3em +} + +.ptplayer .vjs-paused.vjs-has-started.video-js .vjs-big-play-button, .video-js.vjs-ended .vjs-big-play-button, .video-js.vjs-paused .vjs-big-play-button { + display: block +} + +.ptplayer .video-js .vjs-load-progress div, .vjs-seeking .vjs-big-play-button, .vjs-waiting .vjs-big-play-button { + display: none !important; +} + +.ptplayer .video-js .vjs-mouse-display:after, .video-js .vjs-play-progress:after { + padding: 0 .4em .3em +} + +.ptplayer .video-js.vjs-ended .vjs-loading-spinner { + display: none; +} + +.ptplayer .video-js.vjs-ended .vjs-big-play-button { + display: block !important; +} + +.ptplayer .video-js *, .video-js:after, .video-js:before { + box-sizing: inherit; + font-size: inherit; + color: inherit; + line-height: 3em +} + +.ptplayer .video-js.vjs-fullscreen, .video-js.vjs-fullscreen .vjs-tech { + width: 100% !important; + height: 100% !important; +} + +.ptplayer .video-js { + font-size: 14px; + overflow: hidden +} + +.ptplayer .video-js .vjs-control { + color: inherit +} + +.ptplayer .video-js .vjs-menu-button-inline:hover, .video-js.vjs-no-flex .vjs-menu-button-inline { + width: 8.35em +} + +.ptplayer .video-js .vjs-volume-menu-button.vjs-volume-menu-button-horizontal:hover .vjs-menu .vjs-menu-content { + height: 2em; + width: 6.35em +} + +.ptplayer .video-js .vjs-control:focus:before, .video-js .vjs-control:hover:before { + text-shadow: 0 0 1em #fff, 0 0 1em #fff, 0 0 1em #fff +} + +.ptplayer .video-js .vjs-spacer, .video-js .vjs-time-control { + display: -webkit-box; + display: -moz-box; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-box-flex: 1 1 auto; + -moz-box-flex: 1 1 auto; + -webkit-flex: 1 1 auto; + -ms-flex: 1 1 auto; + flex: 1 1 auto +} + +.ptplayer .video-js .vjs-time-control { + -webkit-box-flex: 0 1 auto; + -moz-box-flex: 0 1 auto; + -webkit-flex: 0 1 auto; + -ms-flex: 0 1 auto; + flex: 0 1 auto; + width: auto +} + +.ptplayer .video-js .vjs-time-control.vjs-time-divider { + width: 14px +} + +.ptplayer .video-js .vjs-time-control.vjs-time-divider div { + width: 100%; + text-align: center +} + +.ptplayer .video-js .vjs-time-control.vjs-current-time { + margin-left: 1em +} + +.ptplayer .video-js .vjs-time-control .vjs-current-time-display, .video-js .vjs-time-control .vjs-duration-display { + width: 100% +} + +.ptplayer .video-js .vjs-time-control .vjs-current-time-display { + text-align: right +} + +.ptplayer .video-js .vjs-time-control .vjs-duration-display { + text-align: left +} + +.ptplayer .video-js .vjs-play-progress:before, .video-js .vjs-progress-control .vjs-play-progress:before, .video-js .vjs-remaining-time, .video-js .vjs-volume-level:after, .video-js .vjs-volume-level:before, .video-js.vjs-live .vjs-time-control.vjs-current-time, .video-js.vjs-live .vjs-time-control.vjs-duration, .video-js.vjs-live .vjs-time-control.vjs-time-divider, .video-js.vjs-no-flex .vjs-time-control.vjs-remaining-time { + display: none +} + +.ptplayer .video-js.vjs-no-flex .vjs-time-control { + display: table-cell; + width: 4em +} + +.ptplayer .video-js .vjs-progress-control { + position: absolute; + left: 0; + right: 0; + width: 100%; + height: .5em; + top: -.5em +} + +.ptplayer .video-js .vjs-progress-control .vjs-load-progress, .video-js .vjs-progress-control .vjs-play-progress, .video-js .vjs-progress-control .vjs-progress-holder { + height: 100% +} + +.ptplayer .video-js .vjs-progress-control .vjs-progress-holder { + margin: 0 +} + +.ptplayer .video-js .vjs-progress-control:hover { + height: 1.5em; + top: -1.5em +} + +.ptplayer .video-js .vjs-control-bar { + -webkit-transition: -webkit-transform .1s ease 0s; + -moz-transition: -moz-transform .1s ease 0s; + -ms-transition: -ms-transform .1s ease 0s; + -o-transition: -o-transform .1s ease 0s; + transition: transform .1s ease 0s +} + +.ptplayer .video-js.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-control-bar, .video-js.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-control-bar, .video-js.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-control-bar, .video-js.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar, .video-js.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-control-bar { + visibility: visible; + opacity: 1; + -webkit-backface-visibility: hidden; + -webkit-transform: translateY(3em); + -moz-transform: translateY(3em); + -ms-transform: translateY(3em); + -o-transform: translateY(3em); + transform: translateY(3em); + -webkit-transition: -webkit-transform 1s ease 0s; + -moz-transition: -moz-transform 1s ease 0s; + -ms-transition: -ms-transform 1s ease 0s; + -o-transition: -o-transform 1s ease 0s; + transition: transform 1s ease 0s +} + +.ptplayer .video-js.not-hover.vjs-has-started.vjs-paused.vjs-user-active .vjs-progress-control, .video-js.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive .vjs-progress-control, .video-js.not-hover.vjs-has-started.vjs-playing.vjs-user-active .vjs-progress-control, .video-js.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-progress-control, .video-js.vjs-has-started.vjs-playing.vjs-user-inactive .vjs-progress-control { + height: .25em; + top: -.25em; + pointer-events: none; + -webkit-transition: height 1s, top 1s; + -moz-transition: height 1s, top 1s; + -ms-transition: height 1s, top 1s; + -o-transition: height 1s, top 1s; + transition: height 1s, top 1s +} + +.ptplayer .video-js.not-hover.vjs-has-started.vjs-paused.vjs-user-active.vjs-fullscreen .vjs-progress-control, .video-js.not-hover.vjs-has-started.vjs-paused.vjs-user-inactive.vjs-fullscreen .vjs-progress-control, .video-js.not-hover.vjs-has-started.vjs-playing.vjs-user-active.vjs-fullscreen .vjs-progress-control, .video-js.not-hover.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control, .video-js.vjs-has-started.vjs-playing.vjs-user-inactive.vjs-fullscreen .vjs-progress-control { + opacity: 0; + -webkit-transition: opacity 1s ease 1s; + -moz-transition: opacity 1s ease 1s; + -ms-transition: opacity 1s ease 1s; + -o-transition: opacity 1s ease 1s; + transition: opacity 1s ease 1s; + right: 0; + position: absolute + +} + +.ptplayer .video-js.vjs-live .vjs-live-control { + margin-left: 100% +} + +.ptplayer .video-js .vjs-big-play-button { + top: 50%; + left: 50%; + margin-left: -1em; + margin-top: -1em; + width: 2em; + height: 2em; + line-height: 2em; + border: none; + border-radius: 50%; + font-size: 3.5em; + background-color: rgba(0, 0, 0, .45); + color: #fff; + -webkit-transition: border-color .4s, outline .4s, background-color .4s; + -moz-transition: border-color .4s, outline .4s, background-color .4s; + -ms-transition: border-color .4s, outline .4s, background-color .4s; + -o-transition: border-color .4s, outline .4s, background-color .4s; + transition: border-color .4s, outline .4s, background-color .4s +} + +.ptplayer .video-js .vjs-menu-button-popup .vjs-menu { + left: -3em +} + +.ptplayer .video-js .vjs-menu-button-popup .vjs-menu .vjs-menu-content { + background-color: transparent; + width: 12em; + left: -1.5em; + padding-bottom: .5em +} + +.ptplayer .video-js .vjs-menu-button-popup .vjs-menu .vjs-menu-item, .video-js .vjs-menu-button-popup .vjs-menu .vjs-menu-title { + background-color: #151b17; + margin: .3em 0; + padding: .5em; + border-radius: .3em +} + +.ptplayer .video-js .vjs-menu-button-popup .vjs-menu .vjs-menu-item.vjs-selected { + background-color: #E5A00D +} + +.ptplayer .video-js .vjs-big-play-button { + background-color: rgba(0, 0, 0, 0); + font-size: 8em; + border-radius: 0%; + height: 1em !important; + line-height: 1em !important; + margin-top: -0.5em !important +} + +.ptplayer .video-js:hover .vjs-big-play-button, .video-js .vjs-big-play-button:focus, .video-js .vjs-big-play-button:active { + background-color: transparent +} + +.ptplayer .video-js .vjs-loading-spinner { + border-color: #e5a00d +} + +.ptplayer .video-js .vjs-control-bar2 { + background-color: #000000 +} + +.ptplayer .video-js .vjs-control-bar { + background-color: rgba(0, 0, 0, 1) !important; + color: #ffffff; + font-size: 12px +} + +.ptplayer .video-js .vjs-play-progress, .video-js .vjs-volume-level { + background-color: #e5a00d +} + +.ptplayer .video-js .vjs-load-progress { + background: rgba(115, 133, 159, 0.5); +} + +.ptplayer .video-js .vjs-big-play-button:hover { + color: #E5A00D; +} + +.ptplayer .video-js .vjs-control:focus:before, .video-js .vjs-control:hover:before { + color: #E5A00D; + text-shadow: none +} + +.vjs-volume-level { + background-color: #E5A00D !important; +} + +.vjs-fullscreen-control { + position: absolute !important; + right: 0px; } \ No newline at end of file diff --git a/src/assets/js/plex/PlexTv.js b/src/assets/js/plex/PlexTv.js index 0c5f1d2f..4c9e88d8 100644 --- a/src/assets/js/plex/PlexTv.js +++ b/src/assets/js/plex/PlexTv.js @@ -277,11 +277,13 @@ module.exports = function () { validServers++ } } - this.servers.forEach((server) => { - if (!blockedServers[server.clientIdentifier]){ - validServers++ - } - }) + if (blockedServers){ + this.servers.forEach((server) => { + if (!blockedServers[server.clientIdentifier]){ + validServers++ + } + }) + } if (validServers == 0){ return callback(false) } diff --git a/src/components/Navbar.vue b/src/components/Navbar.vue index c513a251..b250b8ae 100644 --- a/src/components/Navbar.vue +++ b/src/components/Navbar.vue @@ -11,7 +11,7 @@ - + {{ item.title }} diff --git a/src/components/application.vue b/src/components/application.vue index 94b36053..c8840b9c 100644 --- a/src/components/application.vue +++ b/src/components/application.vue @@ -3,17 +3,21 @@
-
- -
+ + +
+ +
+
+
- +
- - - + + +
@@ -43,6 +47,7 @@ import sidebar from './application/sidebar' import ptplayer from './application/ptplayer' import plexbrowser from './application/plexbrowser' + import plexcontent from './application/plexbrowser/plexcontent' import nowplaying from './application/nowplaying' export default { @@ -57,7 +62,8 @@ walkthrough, ptplayer, plexbrowser, - nowplaying + nowplaying, + plexcontent }, mounted: function () { if (window['localStorage'].getItem('plexuser') == null) { @@ -203,6 +209,12 @@ stateTESTING: function () { return this.$store }, + nowPlayingServer: function () { + if (!this.chosenClient.clientPlayingMetadata){ + return null + } + return this.plex.getServerById(this.chosenClient.clientPlayingMetadata.machineIdentifier) + } }, methods: { diff --git a/src/components/application/joinroom.vue b/src/components/application/joinroom.vue index 6d505408..4f0ddfd4 100644 --- a/src/components/application/joinroom.vue +++ b/src/components/application/joinroom.vue @@ -6,17 +6,20 @@ light :dark="false" v-bind:items="ptservers" - class="input-group--focused" + class="input-group--focused pt-input" + style="mt-4" v-model="selectedServer" + transition="v-scale-transition" origin="center center" + max-height="auto" label="Select a server" - item-value="value" + :append-icon="'arrow_drop_up'" > @@ -39,20 +42,22 @@ - + - +
{{server.name}}
diff --git a/src/components/application/plexbrowser/plexcontent.vue b/src/components/application/plexbrowser/plexcontent.vue index 02719319..015e9d68 100644 --- a/src/components/application/plexbrowser/plexcontent.vue +++ b/src/components/application/plexbrowser/plexcontent.vue @@ -1,6 +1,6 @@