mp4 files supposed to open in flash... plays in Quicktime

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

mp4 files supposed to open in flash... plays in Quicktime

Shadowlurker
Hi guys!

I just found the shadowbox and I must say I love it!
I´m having some trouble though, I have made som movies that I want to display on my website. I already have the JW FLV player. If I only use the JW player it plays the mp4 files just fine, but when displaying it with shadowbox they are played with quicktime...

How/what/where in the shadowbox code do I need to tweak it, so that it will play the mp4 files with flash?

Thanks a lot in advance!
Reply | Threaded
Open this post in threaded view
|

Re: mp4 files supposed to open in flash... plays in Quicktime

mjijackson
Administrator
You need to alter the options.ext object to include mp4 in your flv array, like this:

var opts = {
    // all the rest of the extensions from the source file here...
    flv: ['flv','mp4']
};

Shadowbox.init(opts);
Reply | Threaded
Open this post in threaded view
|

Re: mp4 files supposed to open in flash... plays in Quicktime

Shadowlurker
Thanks a lot! :)
Reply | Threaded
Open this post in threaded view
|

Re: mp4 files supposed to open in flash... plays in Quicktime

Shadowlurker
In reply to this post by mjijackson
Sad to say... it doesen´t seem to work. :(
Anyway, while browsing the JW webpage the playlist catched my eye.

Check this page: http://www.jeroenwijering.com/?page=wizard&example=21 

Is it at all possible to get shadowbox to initiate this player+playlist (and getting the JW player to use the xml playlist to get the files loaded to the player)?
Reply | Threaded
Open this post in threaded view
|

Re: mp4 files supposed to open in flash... plays in Quicktime

Norgoth
In reply to this post by mjijackson
Hi...i have the same Problem, but i cant find the File or Part where i must add this Code-Snippet.

Can you help me to find the right File and Part of it to play mp4 Files with the JW Flash Player ?
Thanks a lot.

Cheers

PS: Sorry about my bad english, thanks.
Reply | Threaded
Open this post in threaded view
|

Shadowbox won't accept ext[] array changes?

Gordon K
In reply to this post by mjijackson
I've been having trouble getting Shadowbox to "see" my changes to the ext array. In this case, I want to display .java class files as plain text (which they are). In my <head> code, I defined the following:

     var sbMimeMap = {
            img:        ['png', 'jpg', 'jpeg', 'gif', 'bmp'],
            swf:        ['swf'],
            flv:        ['flv'],
            qt:         ['dv', 'mov', 'moov', 'movie', 'mp4'],
            wmp:        ['asf', 'wm', 'wmv'],
            qtwmp:      ['avi', 'mpg', 'mpeg'],
            iframe:       ['asp', 'aspx', 'cgi', 'cfm', 'htm', 'html', 'pl', 'php',
                        'php3', 'php4', 'php5', 'phtml', 'rb', 'rhtml', 'shtml',
                        'txt', 'vbs', 'java']
            };

And then passed it to .init along with other options:

                window.onload = Shadowbox.init( {
                        initialHeight:350
                       , initialWidth:450
                       , loadingImage:"loading.gif"
                       , handleException: "Shadowbox error"
                       , handleUnsupported:  'link'
                       , ext: sbMimeMap
                       } );

I tried passing the "mime map" both as a variable, and as an inline array, but with the same result: When I try to pass Shadowbox a .java file, it opens the Shadowbox window but doesn't load the file - and the browser then pops up a load/save dialog over the Shadowbox window, as if Shadowbox has rejected the file and passed it to the browser.

I think this problem occurs only when I invoke Shadowbox via the open() function in Javascript, not when I call it via an  tag. Any suggestions? Many thanks for any help you can offer!!!
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox won't accept ext[] array changes?

blafarm


Shadowbox 3.0.3 is opening my H.264 MP4's files in QuickTime -- rather then my licensed copy of the JW Flash Player

I read and tried the "mime map" solution here:
http://shadowbox-js.1309102.n2.nabble.com/mp4-files-supposed-to-open-in-flash-plays-in-Quicktime-tp1310242p1310244.html

...And here (end of page):
http://www.longtailvideo.com/support/forums/jw-player/javascript-interaction/5930/how-to-get-shadowbox-to-play-mp4-files-with-jw-pla

I've also tried the solution posted here:
http://shadowbox-js.1309102.n2.nabble.com/mp4-files-supposed-to-open-in-flash-plays-in-Quicktime-tp1310242p1310243.html

And, finally, I went into the shadowbox.js and removed the qt - mp4 references -- and that didn't' work either.

My licensed version of JW Player has been copied into my website root directory -- as well as the Shadowbox 3.0.3 directory (of course, with the "licensed" name removed)

It may very well be operator error on my part -- but none of these solutions seem to force Shadowbox to launch my .mp4 videos in the JW Player -- they are always launched in QuickTime.

Any suggestions regarding how I can accomplish this?

Thanks very much in advance.
Reply | Threaded
Open this post in threaded view
|

Re: mp4 files supposed to open in flash... plays in Quicktime

ltooz
In reply to this post by Shadowlurker
If you want the mp4 to play with jwplayer by default, you need to modify the shadowbox.js file. Follow the instruction here.

http://ltooz.com/ltooz341/item/np_shadowboxzip

Hope this helps,

Louis
Reply | Threaded
Open this post in threaded view
|

Re: mp4 files supposed to open in flash... plays in Quicktime

blafarm
Hi Louis,

Thanks so much for your response.  I appreciate it.

Based on your post, I downloaded a version of Shadowbox and DID NOT select QuickTime or WMP.
Unfortunately, it's still not working.

I am using a licensed version of JW Flash Player 5.02 -- and a licensed version of Shadowbox 3.0.3
I have replaced the default "player.swf" in the Shadowbox directory -- with my renamed licensed JW Player.

For the record, I need to use two different approaches for my web development:

I need to use the "Simple" approach -- described at the top of this page:  http://www.shadowbox-js.com/usage.html
And using links that look like this:  Click Here

And I need to use the "Advanced" approach -- described half way down the same page.
And using links that look like this:  http://www.cnn.com

I have been testing Shadowbox with 3 different links -- a "URL Test", "mp4 Test", and "flv Test".
And I have create 2 test pages -- each of which have different scripts below the <head> tag -- "Simple" and "Advanced".
I have copied those "Simple" and "Advanced" scripts at the bottom of this post.

I have loaded the test page on three different computers -- and I have launched 3 different browsers on each computer.

Here are my browser results:

SIMPLE TEST
-----------------
Firefox:
URL Test:   Shadowbox works correctly
mp4 Test:   Shadowbox works -- video opens in QuickTime
flv Test:     Shadowbox works -- video opens in JW Player (correct skin)

Chrome:
URL Test:   Shadowbox works
mp4 Test:   Shadowbox works -- video opens in JW Player (different skin)
flv Test:     Shadowbox works -- video opens in JW Player (correct skin)

Internet Explorer:
URL Test:   Shadowbox works -- but window is 2x larger -- but "stack overflow at line: 0 error"
mp4 Test:   Shadowbox launches -- but window is 2x larger -- video opens in WMP
flv Test:     Shadowbox works -- but window is 2x larger -- video opens in JW Player ( with the correct skin)



ADVANCED TEST
----------------------
Firefox:
URL Test:   Shadowbox works
mp4 Test:   Shadowbox works -- video opens in QuickTime
flv Test:     Shadowbox works --  video opens in JW Player (correct skin)

Chrome:
URL Test:    No Shadowbox -- browser navigates to new page
mp4 Test:    No Shadowbox -- browser navigates to new page
flv Test:      Nothing At All -- browser spawns download dialog box

Internet Explorer:
URL Test:   Shadowbox works -- but "stack overflow at line: 0 error"
mp4 Test:   Shadowbox launches -- video opens WMP
flv Test:     Shadowbox works -- video opens in JW Player (correct skin)



SIMPLE SCRIPT
-------------------------
<link rel="stylesheet" type="text/css" href="MYDOMAIN/shadowbox-3.0.3/shadowbox.css">
<script type="text/javascript" src="MYDOMAIN/shadowbox-3.0.3/shadowbox.js"></script><script type="text/javascript"> Shadowbox.init(); </script>

ADVANCED SCRIPT
-------------------------
<link rel="stylesheet" type="text/css" href=" MYDOMAIN/shadowbox-3.0.3/shadowbox.css">
<script type="text/javascript" src=" MYDOMAIN/shadowbox-3.0.3/shadowbox.js"></script><script type="text/javascript"> Shadowbox.init({ handleOversize: "none", overlayOpacity: ".8", viewportPadding: "1", autoplayMovies: true }); function loadShadowbox(){ // set up all anchor elements having target='_parent' attribute Shadowbox.setup("a[target='_parent']",{ width:200, height:200 }); } </script>
<body
onload='getCookieValues();SetSliders();postcode();recalc_onclick("obj");setValueofBtn();ResetRatings();loadShadowbox();' ... />




Do you have any suggestions as to why this is happening?


Thanks very much for your assistance.  It is much appreciated.

Cheers