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

Change video captions #5479

Open
thumaman opened this issue Apr 25, 2024 · 10 comments
Open

Change video captions #5479

thumaman opened this issue Apr 25, 2024 · 10 comments
Labels
Type: Feature ⚙ Request or idea for a new feature.

Comments

@thumaman
Copy link

Is there a way of changing captions of the video with custom buttons. What I mean by that is, I want to make my own button that displays available captions and by selecting them, they get updated in the video player.

I want this so that i can position and style my own buttons and menus with captions and make my application more customizable.

@thumaman thumaman added the Type: Feature ⚙ Request or idea for a new feature. label Apr 25, 2024
@stsrki
Copy link
Collaborator

stsrki commented Apr 25, 2024

This should be possible with the ControlsList parameter, which accepts an array of strings. The strings are, by default, the predefined names of the controls, but you should be able to define a custom name.

Here are some resources online that might help you to grasp it. Note they are for JS version but they should still apply

@thumaman
Copy link
Author

So if I understand correctly I can define a custom control that can then be used to change the captions of the current video?

@thumaman
Copy link
Author

Is it possible to do it all with C# and not use any JS?

@stsrki
Copy link
Collaborator

stsrki commented Apr 30, 2024

At the moment, it is not possible.

@thumaman
Copy link
Author

Then I think it would be a useful feature to have since it is more independent and faster than JS, I would suggest the current player to have a currentTrack field which can then be used to change the video track of the player.

@stsrki
Copy link
Collaborator

stsrki commented Apr 30, 2024

Can you explain the proposed API and how it could be used?

@thumaman
Copy link
Author

thumaman commented Apr 30, 2024

I would have the Video have an attribute called currentTrack which would be initially set to null or the Default value of Tracks array.
Then a user could make a custom menu or use the one currently generated from Tracks which when clicking on a certain subtitle would change the visibility of the desired track from hidden/disabled to showing, thus displaying the track along with the video.

It could be used so the user could create a custom menu outside the video player with which he/she could manipulate the player and create a more customizable environment.

I hope I explained it well, if not let me know :)

image

@thumaman
Copy link
Author

thumaman commented May 8, 2024

Will that functionality ever be supported in the upcoming weeks? :)

@stsrki
Copy link
Collaborator

stsrki commented May 9, 2024

Possibly yes. But it depends on the complexity. We also plan to migrate to the newer version of the video library so we need to be careful with adding too many features. In case they are not supported by this new library.

@stsrki
Copy link
Collaborator

stsrki commented May 9, 2024

Ps. #4914

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants