unified-video-framework 1.4.254 → 1.4.255

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.
@@ -1550,9 +1550,44 @@ export class WebPlayer extends BasePlayer {
1550
1550
 
1551
1551
  this.debugLog('📊 Attempting to set YouTube quality to:', qualityLevel);
1552
1552
 
1553
- // Try to set the quality
1554
- this.youtubePlayer.setPlaybackQuality(qualityLevel);
1555
- this.debugLog('✅ setPlaybackQuality called for:', qualityLevel);
1553
+ // Multiple approaches to force YouTube quality change
1554
+ if (qualityLevel === 'auto') {
1555
+ // For auto, just use setPlaybackQuality
1556
+ this.youtubePlayer.setPlaybackQuality(qualityLevel);
1557
+ } else {
1558
+ // For specific qualities, try multiple methods
1559
+ try {
1560
+ // Method 1: Set quality range (most effective for forcing specific quality)
1561
+ if (typeof this.youtubePlayer.setPlaybackQualityRange === 'function') {
1562
+ this.youtubePlayer.setPlaybackQualityRange(qualityLevel, qualityLevel);
1563
+ this.debugLog('✅ setPlaybackQualityRange called for:', qualityLevel);
1564
+ }
1565
+ } catch (e) {
1566
+ this.debugWarn('setPlaybackQualityRange failed:', e);
1567
+ }
1568
+
1569
+ try {
1570
+ // Method 2: Standard quality setting
1571
+ this.youtubePlayer.setPlaybackQuality(qualityLevel);
1572
+ this.debugLog('✅ setPlaybackQuality called for:', qualityLevel);
1573
+ } catch (e) {
1574
+ this.debugWarn('setPlaybackQuality failed:', e);
1575
+ }
1576
+
1577
+ // Method 3: Force quality by pausing and resuming (more aggressive)
1578
+ try {
1579
+ const wasPlaying = this.youtubePlayer.getPlayerState() === window.YT.PlayerState.PLAYING;
1580
+ if (wasPlaying) {
1581
+ this.youtubePlayer.pauseVideo();
1582
+ setTimeout(() => {
1583
+ this.youtubePlayer.setPlaybackQuality(qualityLevel);
1584
+ this.youtubePlayer.playVideo();
1585
+ }, 100);
1586
+ }
1587
+ } catch (e) {
1588
+ this.debugWarn('Force quality change with pause/play failed:', e);
1589
+ }
1590
+ }
1556
1591
 
1557
1592
  // Verify quality was changed after a delay
1558
1593
  setTimeout(() => {
@@ -1562,12 +1597,13 @@ export class WebPlayer extends BasePlayer {
1562
1597
 
1563
1598
  this.debugLog('📊 Current quality after set:', currentQuality, '(', this.youtubeCurrentQuality?.label, ')');
1564
1599
 
1565
- // Show notification with result
1600
+ // Show notification with result - be more user-friendly
1566
1601
  if (currentQuality === qualityLevel) {
1567
- this.showNotification(`Quality changed to ${qualityMap[currentQuality]?.label || 'requested quality'}`);
1602
+ this.showNotification(`Quality: ${qualityMap[currentQuality]?.label || 'requested quality'}`);
1568
1603
  this.debugLog('✅ Quality successfully changed to:', qualityLevel);
1569
1604
  } else {
1570
- this.showNotification(`Quality set to ${qualityMap[currentQuality]?.label || currentQuality} (YouTube optimized)`);
1605
+ // Don't show "YouTube optimized" message to users - it's confusing
1606
+ this.showNotification(`Quality: ${qualityMap[currentQuality]?.label || currentQuality}`);
1571
1607
  this.debugLog('⚠️ Requested quality:', qualityLevel, '| Actual quality:', currentQuality, '(YouTube may have optimized)');
1572
1608
  }
1573
1609
 
@@ -4798,7 +4834,29 @@ export class WebPlayer extends BasePlayer {
4798
4834
  }
4799
4835
 
4800
4836
  .uvf-accordion-item.expanded .uvf-accordion-content {
4801
- max-height: 250px;
4837
+ max-height: 350px;
4838
+ overflow-y: auto;
4839
+ -webkit-overflow-scrolling: touch;
4840
+ }
4841
+
4842
+ /* Special handling for quality accordion with many options */
4843
+ .uvf-accordion-item.expanded .uvf-accordion-content[data-section="quality"] {
4844
+ max-height: 400px;
4845
+ }
4846
+
4847
+ /* Scrollbar styling for accordion content */
4848
+ .uvf-accordion-content::-webkit-scrollbar {
4849
+ width: 4px;
4850
+ }
4851
+ .uvf-accordion-content::-webkit-scrollbar-track {
4852
+ background: transparent;
4853
+ }
4854
+ .uvf-accordion-content::-webkit-scrollbar-thumb {
4855
+ background: rgba(255,255,255,0.3);
4856
+ border-radius: 2px;
4857
+ }
4858
+ .uvf-accordion-content::-webkit-scrollbar-thumb:hover {
4859
+ background: rgba(255,255,255,0.5);
4802
4860
  }
4803
4861
 
4804
4862
  /* Settings options within accordion */