@mindedge/vuetify-player 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div>
3
3
  <v-row>
4
- <v-col :cols="!playlistmenu || playlist.length <= 1 ? 12 : 8">
4
+ <v-col :cols="playerCols">
5
5
  <YoutubePlayer
6
6
  ref="youtubePlayer"
7
7
  v-if="parseSourceType(current.src.sources) === 'youtube'"
@@ -40,11 +40,16 @@
40
40
  @click:fullscreen="onFullscreen"
41
41
  @click:pictureinpicture="onPictureInPicture"
42
42
  @click:remoteplayback="onRemoteplayback"
43
+ @click:captions-expand="onClickCaptionsExpand"
44
+ @click:captions-paragraph="onClickCaptionsParagraph"
43
45
  ></Html5Player>
44
46
  </v-col>
45
47
 
46
48
  <!-- Playlist stuff -->
47
- <v-col v-if="playlistmenu && playlist.length > 1" cols="4">
49
+ <v-col
50
+ v-if="playlistmenu && playlist.length > 1"
51
+ :cols="playlistCols"
52
+ >
48
53
  <PlaylistMenu
49
54
  v-model="sourceIndex"
50
55
  :language="language"
@@ -173,10 +178,41 @@ export default {
173
178
 
174
179
  return attrs
175
180
  },
181
+ playlistCols() {
182
+ // Captions collapsed, playlist will appear on the right
183
+ if (
184
+ !this.captionsExpanded &&
185
+ this.playlistmenu &&
186
+ this.playlist.length > 1
187
+ ) {
188
+ return 4
189
+ } else if (
190
+ this.captionsExpanded &&
191
+ this.playlistmenu &&
192
+ this.playlist.length > 1
193
+ ) {
194
+ // Captions expanded, playlist will appear as a new row on the bottom of everything
195
+ return 12
196
+ } else {
197
+ return 0
198
+ }
199
+ },
200
+ playerCols() {
201
+ if (
202
+ this.captionsExpanded ||
203
+ !this.playlistmenu ||
204
+ this.playlist.length <= 1
205
+ ) {
206
+ return 12
207
+ } else {
208
+ return 8
209
+ }
210
+ },
176
211
  },
177
212
  data() {
178
213
  return {
179
214
  sourceIndex: 0,
215
+ captionsExpanded: false,
180
216
  }
181
217
  },
182
218
  methods: {
@@ -236,6 +272,13 @@ export default {
236
272
  this.$emit('click:fullscreen', false)
237
273
  }
238
274
  },
275
+ onClickCaptionsExpand(expanded) {
276
+ this.captionsExpanded = expanded
277
+ this.$emit('click:captions-expand', expanded)
278
+ },
279
+ onClickCaptionsParagraph(isParagraph) {
280
+ this.$emit('click:captions-paragraph', isParagraph)
281
+ },
239
282
  onPlaylistSelect(index) {
240
283
  this.sourceIndex = parseInt(index)
241
284
  this.player.load()
package/src/i18n/en-US.js CHANGED
@@ -25,4 +25,10 @@ export default {
25
25
  pause: 'Click to pause',
26
26
  no_support: "Sorry, your browser doesn't support embedded videos.",
27
27
  },
28
+ captions: {
29
+ expand: 'Expand',
30
+ collapse: 'Collapse',
31
+ view_as_paragraph: 'View as paragraph',
32
+ view_as_captions: 'View as captions',
33
+ },
28
34
  }
@@ -0,0 +1,34 @@
1
+ export default {
2
+ locales: {
3
+ 'en-US': 'inglés',
4
+ 'sv-SE': 'sueco',
5
+ },
6
+ playlist: {
7
+ up_next: 'A continuación',
8
+ default_name: 'Medios',
9
+ previous: 'Reproducir elemento anterior en la lista de reproducción',
10
+ next: 'Reproducir el siguiente elemento en la lista de reproducción',
11
+ },
12
+ player: {
13
+ playback_speed: 'Velocidad de reproducción',
14
+ playback_decrease: 'Disminuir la velocidad de reproducción',
15
+ playback_increase: 'Aumentar la velocidad de reproducción',
16
+ toggle_settings: 'Alternar configuración',
17
+ download: 'Descargar',
18
+ toggle_remote_playback: 'Alternar reproducción remota',
19
+ toggle_picture_in_picture: 'Alternar Imagen en imagen',
20
+ toggle_fullscreen: 'Alternar pantalla completa',
21
+ toggle_cc: 'Alternar subtítulos',
22
+ volume_slider: 'Control deslizante de volumen',
23
+ rewind_10: 'Rebobinar 10 segundos',
24
+ play: 'Haz clic para reproducir',
25
+ pause: 'Haga clic para pausar',
26
+ no_support: 'Lo sentimos, su navegador no admite vídeos incrustados. ',
27
+ },
28
+ captions: {
29
+ expand: 'Expandir',
30
+ collapse: 'Colapsar',
31
+ view_as_paragraph: 'Ver como párrafo',
32
+ view_as_captions: 'Ver como subtítulos',
33
+ },
34
+ }
package/src/i18n/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import enUS from './en-US'
2
+ import esES from './es-ES'
2
3
  import svSE from './sv-SE'
3
4
 
4
5
  export default {
5
6
  'en-US': enUS,
6
7
  'sv-SE': svSE,
8
+ 'es-ES': esES,
7
9
  }
package/src/i18n/sv-SE.js CHANGED
@@ -25,4 +25,10 @@ export default {
25
25
  pause: 'Klicka för att pausa',
26
26
  no_support: 'Tyvärr, din webbläsare stöder inte inbäddade videor.',
27
27
  },
28
+ captions: {
29
+ expand: 'Bygga ut',
30
+ collapse: 'Kollaps',
31
+ view_as_paragraph: 'Visa som stycke',
32
+ view_as_captions: 'Visa som bildtexter',
33
+ },
28
34
  }