This is a message.

injecting flowplayer via json, with js controlbar, not working in Safari Created Oct 30, 2009

This thread is solved

Views: 2206     Replies: 4     Last reply Oct 30, 2009  
You must login first before you can use this feature

pomonacollege

Posts: 17

Registered:
Oct 26, 2009

injecting flowplayer via json, with js controlbar, not working in Safari

Posted: Oct 30, 2009

Hi!

I am attempting to inject a script tag into the page, and it seems to be working as intended, but in Safari when one clicks on the splash image, it just links out to the .swf file (i.e., the js isn't picking up the click and doing what it should.) Here is the script I am inecting:


<img src="/dev/images/internal/home/spock.jpg" alt="Splash image for player" />


<div id="fc" class="fc"></div>

<script>$f("player", "flowplayer.commercial-3.1.5.swf", { key: '#$8ac3e001c7b14853256' , plugins: {controls: null}, clip: {scaling: "fit"} }).controls("fc", {duration: 25});</script>

Also, what would I need to do to get the controlbar only to appear on hover of the video? Thanks for all the help...code in action at :http://pomona.edu/dev/home/index-8.asp

gmccomb

Posts: 746

Registered:
Apr 9, 2009

» injecting flowplayer via json, with js controlbar, not working in Safari

Posted: Oct 30, 2009

Reply to: injecting flowplayer via json, with js controlbar, not working in Safari, from pomonacollege
Much of your page doesn't appear to work on Firefox on the PC. The "Spock" video never loads (or it does but it immediately says Play Again); you have at least one other player where all I see is a constant loading throbber; and ... I lost count.

Why not work out your Flowplayer issues on a dev page without the rotating carousel, and when it works you can try implementing it into the more complex page.

pomonacollege

Posts: 17

Registered:
Oct 26, 2009

» » injecting flowplayer via json, with js controlbar, not working in Safari

Posted: Oct 30, 2009

Reply to: » injecting flowplayer via json, with js controlbar, not working in Safari, from gmccomb
Well, just ignore the other items in the carousel (the throbber just continously runs now by default for that pane), and yes, the video was something I just threw together so I am assuming that is why it keeps replaying once clicked (I don't have actual video to work with yet). My original problem still remains though in safari.

I understand the importance of a dev page, but the problem *I think* lies in the fact that I am injecting the code via json. If I were to remove that layer, it would work correctly just as on the examples on flowplayer.org (as you can see, my code is very simply currently).

gmccomb

Posts: 746

Registered:
Apr 9, 2009

» » » injecting flowplayer via json, with js controlbar, not working in Safari

Posted: Oct 30, 2009

Reply to: » » injecting flowplayer via json, with js controlbar, not working in Safari, from pomonacollege
Well, if as you say it's working in Firefox as designed, but not in Safari then very likely it's some kind of script interaction. You have other code on the page that could be colliding. Very hard to pinpoint. You could try to run Safari in debug mode, which fortunately it supports.

pomonacollege

Posts: 17

Registered:
Oct 26, 2009

» » » » injecting flowplayer via json, with js controlbar, not working in Safari

Posted: Oct 30, 2009

Reply to: » » » injecting flowplayer via json, with js controlbar, not working in Safari, from gmccomb
The following error code came up in Safari: "Flowplayer cannot access element: player"

This is the code I am injecting (noticed I should have wrapped it for the html):


<a href="test.swf" style="display:block;width:760px;height:350px" id="player">
<img src="/dev/images/internal/home/spock.jpg" alt="Splash image for player" />
</a>
<div id="fc" class="fc"></div>

<script>$f("player", "flowplayer.commercial-3.1.5.swf", { key: '#$8ac3e001c7b14853256' , plugins: {controls: null}, clip: {scaling: "fit"} }).controls("fc", {duration: 25});</script>