christiansolis3000 / flash-videoio

Automatically exported from code.google.com/p/flash-videoio
0 stars 0 forks source link

swfObject and falsh-videoIO - functions missing? #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I include this in my webpage:

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

      <script type="text/javascript">
      function onCreationComplete(event) {
        console.log(event);
      }

      var flashvars, params, attributes;
      flashvars = params = attributes = {
        type              : 'application/x-shockwave-flash',
        pluginspage       : 'http://www.adobe.com/go/getflashplayer',
        quality           : 'high',
        bgcolor           : '#000000',
        allowScriptAccess : 'always',
        controls          : 'true',
        live              : 'true',
        codec             : 'NellyMoser',
        cameraQuality     : '80',
        cameraDimension   : '640x480',
        url               : 'rtmp://myserver',
    publish           : 'test',
        record            : 'false'
      };

      swfobject.embedSWF('VideoIO.swf', 'video', '640', '480', '11.0',                  flashvars, params, attributes);

    </script>

Then do this using jQuery to try and start recording when the button "Go" is 
clicked:

    <script type="text/javascript">
      $('#go').on('click', function(e) {        
        window.movie = $('#video');     
        window.movie.setProperty('record', 'true');
        console.log(movie);
        return false;               
      });
    </script>

The "movie" object is displayed in the console, but the 'setProperty' and 
'getProperty' methods are not found.

Seems that the 'Object' method doesn't work, only the deprecated 'Embed'???

Original issue reported on code.google.com by scohen28...@gmail.com on 18 Jul 2012 at 6:55

GoogleCodeExporter commented 9 years ago
Can you try changing 'true' to true (use boolean instead of string) when 
invoking setProperty. Using the string 'true' in flashVars is fine, but in 
setProperty it needs the right type.

If that does not work then my response is as follows:

We haven't used swfObject much. If you have found any workaround, please let us 
know. But yes, if you don't use the nested object/embed tags then the 
ExternalInterface API of Flash Player misbehaves. 

Can you use Chrome developer tool to see whether it is using nested 
object/embed from swfObject and copy-paste the HTML here. Specifically, the 
object tag should have the classid and codebase as shown in
http://myprojectguide.org/p/flash-videoio/1.html
under the nested object/embed example.

Is any other setProperty working for you? e.g., 
window.movie.setProperty("controls", false);

Original comment by theinten...@gmail.com on 27 Jul 2012 at 7:11