Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
fancybox i jv wmv player (silverlight)

 
Post new topic   Reply to topic    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
dr_Hate



Joined: 28 Aug 2007
Posts: 168
Location: Rijeka

PostPosted: 04.06.2009 10:18    Post subject: fancybox i jv wmv player (silverlight) Add user to your forum ignore list Reply with quote

Naletio sam na jedan problem koji nikako ne uspijevam rijesiti - koristim jv silverlight player za wmv lokalne zapise i za streamove sa windows media servera. Player se na stranici prikazuje preko fancyboxa.

I sve 5 divno i krasno u FF,Opera,Safari i Chrome, stvar sljaka. U IE8/7/6 stvar ne radi.

Njusim gdje bi mogao biti problem, no ne baratam ni priblizno dovoljno dobro javascriptom da bi ga mogao rijesiti. Ima netko nekakvu ideju kako rijesiti ovo?

Primjer ovdje: http://www.stajduhar.org/fancybox

_________________
imam domenu |stajduhar.org|
Back to top
View user's profile Send private message Visit poster's website
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 04.06.2009 11:57    Post subject: Add user to your forum ignore list Reply with quote

Pokolje se sa fancybox-om u IE-u, pokusavam jos tocno iscackat zbog cega.

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 04.06.2009 12:26    Post subject: Add user to your forum ignore list Reply with quote

Heh... Kod seljenja contenta, metodom kojom to fancybox radi, nestanu child <param>
elementi od <object> taga koji se izgenerira, a u njima je path do video fajla i jos par
informacija. I to zbog html() metode od jquerya koja uzima samo innerHTML contentse.

Problem se ne manifestira u ostalim browserima buduci da oni koriste <embed>.

Cackam dalje da vidim da li se da nesto na brzinu sprtljat da to proradi...

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 04.06.2009 12:58    Post subject: Add user to your forum ignore list Reply with quote

Oke, slozio nesto nabrzaka, eo modified verzija fancybox skripte, pa probaj s njom: http://zytzagoo.net/code/jquery.fancybox-1.2.1-iefix.js

U biti samo treba modificirati postojecu _change_item() funkciju u fancyboxu:

