vidply 1.0.2 → 1.0.4

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.
@@ -47,6 +47,11 @@ export class KeyboardManager {
47
47
  }
48
48
  }
49
49
  }
50
+
51
+ // Log unhandled keys for debugging (in development)
52
+ if (!handled && this.player.options.debug) {
53
+ console.log('[VidPly] Unhandled key:', e.key, 'code:', e.code, 'shiftKey:', e.shiftKey);
54
+ }
50
55
  }
51
56
 
52
57
  executeAction(action, event) {
@@ -71,14 +76,6 @@ export class KeyboardManager {
71
76
  this.player.seekBackward();
72
77
  return true;
73
78
 
74
- case 'seek-forward-large':
75
- this.player.seekForward(this.player.options.seekIntervalLarge);
76
- return true;
77
-
78
- case 'seek-backward-large':
79
- this.player.seekBackward(this.player.options.seekIntervalLarge);
80
- return true;
81
-
82
79
  case 'mute':
83
80
  this.player.toggleMute();
84
81
  return true;
@@ -91,15 +88,27 @@ export class KeyboardManager {
91
88
  // If only one caption track, toggle on/off
92
89
  // If multiple tracks, open caption menu
93
90
  if (this.player.captionManager && this.player.captionManager.tracks.length > 1) {
94
- const captionsButton = document.querySelector('.vidply-captions');
95
- if (captionsButton && this.player.controlBar) {
91
+ // Get captions button from control bar
92
+ const captionsButton = this.player.controlBar && this.player.controlBar.controls.captions;
93
+ if (captionsButton) {
96
94
  this.player.controlBar.showCaptionsMenu(captionsButton);
95
+ } else {
96
+ // Fallback to toggle if button doesn't exist
97
+ this.player.toggleCaptions();
97
98
  }
98
99
  } else {
99
100
  this.player.toggleCaptions();
100
101
  }
101
102
  return true;
102
103
 
104
+ case 'caption-style-menu':
105
+ // Open caption style menu
106
+ if (this.player.controlBar && this.player.controlBar.controls.captionStyle) {
107
+ this.player.controlBar.showCaptionStyleMenu(this.player.controlBar.controls.captionStyle);
108
+ return true;
109
+ }
110
+ return false;
111
+
103
112
  case 'speed-up':
104
113
  this.player.setPlaybackSpeed(
105
114
  Math.min(2, this.player.state.playbackSpeed + 0.25)
@@ -112,9 +121,37 @@ export class KeyboardManager {
112
121
  );
113
122
  return true;
114
123
 
115
- case 'settings':
116
- this.player.showSettings();
117
- return true;
124
+ case 'speed-menu':
125
+ // Open speed menu
126
+ if (this.player.controlBar && this.player.controlBar.controls.speed) {
127
+ this.player.controlBar.showSpeedMenu(this.player.controlBar.controls.speed);
128
+ return true;
129
+ }
130
+ return false;
131
+
132
+ case 'quality-menu':
133
+ // Open quality menu
134
+ if (this.player.controlBar && this.player.controlBar.controls.quality) {
135
+ this.player.controlBar.showQualityMenu(this.player.controlBar.controls.quality);
136
+ return true;
137
+ }
138
+ return false;
139
+
140
+ case 'chapters-menu':
141
+ // Open chapters menu
142
+ if (this.player.controlBar && this.player.controlBar.controls.chapters) {
143
+ this.player.controlBar.showChaptersMenu(this.player.controlBar.controls.chapters);
144
+ return true;
145
+ }
146
+ return false;
147
+
148
+ case 'transcript-toggle':
149
+ // Toggle transcript
150
+ if (this.player.transcriptManager) {
151
+ this.player.transcriptManager.toggleTranscript();
152
+ return true;
153
+ }
154
+ return false;
118
155
 
119
156
  default:
120
157
  return false;