Open Media Toolkit

Javascript - Tutorial

More examples to follow, but a short jump start example can be seen here on how to use the OMTK player to play an Ogg/Vorbis stream. Due to some still unsolved timing issues, the OMTK_P_play function should not be called until a few seconds after the OMTK_P_initialize function has been called. This issue will be solved in a future release.

    <script type="text/javascript" src="omtkc.js"></script>
    <script type="text/javascript" src="omtkp.js"></script>

    <script type="text/javascript">

        var backend = OMTK_C_detect();

        if(backend != null) {
            setTimeout("startPlay()", 2000);
            function startPlay() {