Code:

        function _change_item() {
            $("#fancy_right, #fancy_left, #fancy_close, #fancy_title").hide();

            var href = opts.itemArray[ opts.itemCurrent ].href;

            if (href.match(/#/)) {
                var target = window.location.href.split('#')[0]; target = href.replace(target, ''); target = target.substr(target.indexOf('#'));
                /**
                * zyt: 04.06.2009.
                * http://www.mi3dot.org/forum/viewtopic.php?t=14791
                * - added code to copy over child <param> tags of <object> elements in IE
                */
                var _content = $(target).html();
                var _content_mod = '';
                // only have to do this for IE
                if (isIE) {
                    if (_content.match(/<object/i)) {
                        // we have an object tag in IE, grab that object's <param>s
                        // because jquery's html() doesn't do it
                        var obj = $(target + ' > object');
                        var obj_params = obj.children('param');
                        // chopping off the closing </object>
                        _content_mod = _content.substring(0, _content.length - 9);
                        // adding back the params
                        obj_params.each(function() {
                            _content_mod += '<param name="' + this.name + '" value="' + this.value + '" />';
                        });
                        // re-close the object
                        _content_mod += '</object>';
                        // copy the modified contents back to _content
                        _content = _content_mod;
                    }
                }
                _set_content('<div id="fancy_div">' + _content + '</div>', opts.frameWidth, opts.frameHeight);

            } else if (href.match(imageRegExp)) {
                imagePreloader = new Image; imagePreloader.src = href;

                if (imagePreloader.complete) {
                    _proceed_image();

                } else {
                    $.fn.fancybox.showLoading();

                    $(imagePreloader).unbind().bind('load', function() {
                        $(".fancy_loading").hide();

                        _proceed_image();
                    });
                }

            } else if (href.match("iframe") || elem.className.indexOf("iframe") >= 0) {
                _set_content('<iframe id="fancy_frame" onload="$.fn.fancybox.showIframe()" name="fancy_iframe' + Math.round(Math.random()*1000) + '" frameborder="0" hspace="0" src="' + href + '"></iframe>', opts.frameWidth, opts.frameHeight);

            } else {
                $.get(href, function(data) {
                    _set_content( '<div id="fancy_ajax">' + data + '</div>', opts.frameWidth, opts.frameHeight );
                });
            }
        };

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 04.06.2009 21:17    Post subject: Add user to your forum ignore list Reply with quote

I btw, preseli <script> pozive nakon sto zatvoris <div> holder za filmic, a ne kao sto ti je
trenutno (unutar tog <div>-a).

Znaci:
Code:

<div id="wmplayer1" class="fancyMedia"></div>
<script type="text/javascript">
   var cnt = document.getElementById("wmplayer1");
   var src = "swf/wmvplayer.xaml";
   var cfg = {height:'355',width:'425',file:'files/Bank robbery.wmv'};
   var ply = new jeroenwijering.Player(cnt,src,cfg);
</script>

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 04.06.2009 22:01    Post subject: Add user to your forum ignore list Reply with quote

Da ne objašnjavam previše, source priča više od svega, baci oko tu:
http://zytzagoo.net/mi3.tests/dr_hate_fancybox/

Trebalo bi raditi svuda, meni radi (TM). Ako treba pojašnjenja zašto i kako, viči.

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 04.06.2009 22:56    Post subject: Add user to your forum ignore list Reply with quote

A eo i patch i bug report sluzbeno za fancybox: http://code.google.com/p/fancybox/issues/detail?id=17

karma++ :p

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
dr_Hate



Joined: 28 Aug 2007
Posts: 168
Location: Rijeka

PostPosted: 05.06.2009 11:14    Post subject: Add user to your forum ignore list Reply with quote

kapa do poda, vjecna zahvalnost i piva prvom prilikom Very Happy

stvar radi u IE6/7, uz Invalid Pointer error koji vidim da si spomenuo i na google grupi, dok je u ie8 i dalje isti problem, idem probat procackat malo po tome pa vidit sto se dalje da napraviti

i jos jednom, kapa do poda Very Happy

_________________
imam domenu |stajduhar.org|
Back to top
View user's profile Send private message Visit poster's website
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 05.06.2009 11:16    Post subject: Add user to your forum ignore list Reply with quote

Pointer error je rijesen na google grupi i na gornjem url-u isto vec Smile

IE8 steka? brb Smile

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 05.06.2009 12:28    Post subject: Add user to your forum ignore list Reply with quote

Oke, digo novu virtualnu masinu za IE8, stara istekla.
IE8 u compatibility modu sljaka, ali u defaultnom novom nesto stekucka. Cackam.

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
zytzagoo
mi3.crew


Joined: 25 Aug 2003
Posts: 1842
Location: Zagreb, Hrvatska

PostPosted: 05.06.2009 12:41    Post subject: Add user to your forum ignore list Reply with quote

Fixed.

Provjera "isIE" koju fancybox radi iskljucuje IE8, a nazalost i njemu treba prekopirati child
<param> elemente.

Tako da ne koristim vise isIE provjeru od fancyboxa, nego
Code:

if ($.browser.msie) {

pa se stvar desava za apsolutno sve verzije IEa.

Linija 119 na: http://zytzagoo.net/mi3.tests/dr_hate_fancybox/jquery.fancybox-1.2.1-iefix.js

_________________
[+]I[+]am[+]my[+]own[+]religion[+]
Back to top
View user's profile Send private message Visit poster's website Twitter profile
dr_Hate



Joined: 28 Aug 2007
Posts: 168
Location: Rijeka

PostPosted: 05.06.2009 13:15    Post subject: Add user to your forum ignore list Reply with quote

svaka cast, radi u svim ie verzijama kao urica sad

hvala hvala hvala Very Happy

_________________
imam domenu |stajduhar.org|
Back to top
View user's profile Send private message Visit poster's website
Tristan



Joined: 01 Aug 2006
Posts: 614
Location: Under the sky

PostPosted: 05.06.2009 13:43    Post subject: Add user to your forum ignore list Reply with quote

Code:
mario.clap(new Zytzagoo);


kod govori više od riječi Smile

_________________
Carpe diem...
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group