myetv-player 1.6.2 → 1.6.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.
- package/css/myetv-player.css +295 -15
- package/css/myetv-player.min.css +1 -1
- package/dist/myetv-player.js +353 -180
- package/dist/myetv-player.min.js +275 -159
- package/package.json +3 -1
- package/plugins/youtube/myetv-player-youtube-plugin.js +52 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myetv-player",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "MYETV Video Player - Modular HTML5 video player with plugin support for YouTube, Vimeo, Twitch, Facebook, Cloudflare Stream and streaming protocols (HLS/DASH)",
|
|
5
5
|
"main": "dist/myetv-player.js",
|
|
6
6
|
"files": [
|
|
@@ -63,3 +63,5 @@
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
|
|
67
|
+
|
|
@@ -372,23 +372,29 @@
|
|
|
372
372
|
subtitlesBtn.style.display = 'none';
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
const wrapper = expandableSpeedWrapper.closest('.settings-expandable-wrapper');
|
|
375
|
+
// Remove ONLY the original player speed (not YouTube speed)
|
|
376
|
+
if (settingsMenu) {
|
|
377
|
+
// Find and remove ONLY options with data-action="speed" or "speed-expand"
|
|
378
|
+
// that are NOT inside .yt-speed-wrapper
|
|
379
|
+
const speedOptions = settingsMenu.querySelectorAll('[data-action="speed"], [data-action="speed_expand"]');
|
|
380
|
+
|
|
381
|
+
speedOptions.forEach(option => {
|
|
382
|
+
// Check if this option is NOT inside YouTube speed wrapper
|
|
383
|
+
if (!option.closest('.yt-speed-wrapper')) {
|
|
384
|
+
// It's the original player speed - remove it
|
|
385
|
+
const wrapper = option.closest('.settings-expandable-wrapper');
|
|
387
386
|
if (wrapper) {
|
|
388
|
-
wrapper.
|
|
387
|
+
wrapper.remove(); // Remove the whole wrapper
|
|
388
|
+
} else {
|
|
389
|
+
option.remove(); // Remove just the option
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if (this.api.player.options.debug) {
|
|
393
|
+
console.log('YT Plugin: Removed original player speed option');
|
|
389
394
|
}
|
|
390
395
|
}
|
|
391
|
-
}
|
|
396
|
+
});
|
|
397
|
+
}
|
|
392
398
|
|
|
393
399
|
// Add subtitles option to settings menu
|
|
394
400
|
if (settingsMenu) {
|
|
@@ -4681,42 +4687,36 @@
|
|
|
4681
4687
|
}
|
|
4682
4688
|
|
|
4683
4689
|
/**
|
|
4684
|
-
|
|
4685
|
-
|
|
4690
|
+
* Initialize chapter display in top bar subtitle (instead of title overlay)
|
|
4691
|
+
*/
|
|
4686
4692
|
initChapterDisplayInOverlay() {
|
|
4687
4693
|
if (!this.chapters || this.chapters.length === 0) return;
|
|
4688
4694
|
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
chapterElement.className = 'chapter-name';
|
|
4701
|
-
chapterElement.style.cssText = `
|
|
4702
|
-
font-size: 13px;
|
|
4703
|
-
font-weight: 500;
|
|
4704
|
-
color: rgba(255, 255, 255, 0.9);
|
|
4705
|
-
margin-top: 6px;
|
|
4706
|
-
max-width: 400px;
|
|
4707
|
-
overflow: hidden;
|
|
4708
|
-
text-overflow: ellipsis;
|
|
4709
|
-
white-space: nowrap;
|
|
4710
|
-
`;
|
|
4695
|
+
// Use topBar instead of old title-overlay
|
|
4696
|
+
const topBar = this.api.container.querySelector('.player-top-bar');
|
|
4697
|
+
if (!topBar) return;
|
|
4698
|
+
|
|
4699
|
+
// Find or create subtitle element in top bar
|
|
4700
|
+
let subtitleElement = topBar.querySelector('.video-subtitle');
|
|
4701
|
+
|
|
4702
|
+
if (!subtitleElement) {
|
|
4703
|
+
// Create subtitle element if it doesn't exist
|
|
4704
|
+
const titleSection = topBar.querySelector('.top-bar-title');
|
|
4705
|
+
if (!titleSection) return;
|
|
4711
4706
|
|
|
4712
|
-
|
|
4713
|
-
|
|
4707
|
+
subtitleElement = document.createElement('span');
|
|
4708
|
+
subtitleElement.className = 'video-subtitle chapter-name';
|
|
4709
|
+
titleSection.appendChild(subtitleElement);
|
|
4710
|
+
} else {
|
|
4711
|
+
// Add chapter-name class to existing subtitle
|
|
4712
|
+
subtitleElement.classList.add('chapter-name');
|
|
4713
|
+
}
|
|
4714
4714
|
|
|
4715
4715
|
// Start monitoring playback to update chapter name
|
|
4716
4716
|
this.startChapterNameMonitoring();
|
|
4717
4717
|
|
|
4718
4718
|
if (this.api.player.options.debug) {
|
|
4719
|
-
console.log('YT Plugin: Chapter name display initialized in
|
|
4719
|
+
console.log('YT Plugin: Chapter name display initialized in top bar');
|
|
4720
4720
|
}
|
|
4721
4721
|
}
|
|
4722
4722
|
|
|
@@ -4746,10 +4746,11 @@
|
|
|
4746
4746
|
}
|
|
4747
4747
|
|
|
4748
4748
|
/**
|
|
4749
|
-
|
|
4750
|
-
|
|
4749
|
+
* Update chapter name in top bar subtitle based on current time
|
|
4750
|
+
*/
|
|
4751
4751
|
updateChapterNameDisplay(currentTime) {
|
|
4752
|
-
|
|
4752
|
+
// Use topBar instead of title-overlay
|
|
4753
|
+
const chapterElement = this.api.container.querySelector('.player-top-bar .video-subtitle.chapter-name');
|
|
4753
4754
|
if (!chapterElement) return;
|
|
4754
4755
|
|
|
4755
4756
|
// Find current chapter
|
|
@@ -4766,7 +4767,13 @@
|
|
|
4766
4767
|
chapterElement.textContent = currentChapter.title;
|
|
4767
4768
|
chapterElement.style.display = 'block';
|
|
4768
4769
|
} else {
|
|
4769
|
-
|
|
4770
|
+
// Show original subtitle if no chapter active
|
|
4771
|
+
if (this.api.player.options.videoSubtitle) {
|
|
4772
|
+
chapterElement.textContent = this.api.player.options.videoSubtitle;
|
|
4773
|
+
chapterElement.style.display = 'block';
|
|
4774
|
+
} else {
|
|
4775
|
+
chapterElement.style.display = 'none';
|
|
4776
|
+
}
|
|
4770
4777
|
}
|
|
4771
4778
|
}
|
|
4772
4779
|
|