Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subtitles for audio #7

Open
PhilippeW opened this issue Feb 6, 2013 · 3 comments
Open

subtitles for audio #7

PhilippeW opened this issue Feb 6, 2013 · 3 comments

Comments

@PhilippeW
Copy link

Hi,

As seen on the spec, the track element and so, the subtitles are for media elements and not only for video element:

http://dev.w3.org/html5/spec-preview/the-track-element.html

It would be realy great to be able to use playr also with audio element to display some subtitles in the screen while listening to the audio track.

Indeed, it would have been better to have a poster attribute in the audio element, to have a fixed image on the background of the screen, but, it's not in html5 spec, so, displaying just the subtitles would be enough, I would really apreciate just to be able to do that.

Bye.

@PhilippeW
Copy link
Author

As a conclusion of https://www.w3.org/Bugs/Public/show_bug.cgi?id=20890 it is not logical to have subtitles for audio element, It should be done with video element as audio+subtitles=audio-visual=video.
So, this bug should be closed.

@PhilippeW
Copy link
Author

This is not so simple as explained on the other bug I opened about that in the w3.org's website:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20903
Animated lyrics for example is not some video, but, now, I don't know if playr is intended to do that. Maybe I'll try to do another script to do that (maybe based on playr as it's GPL licensed).

@PhilippeW
Copy link
Author

I choose to make some animated lyrics based on playr, I copy/paste and renamed playr.js and playr.css (to be able to use playr with videos) and changed the following:
in playr.js:
-I replaced each "v_id" by "a_id"
-I replaced each "v_el" by "a_el"
-I replaced each "video" by "audio"
-I replaced each "Video" by "Audio"
-I replaced each "vids" by "auds"
-I replaced each "vd" by "ad"
in playr.css:
-I replaced each "video" by "audio".
-In ".playraf_captions_wrapper{...}" I added: "border:solid 1px; width:506px; height:237px;" (the values was good for me, but I don't know how too deal with it to have something good for any website.
-In ".playraf_captions p{...}" I suppressed "background-color:rgba(0,0,0,0.75);" and added: "color:black;background-color:#fff;"
Maybe part of the code became useless, I didn't verified. As those changes are easy to do, you might make an audio version of playr that would be an audio lyrics animator and on each up-date of playr, you would adapt it on that audio version of playr.
Another solution is to add a support for audio animated lyrics on playr by by reusing all the playr video function that works for the audio lyrics animation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant