Add video player functionality with controls, autoplay, and time tracking
All checks were successful
Build and release container directly from master / release (push) Successful in 11m48s
All checks were successful
Build and release container directly from master / release (push) Successful in 11m48s
This commit is contained in:
parent
f22891d7b6
commit
91a4ac3744
@ -292,6 +292,8 @@ if (video_data.params.autoplay) {
|
|||||||
new Promise(function (resolve, reject) {
|
new Promise(function (resolve, reject) {
|
||||||
setTimeout(function () {resolve(1);}, 1);
|
setTimeout(function () {resolve(1);}, 1);
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
|
console.log('[Invidious Debug] Attempting autoplay...');
|
||||||
|
console.log('[Invidious Debug] Calling player.play() for autoplay...');
|
||||||
var promise = player.play();
|
var promise = player.play();
|
||||||
|
|
||||||
if (promise !== undefined) {
|
if (promise !== undefined) {
|
||||||
@ -310,9 +312,11 @@ if (video_data.params.autoplay) {
|
|||||||
|
|
||||||
if (!video_data.params.listen && video_data.params.quality === 'dash') {
|
if (!video_data.params.listen && video_data.params.quality === 'dash') {
|
||||||
console.log('[Invidious Debug] Initializing httpSourceSelector...');
|
console.log('[Invidious Debug] Initializing httpSourceSelector...');
|
||||||
|
console.log('[Invidious Debug] Player sources BEFORE httpSourceSelector init:', JSON.stringify(player.currentSources()));
|
||||||
try {
|
try {
|
||||||
player.httpSourceSelector();
|
player.httpSourceSelector();
|
||||||
console.log('[Invidious Debug] httpSourceSelector initialized.');
|
console.log('[Invidious Debug] httpSourceSelector initialized.');
|
||||||
|
console.log('[Invidious Debug] Player sources AFTER httpSourceSelector init:', JSON.stringify(player.currentSources()));
|
||||||
|
|
||||||
if (video_data.params.quality_dash !== 'auto') {
|
if (video_data.params.quality_dash !== 'auto') {
|
||||||
console.log('[Invidious Debug] Setting DASH quality:', video_data.params.quality_dash);
|
console.log('[Invidious Debug] Setting DASH quality:', video_data.params.quality_dash);
|
||||||
@ -407,6 +411,18 @@ if (!video_data.params.listen && video_data.params.annotations) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player.on('play', function() {
|
||||||
|
console.log('[Invidious Debug] Event: play triggered. Current source:', JSON.stringify(player.currentSource()));
|
||||||
|
});
|
||||||
|
|
||||||
|
player.on('playing', function() {
|
||||||
|
console.log('[Invidious Debug] Event: playing triggered. Playback has started.');
|
||||||
|
});
|
||||||
|
|
||||||
|
player.on('waiting', function() {
|
||||||
|
console.log('[Invidious Debug] Event: waiting triggered. Buffering or waiting for data.');
|
||||||
|
});
|
||||||
|
|
||||||
var shareOptions = {
|
var shareOptions = {
|
||||||
socials: ['fbFeed', 'tw', 'reddit', 'email'],
|
socials: ['fbFeed', 'tw', 'reddit', 'email'],
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user