This is a message.

asp.net flow player problem Created Nov 23, 2009

This thread is solved

Views: 4046     Replies: 4     Last reply Dec 1, 2009  
You must login first before you can use this feature

kramir

Posts: 1

Registered:
Nov 23, 2009

asp.net flow player problem

Posted: Nov 23, 2009

Hi,

I am trying to implement the web site example in my asp.net site.

http://flowplayer.org/demos/installation/index.html

my code:
The javascript is registered at the beginning of the page.
<div>
<%-- type="application/x-shockwave-flash">

<param name="movie" value="/videos/flowplayer-3.1.5.swf" />
<param name="allowfullscreen" value="true" />

value='config={"clip":"/videos/flvtestvideo.flv"}' />
</object>--%>

href="/videos/flvtestvideo.flv"
style="display:block;width:520px;height:330px"
id="player">


<!-- this will install flowplayer inside previous A- tag. -->

<script language="javascript">
flowplayer("player", "/videos/flowplayer-3.1.5.swf");
</script>

</div>

neither does

object id="flowplayer" width="300" height="200" data="/swf/flowplayer-3.1.5.swf"
type="application/x-shockwave-flash">

<param name="movie" value="/swf/flowplayer-3.1.5.swf" />
<param name="allowfullscreen" value="true" />

value='config={"clip":http://blip.tv/file/get/N8inpasadena-Flowers457.flv"}' />
</object>

This does not work. Should I explicitly set some configuration for flowplayer in asp.net ? ,
Please Help!!! urgent!
Thanks

kurt@deepcreekservices.us

Posts: 4

Registered:
Nov 22, 2009

using ASP/.NET

Posted: Nov 30, 2009

Reply to: asp.net flow player problem, from kramir
I posted a similar request and got no responses. I too am using ASP/.NET and the demonstration examples do not work with Visual Studio.

The third step in the demo example is this:

<script language="JavaScript"> flowplayer("player", "path/to/the/flowplayer-3.1.5.swf"); </script>

But, that does not work in ASP. Here is the error:

Microsoft JScript runtime error: Object expected

Does anyone have code samples of flowPlayer working in an ASP/.NET application?

I have a working HTML version. I need ASP examples. Thanks!

Servers

Posts: 9

Registered:
May 6, 2009

» using ASP/.NET

Posted: Nov 30, 2009

Reply to: using ASP/.NET, from kurt@deepcreekservices.us
I don't know of any reason offhand that you would have a problem with using this in an ASP.NET application. I am making heavy (read: killing me!) use of Flowplayer within my own project.

I can't really post a sample, as I have a ton of different configurations. But the simplest configuration I have would be something like (and this uses jQuery):


<script src="/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="/js/flowplayer.min.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript" charset="utf-8">
$(window).load(function() {

    $('.music-player').each(function() {

        $f(this, {src: "/swf/flowplayer.commercial-3.1.5.swf", wmode: 'transparent'}, { 
            key: 'mykeywashereandIreplacedit',
            clip: { 
                autoPlay: false,
                autoBuffering: false
                
            },
            canvas: {backgroundColor: "#ffffff"}
            plugins: {
                audio: {url: '/swf/flowplayer.audio-3.1.2.swf'}
            }
            
        });
    });
});
</script>


.music-player {
  width: 400px;
  height: 300px;
}


<a href="somefile.mp3" class="music-player"></a>

The key points being: make sure your Javascript files are included (I know that sounds asinine, but I've banged my head against the desk a dozen times before realizing that, due to permission errors or a typo a file wasn't being included on the page), make sure you have IDs/classes done right. In the example you posted, Kurt, make sure that .NET isn't actually replacing your anchor's ID with it's own generated ID. "player" is referring to the ID of the anchor, after all.

Hope I'm not being patronizing!

kurt@deepcreekservices.us

Posts: 4

Registered:
Nov 22, 2009

alternate embedding methods

Posted: Dec 1, 2009

Reply to: » using ASP/.NET, from Servers
I can't figure out how to use the script tags used in most of your samples. I am using ASP/.NET 3.0 and Visual Studio. I do have html file versions working fine. So, I tried your alternate embedding methods using asp.

http://flowplayer.org/demos/installation/alternate/index.html

Looking at the pure object and object/embed samples I now have the players rendering but no video.

< object id="Flowplayer" width="400" height="286" data=http://www.deepcreekservices.us/demoMySQL/player/flowplayerLP.swf"
type="application/x-shockwave-flash">
<param name="movie" value=http://www.deepcreekservices.us/demoMySQL/player/flowplayerLP.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"clip":http://www.deepcreekservices.us/demoMySQL/video/JeriHarley01.flv"}' />
</object>

<object id="Flowplayer2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="286">
<param name="movie" value=http://www.deepcreekservices.us/demoMySQL/player/flowplayerLP.swf" />
<param name="flashvars" value='config={"clip":http://www.deepcreekservices.us/demoMySQL/video/JeriHarley01.flv"}' />

<!-- EMBED tag for Netscape Navigator 2.0+ and Mozilla compatible browsers -->
< embed type="application/x-shockwave-flash" width="400" height="286" src=http://www.deepcreekservices.us/demoMySQL/player/flowplayerLP.swf"
flashvars='config={"clip":' target='_new' class='external'>http://www.deepcreekservices.us/demoMySQL/video/JeriHarley01.flv"}'/>
</object>

Again, these videos play using my html only method.

kurt@deepcreekservices.us

Posts: 4

Registered:
Nov 22, 2009

use the latest version duh....

Posted: Dec 1, 2009

Reply to: alternate embedding methods, from kurt@deepcreekservices.us
OK, I'm working now using flowplayer-3.1.5.swf and the two object sample versions

- instead of an older one flowplayerLP.swf

My bad - life is good once again.