Extension talk:TimedMediaHandler
Using VideoJS
I'm having trouble initialising it.
The styling, specifically, is jumbled up (controls not styled, and progress bar disappearing). What am I doing wrong? — Alien 3
3 3 18:18, 1 February 2025 (UTC)
$(".mw-body").append(`<div id="vid"></div>`)
var player;
// Load the appropriate modules in ResourceLoader
mw.loader.using( 'ext.tmh.videojs-ogvjs' ).then( function () {
// Load ogvjs if necessary; when this promise resolves,
// all necessary code has been loaded
return mw.OgvJsSupport.loadIfNeeded();
} ).then( function () {
player = videojs( 'vid', {
controls: true,
autoplay: false,
poster: '//upload.wikimedia.org/wikipedia/commons/thumb/d/de/Longines_Chronicles_with_Leo_Mates_1954_ARC-96010.ogv/400px--Longines_Chronicles_with_Leo_Mates_1954_ARC-96010.ogv.jpg',
sources: ["//upload.wikimedia.org/wikipedia/commons/d/de/Longines_Chronicles_with_Leo_Mates_1954_ARC-96010.ogv" ],
// Ogv.js-specific configuration
ogvjs: {
base: mw.OgvJsSupport.basePath()
}
} );
} );
ought to work, it's nearly the doc. — Alien 3
3 3 18:19, 1 February 2025 (UTC)
- (Pinging @Brooke Vibber, as one of the authors, as I'm not sure anyone actually looks here.) — Alien 3
3 3 19:08, 1 February 2025 (UTC)
thumbtime more accurate than 1 second ?
In expression "|thumbtime=1:25" can we have a precision greater than 1 second ? ( 1/10 is already better) because I have a flash of ligthning between 0:07 and 0:08 so I can display either black image .... or black image
- Still image at 7 seconds
- Still image at 8 seconds
- Still image at 9 seconds
Thanks. -- Christian 🇫🇷 FR 🚨 (talk) 12:08, 9 April 2025 (UTC)
- Apparently not. In theory, up to millisecond precision is supported, so
[[File:Flash-Lightning over Germany.ogg|thumb|thumbtime=7.735]]
would give a thumbnail at 7 seconds and 735 milliseconds, and actually the URL of the thumbnail image still reflects that, but then the value is converted to an integer before the actual thumbnail generation… I have no idea why. —Tacsipacsi (talk) 20:26, 11 April 2025 (UTC)