Topic on Extension talk:Score

Score not playing nicely with VideoJS / TimedMediaHandler

6
Lwangaman (talkcontribs)

It seems that Score does not work well with the VideoJS player. When the TimedMediaHandler extension is enabled and there is another media element on a page, TMH tries to apply VideoJS to Score elements that have sound="1" but results in a disabled player with sound source File:Undefined. See phabricator:T245377. For the time being I'm forcing the Kaltura player which plays nicely in all circumstances ($wgTmhWebPlayer = "mwembed";).

Skierpage (talkcontribs)
Lwangaman (talkcontribs)

This situation is still not fixed, and unfortunately the Kaltura player has now been removed so that is no longer an option. Here is the situation:

1) When there are only Score audio elements on a page there is no problem, the VideoJS player is not invoked only the native browser player is used.

2) When there are only non-Score audio elements on a page there is no problem, the VideoJS player is invoked and the audio elements use the VideoJS player

3) When there are both Score audio elements and non-Score audio elements on a page, the VideoJS player is invoked by the non-Score audio elements and applied to all audio elements on the page including the Score audio elements, however the Score audio elements do not support VideoJS.

This should demonstrate the issue:

Non Score audio element:

Score audio element:


{ \new PianoStaff << \new Staff \relative c'' { \set Staff.midiInstrument = #"violin" \clef treble \tempo 8 = 126 \time 3/16 r16 <d c a fis d>\f-! r16\fermata | \time 2/16 r <d c a fis d>-! \time 3/16 r <d c a fis d>8-! | r16 <d c a fis d>8-! | \time 2/8 <d c a fis>16-! <e c bes g>->-![ <cis b aes f>-! <c a fis ees>-!] } \new Staff \relative c { \set Staff.midiInstrument = #"violin" \clef bass \time 3/16 d,16-! <bes'' ees,>-! r\fermata | \time 2/16 <d,, d,>-! <bes'' ees,>-! | \time 3/16 d16-! <ees cis>8-! | r16 <ees cis>8-! | \time 2/8 d16\sf-! <ees cis>-!->[ <d c>-! <d c>-!] } >> }
Lwangaman (talkcontribs)

hmmm funny, it seems that VideoJS is not being invoked on Talk pages? My example above doesn't actually show the problem, because no VideoJS player is invoked here...

Lwangaman (talkcontribs)

I tried to recreate the same example on my User page: User:Lwangaman#Testing_Score_and_non-Score_audio_elements_together, the VideoJS player is being invoked on the non-Score audio element whereas it is not being invoked on the Score audio element, and both are still playing nicely. So I'm a bit stumped, because this is not working well on another external wiki: https://en.seminaverbi.bibleget.io/wiki/User_talk:Johnrdorazio . So I'm really not sure what the heck is going on. Why is the VideoJS getting applied to Score audio elements on the external wiki but not on Mediawiki? Is there a magic setting that needs to be set in LocalSettings to prevent VideoJS being applied to Score audio elements?

Skierpage (talkcontribs)

Bugs with Score and other media players were fixed in Wikipedia's wiki instances around July 2024, see phab:T295514 and phab:T363630. The TimedMediaHandler JavaScript code that "infuses" the VideoJS player into video and audio tags (replacing the native browser player) was running on Score's audio player as well, and was breaking. I think if you update the TMH extension on your wiki the behavior should fix.

I haven't seen a spec for when audio should use the native browser player versus TMH/VideoJS. I think part of the rationale for infusing the VideoJS player into audio tags is that it could have subtitles (captions) which the VideoJS player can present with its [CC] button. Comments on those two Phabricator bug reports have a lot of details.

Reply to "Score not playing nicely with VideoJS / TimedMediaHandler"