Add ability to define UI visibility and playback settings in JS
jcarpenter opened this issue · 3 comments
It would be useful to have properties we can set via JS for visibility of controls and playback settings. Analogous to the attributes on the <video>
element. In the interest of making the player more embed friendly for devs.
In the case of controls, I'm currently simply setting style="display:none"
on the video-controls element. Works, but isn't very elegant.
Ah. Yeah, I can definitely add this feature, but I'm currently out of the office at a conference, so it may be a little while.
Hi Andrea, no rush. One of our team members may have some time to work on this also :)
in PR #22 I added the ability to hide video controls a few ways:
https://github.com/hawksley/eleVR-Web-Player#ability-to-hide-video-controls
and in PR #20 I also added the ability to load a remote video URL a few ways:
https://github.com/hawksley/eleVR-Web-Player#ability-to-load-external-video-urls-via-query-string-hash-postmessage
@jcarpenter: @hawksley: if it's still desired to allow these options to be overridden from JS, we can do that. but now the options can be overridden from JS, query-string in URL, hash, and postMessage.
fwiw, related to this: I filed issue #21 about offering a JS bundle so that you could just refer to a eleVR-player.min.js
and you get a module/global you can reference like so:
var eleVRPlayer = require('eleVR-player')({
controls: false
});
or
eleVRPlayer.init({
controls: false
});
or something like that.
let me know if we want to keep this open or if we can close it. thanks!