Page MenuHomePhabricator

Show total running time of videos in commons video player
Closed, DeclinedPublic

Description

User Story:: As a user, I want to know how long a video runs so I can estimate if I have time to watch it

Context of use: My current context would be showing tutorial videos in WMDEs work for new editors, but I think the usecase it not limited to that

Current Problems: Currently, there is no total time displayed

Possible Solution:

One way to improve the situation for the user is to show the total time in the video player.

Maybe like youtube (as of 2018/02) does it: 00:00/2:43

image.png (78×150 px, 6 KB)

Consequences: The timeline would be minimally less wide and would cost 30px or so.

Event Timeline

brion subscribed.

@Jan_Dittrich is this for during playback, or before clicking the play button, or both?

Before clicking the button and after. Our framing of it is that people want to know how much time they need to spend.

Note that the new video.js-based player mode shows the remaining time on the control bar instead of the elapsed time as in the old player (which is obsolete and will not be changed):

https://ogvjs-testing.wmflabs.org/wiki/File:Glass_Half_-_3D_animation_with_OpenGL_cartoon_rendering.webm

Screen Shot 2018-02-22 at 4.57.00 PM.png (926×1 px, 221 KB)

However it does not currently display any such info on the thumbnail before hitting the initial playback button. Not sure what'd be the best layout for that if it's desirable.

Displaying metadata before play requires loading the metadata. While html5 video does have options for this, it can be a bit expensive operation (which is why we disable it when adding more than 10 videos of the old player to the page). For the new player, i'm not exactly sure how stuff is set up right now.

For audio, i hacked the player for us to always show the toolbar and not the big play button however. There it would show duration if it would have prefetched the metadata:
https://ogvjs-testing.wmflabs.org/w/index.php?title=File:Bach_C_Major_Prelude_Werckmeister.ogg

We do have the duration ahead of time since it's extracted server-side at upload time -- it's on an attribute like data-durationhint="95.937". Not sure if there's a way to pass that into video.js's controls.

player.duration(seconds).. but i'm not sure if that works before the media is loaded...

Jdforrester-WMF subscribed.

Mass-Declining all open tasks about the Kaltura audio/video player, as that code is no longer used and has been deleted. See T306971 for more information.