Search code examples
javascriptvideowebrtcopera

Ziggeo, WebRTC Could not read video file


I am implementing application which should support async video recording, and I started just exploring Ziggeo, cool thing is that it supports WebRTC and I wanted to use this. Below is the quick start application. Everything works fine on Chrome and FF but on Opera I get the following error Could not read video file with status code 412, any ideas what might cause this error?

<!DOCTYPE html>
<html>
    <head>
         <link rel="stylesheet" href="//assets-cdn.ziggeo.com/v1-stable/ziggeo.css" />
    </head>
    <body>
        <button onclick="startVideoRecording()">Start video</button>
        <div id="video">
        </div>

        <script src="//assets-cdn.ziggeo.com/v1-stable/ziggeo.js"></script>
        <script>ZiggeoApi.token = "MY-TOKEN-IS-HERE";</script>
        <script>ZiggeoApi.Config.cdn = true;</script>
        <script>ZiggeoApi.Config.webrtc = true;</script>


        <script>
            function startVideoRecording() {
               console.log('recording');
               recorder = ZiggeoApi.Embed.embed('#video', {
                   limit: 15,
                   width: 770,
                   height: 557,
              });
            }
        </script>
    </body>
</html>

Solution

  • This is resolved in the latest release of the JS SDK on Ziggeo - that is "v1-r10"

    To use it, you can simply change the header in your code to call the same as so:

    <link rel="stylesheet" href="//assets-cdn.ziggeo.com/v1-r10/ziggeo.css" />
    <script src="//assets-cdn.ziggeo.com/v1-r10/ziggeo.js"></script>
    

    UPDATE (May 2016)

    Updating this post to reflect the fact that v1-r10 is currently the stable version, so it is better if stable version is called instead of a specific version (as you will get all the latest stable versions including their upgrades and fixes).

    This is done using the following code:

    <link rel="stylesheet" href="//assets-cdn.ziggeo.com/v1-stable/ziggeo.css" />
    <script src="//assets-cdn.ziggeo.com/v1-stable/ziggeo.js"></script>