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

Add label on source property for html5 video for Video plugin #1681

Open
reaua001 opened this issue Dec 4, 2024 · 0 comments
Open

Add label on source property for html5 video for Video plugin #1681

reaua001 opened this issue Dec 4, 2024 · 0 comments

Comments

@reaua001
Copy link

reaua001 commented Dec 4, 2024

Summary

I noticed when using videojs and another tool to allow the video quality switching the label and selected does not pass

Basic example

Code changes starting from line 335

var html5VideoMarkup = '';
for (var i = 0; i < html5Video.source.length; i++) {
    var type = html5Video.source[i].type;
    var label = html5Video.source[i].label;
    var selected = html5Video.source[i].selected;
    var attr = type ? "type=\"" + type + "\" " : '';
    attr += label ? "label=\"" + label + "\" " : '';
    attr += selected ? "selected=\"true\"" : '';
    
    html5VideoMarkup += "<source src=\"" + html5Video.source[i].src + "\" " + attr + ">";

Motivation

Adding the label allows the other tools to grab that information and display properly
Adding selected allows the default selected
image

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