pageflow 12.0.0.rc6 → 12.0.0.rc7

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

@@ -1,6 +1,31 @@
1
1
  pageflow.VideoPlayer.cueSettingsMethods = function(player) {
2
- player.updateCueLineSettings = function(line, forceUpdate) {
3
- var value = line.split('.')[0];
2
+ /**
3
+ * Specify the display position of text tracks. This method can also
4
+ * be used to make VideoJS reposition the text tracks after the
5
+ * margins of the text track display have been changed (e.g. to
6
+ * translate text tracks when player controls are displayed).
7
+ *
8
+ * To force such an update, the passed string has to differ from the
9
+ * previously passed string. You can append a dot and an arbitrary
10
+ * string (e.g. `"auto.translated"`), to keep the current setting but
11
+ * still force repositioning.
12
+ *
13
+ * On the other hand, it is possible to change the positioning but
14
+ * have VideoJS apply the change only when the next cue is
15
+ * displayed. This way we can prevent moving a cue that the user
16
+ * might just be reading. Simply append the string `".lazy"`
17
+ * (e.g. `"auto.lazy"`).
18
+ *
19
+ * @param {string} line
20
+ * Either `"top"` to move text tracks to the first line or
21
+ * `"auto"` to stick with automatic positioning, followed by a tag
22
+ * to either force or prevent immediate update.
23
+ */
24
+ player.updateCueLineSettings = function(line) {
25
+ var components = line.split('.');
26
+ var value = components[0];
27
+ var command = components[1];
28
+
4
29
  value = value == 'top' ? 1 : value;
5
30
 
6
31
  var changed = false;
@@ -24,7 +49,7 @@ pageflow.VideoPlayer.cueSettingsMethods = function(player) {
24
49
  // track changed since the last call, i.e. `line` has been changed
25
50
  // for a cue even though the previous call had the same
26
51
  // parameters.
27
- if (this.prevLine !== line || changed) {
52
+ if ((this.prevLine !== line || changed) && (command != 'lazy')) {
28
53
  player.tech({IWillNotUseThisInPlugins: true}).trigger('texttrackchange');
29
54
  }
30
55
 
@@ -42,8 +42,7 @@ $classic-player-controls-typography: $player-controls-typography !default;
42
42
  }
43
43
 
44
44
  &-paused,
45
- &-unplayed,
46
- &-has_been_faded {
45
+ &-unplayed {
47
46
  // Unused, but have to be defined for @extend to work
48
47
  display: block;
49
48
  }
@@ -220,7 +220,7 @@ $classic-player-controls-timestamp-position: "left" !default;
220
220
  }
221
221
  }
222
222
 
223
- &-page_with_progress_bar {
223
+ &-page-with_progress_bar {
224
224
  %player_controls-control_bar_text {
225
225
  display: none;
226
226
  }
@@ -2,4 +2,8 @@
2
2
  &-menu_bar {
3
3
  right: 10px;
4
4
  }
5
+
6
+ &-toggle_info_box_menu_button {
7
+ display: none;
8
+ }
5
9
  }
@@ -109,11 +109,10 @@ $slim-player-controls-info-box-header-typography: () !default;
109
109
  }
110
110
 
111
111
  @include desktop {
112
- .js &-container-has_been_faded %player_controls-info_box {
112
+ .js &-info_box-hidden_during_playback {
113
113
  @include faded;
114
114
  }
115
115
 
116
- .js &-container:hover %player_controls-info_box,
117
116
  .js &-container-paused %player_controls-info_box {
118
117
  @include transition-delay(0);
119
118
  @include visible;
@@ -11,3 +11,13 @@
11
11
  right: 20px;
12
12
  }
13
13
  }
14
+
15
+ %player_controls-page-audio .player_controls-toggle_info_box_menu_button {
16
+ display: none;
17
+ }
18
+
19
+ @include phone {
20
+ .player_controls-toggle_info_box_menu_button {
21
+ display: none;
22
+ }
23
+ }
@@ -1,7 +1,8 @@
1
1
  // Map placeholder names to concrete vjs css class names.
2
2
 
3
3
  $vjs-selector-mapping: (
4
- page_with_progress_bar: ".audioPage, .videoPage",
4
+ page-with_progress_bar: ".audioPage, .videoPage",
5
+ page-audio: ".audioPage",
5
6
 
6
7
  background: ".page_background-for_page_with_player_controls",
7
8
 
@@ -30,23 +31,13 @@ $vjs-selector-mapping: (
30
31
  container-hover: ".is_control_bar_hovered .controls",
31
32
  container-focused: ".is_control_bar_focused .controls",
32
33
 
33
- // `has_been_faded` is set by the video page type after the user has
34
- // become inactive for the first time during video playback.
35
- //
36
- // This is used in the slim player controls to keep displaying the
37
- // info box a little longer on initial playback. Especially on auto
38
- // play pages this lets the user finish reading the info box
39
- // text. When the user re-displays the info box though by moving the
40
- // cursor above the control bar, it fades immediately once the
41
- // cursor leaves the control bar again.
42
- container-has_been_faded: ".controls.has_been_faded",
43
-
44
34
  container-video: ".videoPage .controls",
45
35
  container-fading: ".videoPage .controls",
46
36
 
47
37
  container-unplayed: ".unplayed .controls",
48
38
 
49
39
  info_box: ".add_info_box",
40
+ info_box-hidden_during_playback: ".add_info_box-hidden_during_playback",
50
41
  control_bar: ".vjs-control-bar",
51
42
  control_bar_text: ".control_bar_text",
52
43
 
@@ -1,3 +1,3 @@
1
1
  module Pageflow
2
- VERSION = '12.0.0.rc6'.freeze
2
+ VERSION = '12.0.0.rc7'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.0.0.rc6
4
+ version: 12.0.0.rc7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
@@ -546,14 +546,14 @@ dependencies:
546
546
  requirements:
547
547
  - - "~>"
548
548
  - !ruby/object:Gem::Version
549
- version: '1.9'
549
+ version: '1.11'
550
550
  type: :runtime
551
551
  prerelease: false
552
552
  version_requirements: !ruby/object:Gem::Requirement
553
553
  requirements:
554
554
  - - "~>"
555
555
  - !ruby/object:Gem::Version
556
- version: '1.9'
556
+ version: '1.11'
557
557
  - !ruby/object:Gem::Dependency
558
558
  name: bcrypt
559
559
  requirement: !ruby/object:Gem::Requirement