unified-video-framework 1.4.253 → 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.
|
@@ -1462,6 +1462,8 @@ export class WebPlayer extends BasePlayer {
|
|
|
1462
1462
|
|
|
1463
1463
|
// Map YouTube quality levels to standard labels
|
|
1464
1464
|
const qualityMap: Record<string, any> = {
|
|
1465
|
+
'hd2160': { label: '4K', value: 'hd2160', height: 2160 },
|
|
1466
|
+
'hd1440': { label: '1440p', value: 'hd1440', height: 1440 },
|
|
1465
1467
|
'hd1080': { label: '1080p', value: 'hd1080', height: 1080 },
|
|
1466
1468
|
'hd720': { label: '720p', value: 'hd720', height: 720 },
|
|
1467
1469
|
'large': { label: '480p', value: 'large', height: 480 },
|
|
@@ -1535,6 +1537,8 @@ export class WebPlayer extends BasePlayer {
|
|
|
1535
1537
|
|
|
1536
1538
|
try {
|
|
1537
1539
|
const qualityMap: Record<string, any> = {
|
|
1540
|
+
'hd2160': { label: '4K', value: 'hd2160', height: 2160 },
|
|
1541
|
+
'hd1440': { label: '1440p', value: 'hd1440', height: 1440 },
|
|
1538
1542
|
'hd1080': { label: '1080p', value: 'hd1080', height: 1080 },
|
|
1539
1543
|
'hd720': { label: '720p', value: 'hd720', height: 720 },
|
|
1540
1544
|
'large': { label: '480p', value: 'large', height: 480 },
|
|
@@ -1546,9 +1550,44 @@ export class WebPlayer extends BasePlayer {
|
|
|
1546
1550
|
|
|
1547
1551
|
this.debugLog('📊 Attempting to set YouTube quality to:', qualityLevel);
|
|
1548
1552
|
|
|
1549
|
-
//
|
|
1550
|
-
|
|
1551
|
-
|
|
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
|
+
}
|
|
1552
1591
|
|
|
1553
1592
|
// Verify quality was changed after a delay
|
|
1554
1593
|
setTimeout(() => {
|
|
@@ -1558,12 +1597,13 @@ export class WebPlayer extends BasePlayer {
|
|
|
1558
1597
|
|
|
1559
1598
|
this.debugLog('📊 Current quality after set:', currentQuality, '(', this.youtubeCurrentQuality?.label, ')');
|
|
1560
1599
|
|
|
1561
|
-
// Show notification with result
|
|
1600
|
+
// Show notification with result - be more user-friendly
|
|
1562
1601
|
if (currentQuality === qualityLevel) {
|
|
1563
|
-
this.showNotification(`Quality
|
|
1602
|
+
this.showNotification(`Quality: ${qualityMap[currentQuality]?.label || 'requested quality'}`);
|
|
1564
1603
|
this.debugLog('✅ Quality successfully changed to:', qualityLevel);
|
|
1565
1604
|
} else {
|
|
1566
|
-
|
|
1605
|
+
// Don't show "YouTube optimized" message to users - it's confusing
|
|
1606
|
+
this.showNotification(`Quality: ${qualityMap[currentQuality]?.label || currentQuality}`);
|
|
1567
1607
|
this.debugLog('⚠️ Requested quality:', qualityLevel, '| Actual quality:', currentQuality, '(YouTube may have optimized)');
|
|
1568
1608
|
}
|
|
1569
1609
|
|
|
@@ -4794,7 +4834,29 @@ export class WebPlayer extends BasePlayer {
|
|
|
4794
4834
|
}
|
|
4795
4835
|
|
|
4796
4836
|
.uvf-accordion-item.expanded .uvf-accordion-content {
|
|
4797
|
-
max-height:
|
|
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);
|
|
4798
4860
|
}
|
|
4799
4861
|
|
|
4800
4862
|
/* Settings options within accordion */
|