-1

When I use jwplayer with following config everything is OK.

jwplayer('someId').setup({
        'flashplayer': '/js/jwplayer/player.swf',
        'file':        'awesome.flv',
        'streamer':    'rtmp://some.server.com:1934/vod',
        'width':       '220',
        'height':      '190'
    });

When I use dojo with following config:

new Flash({
    path:   'rtmp://some.server.com:1934/vod?file=awesome.flv' ,
    width:    220,
    height:   190
    }, this.someId);

Flash place holder is visible, but no controls to play stream and in the console I can see error that have no meaning for me...

Building SWF failed.
[Break On This Error]   

comboPendingTimer = null;

dojo.js (line 648)

What is wrong with dojo flash config? Another thing is how to tell dojo to use object tag? Right now it uses some strange embed tag...

Dojo version 1.7.2 documentation not that helpful http://dojotoolkit.org/reference-guide/1.7/dojox/flash.html

mschr
  • 8,531
  • 3
  • 21
  • 35
Wojciech Bednarski
  • 6,033
  • 9
  • 49
  • 73

1 Answers1

1

Dojox.embed.Flash is merely a browser sniffing utility which will present the <embed> or <object> in a way that suits the users browser the best.

Youre doing the wrong path, the Flash object would not know how to handle a streaming flv file, it needs to point to a swf.

Options to work with

var dataurl =    "player.swf"
var flashvars =  {'file':'playlist.xml','autostart':'true'};
var params =     {'allowfullscreen':'true','allowscriptaccess':'always', 'bgcolor':'#ffffff'};
var attributes = {'id': 'player1','name':'player1'};
var expressInstall = "http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75"

using swfobject with jwplayer

This is a sample from longtail showing howto embed via swfobject:

swfobject.embedSWF(dataurl, 'flashContent', '300', '250', '9', 'false', flashvars, params, attributes);

thus from the prototype embedSWF which is:

swfobject.embedSWF(swfUrlStr, replaceElemIdStr, widthStr, heightStr, 
     swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj,
     attObj, callbackFn)

using dojox.embed.Flash with jwplayer

See reference guide for parameters

Mapping above results to

new Flash({
    width: 300,
    height: 250,
    minimumVersion: 9,
    expressInstall : expressInstall,
    allowScriptAccess: true,

    path: dataurl,
    id: 'player1',
    vars: flashvars,
    params: params        

}, 'flashContent');
mschr
  • 8,531
  • 3
  • 21
  • 35
  • Thanks for the detailed answer. Path is correct. The problem seems to be lack of support for RTMP in DojoX Flash implementation – this is why jwplayer works fine dojo plugging doesn't. – Wojciech Bednarski Jul 11 '12 at 09:23
  • 1
    no, youre just getting it wrong.. the Embed.Flash plugin writes html - it has no SWF capeabilities on its own (a SWF, which is a flash program, that in turn _could be a media player) – mschr Jul 12 '12 at 22:15
  • Yes, thanks. I realized it yesterday that I have to use some player. – Wojciech Bednarski Jul 12 '12 at 22:48