1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-06 06:50:51 +02:00
video.js/docs/options.md
Steve Heffernan a83433f655 Updated options docs.
Full URL to flash SWF.
2012-01-10 13:15:49 -08:00

1.0 KiB

layout title description body_id body_class
docs Options Player Options options docs subpage

Options

The Video.js emebed code is simply an HTML5 video tag with the video.js classes. So for many of the options you can use the standard tag attributes to set video.js options.

{% highlight html %} <video controls autoplay preload="auto" ...> {% endhighlight %}

Alternatively, you can use the data-setup attribute to provide options in the JSON format. This is also how you would set options that aren't standard to the video tag.

{% highlight html %} <video data-setup='{ "controls": true, "autoplay": false, "preload": "auto" }'...> {% endhighlight %}

Finally, if you're not using the data-setup attribute to trigger the player setup, you can pass in an object with the player options as the second argument in the setup function.

{% highlight javascript %} V("myVideoID", { "controls": true, "autoplay": false, "preload": "auto" }); {% endhighlight %}

(More options documentation coming soon.)