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

Support for subtitles in the video player #879

Closed
MeowMeowVenom opened this issue May 2, 2021 · 3 comments
Closed

Support for subtitles in the video player #879

MeowMeowVenom opened this issue May 2, 2021 · 3 comments

Comments

@MeowMeowVenom
Copy link

Is your feature request related to a problem? Please describe.

There is no option to view subtitles for a video file.

Describe the solution you'd like
I would like to view subtitles for a video file.

Describe alternatives you've considered
Maybe you can include plyr.io into nextcloud. It has wide-range of customisation features and subtitle options.
https://github.com/sampotts/plyr

@szaimen szaimen transferred this issue from nextcloud/server May 2, 2021
@beardhatcode
Copy link
Contributor

beardhatcode commented May 2, 2021

Hi, @Rejected-Peice thank you for raising this issue, we are however using Plyr as video player. See:

<VuePlyr
ref="plyr"
:options="options"
:style="{
height: height + 'px',
width: width + 'px'
}">
<video
ref="video"
:autoplay="active"
:playsinline="true"
:poster="livePhotoPath"
:src="davPath"
preload="metadata"
@ended="donePlaying"
@canplay="doneLoading"
@loadedmetadata="onLoadedMetadata">
<!-- Omitting `type` on purpose because most of the
browsers auto detect the appropriate codec.
Having it set force the browser to comply to
the provided mime instead of detecting a potential
compatibility. -->
{{ t('viewer', 'Your browser does not support videos.') }}
</video>
</VuePlyr>

To add captions to a HTML5 video we need to have vtt files containing the subtitles. One possible avenue to get support for subtitles is to auto select a vtt file by the same name. But that seems a bit clumsy to me and difficult to explain to new users.

@Rejected-Peice do you have a suggestion for a user-friendly way to allow users to select the subtitle file?

@beardhatcode beardhatcode changed the title Plyr as the video player for nextcloud. Support for subtitles in the video player May 2, 2021
@skjnldsv
Copy link
Member

skjnldsv commented May 3, 2021

do you have a suggestion for a user-friendly way to allow users to select the subtitle file?

The way we already stuff is if the fileNames are the same.
usually modern videos players even use the format FILENAME.LANG.srt. We should most likely do the same as picking something is much more complicated.

@skjnldsv
Copy link
Member

skjnldsv commented May 3, 2021

duplicate of #239

@skjnldsv skjnldsv closed this as completed May 3, 2021
@beardhatcode beardhatcode linked a pull request May 23, 2021 that will close this issue
@beardhatcode beardhatcode removed a link to a pull request May 23, 2021
@beardhatcode beardhatcode linked a pull request May 23, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants