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

Doc.s are Inaccurate with Respect to Configuration of Player Controls, Syntax Inconsistent #2876

Closed
tneaves opened this issue Dec 2, 2015 · 12 comments

Comments

@tneaves
Copy link

tneaves commented Dec 2, 2015

I have been consulting Options and have found that the configuration options described in Component Options do not work. The syntax described is inaccurate.

This does not work with the CDN (as described by doc.s):

videojs('video-id', {
  controlBar: {
    muteToggle: false // or true
  }
});

This does work:

videojs('video_id', {
  controlBar : {
    children : {
      muteToggle:true
    }
  }
});

And this:

videojs('video-id', {
                controlBar : {
                    children : [
                        'playToggle',
                        'muteToggle',
                        'volumeControl',
                        'fullscreenToggle'
                    ]
                }
            });
@gkatsev
Copy link
Member

gkatsev commented Dec 2, 2015

The first one should work again. It did break but we fixed it in 5.2 (https://github.com/videojs/video.js/blob/master/CHANGELOG.md#520-2015-11-10) (#2773).
What version of videojs are you using?

But you're correct, our docs don't reflect that you can make them an array.

@tneaves
Copy link
Author

tneaves commented Dec 2, 2015

@gkatsev Does that mean I should pull source and use that as opposed to CDN

@gkatsev
Copy link
Member

gkatsev commented Dec 2, 2015

@tneaves it's available on the CDN as well. //vjs.zencdn.net/5.2.4/video.js or //vjs.zencdn.net/5.2/video.js.

@tneaves
Copy link
Author

tneaves commented Dec 2, 2015

@gkatsev Broken, there, too (unless I am just really fouling it up):

<!DOCTYPE html>
<html>
<head>
    <link href="http://vjs.zencdn.net/5.2.4/video-js.css" rel="stylesheet">
    <script src="http://vjs.zencdn.net/5.2.4/video.js"></script>
    <meta charset="ISO-8859-1">
</head>
<body>
    <video  id="share_video_player" class="video-js vjs-default-skin"
            controls preload="auto" width="640" height="264">
        <source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
    </video>

    <script>
        videojs(document.getElementById('share_video_player'), {
            controlBar : {
                muteToggle:false
            }
        });
    </script>
</body>
</html>

@gkatsev
Copy link
Member

gkatsev commented Dec 2, 2015

That's very weird, I'm using it in a player and it seems to be working fine.
Also, http://videojs.com/getting-started/ points at the latest versioned url on the cdn :)

@tneaves
Copy link
Author

tneaves commented Dec 2, 2015

@gkatsev
Copy link
Member

gkatsev commented Dec 2, 2015

Ah, yeah, those are statically generated and are old, not sure what to do about that.

@tneaves
Copy link
Author

tneaves commented Dec 2, 2015

@gkatsev Last question (sorry to bombard you): does the code I posted look accurate?

@gkatsev
Copy link
Member

gkatsev commented Dec 2, 2015

It looks correct. Could you put up the example on a jsfiddle or something and verify that it still is broken there and then post the link there if it does? Thanks.

@tneaves
Copy link
Author

tneaves commented Dec 2, 2015

@gkatsev https://jsfiddle.net/09f509tg/ Looks like it is broken? I am not very good with JSFiddle -- check that the resources are being properly imported, there. It requires HTTPS, apparently. It seems to be just the muteToggle, others seems to respond well (at least the ones that I have tested)

@gkatsev
Copy link
Member

gkatsev commented Dec 3, 2015

@tneaves I updated your example to show how you can hide the volume button: https://jsfiddle.net/09f509tg/1/

@gkatsev
Copy link
Member

gkatsev commented Jan 6, 2016

Last updated a month ago. Closing for now. If still an issue, we could reopen.

@gkatsev gkatsev closed this as completed Jan 6, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants