Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quicktime Link on iPhone an Image instead of Grey Box? 1

Status
Not open for further replies.

dome11

Technical User
Aug 3, 2007
11
US
I created an iPhone version of my personal website, and everything is fine (redirection and everything).

The only thing is that, on the iPhone version, I would love my quicktime movie links to be images, not those uninformative grey boxes with the 'play triangle' in it.

You can see what I mean if you go to
You see that I created a page with different images as hotspot links, so people at least see what clips they click on. But then, instead of the movie starting to play directly, I had to create another page for every clip, with the dreadful grey box on it, for people to click on it again. And when the movie is done, they have to click on a "Back Link" to see the different image links again. It is a mess....

I tried to work it out myself, but I am a newbie when it comes to web programming. One step above an absolute ignoramus... I found a couple of tutorials on the web ( for example), but since I am not good enough with all that stuff (I'm an actor, not a programmer lol), I get confused, and I couldn't get it to work. Tried hours and hours...

Thank you for your help!
 
On the page 'i_vid_reel09.html' (the page with the 2009 show reel), try adding the following code in the SCRIPT block in the HEAD section, directly before the line that starts 'function MM_preloadImages()':

Code:
var ua = navigator.userAgent;
if (ua.indexOf('iPhone') > 0) document.location.replace('Reel_2.m4v');

Then upload that and try the 2009 show reel link on your site from your iphone.

If it works, all you'd need to do is copy the code to your other pages, replacing the 'Reel_2.m4v' filename with the filename of the movie on each page.

If if doesn't work, then perhaps your movies aren't MPEG4 format (is .m4v the same as .mp4?)

However, one thing to note: Is it worth doing this simply to placate iPhone users at the expense of 'normal' browser users? Now the latter group has an extra step to wade through, whereas they would not if you embedded the videos directly into the first page... It's something to think about, anyway.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Dan

Thank you so very much for your help! I really appreciate your time!

You did it! Well, first I added the code to the SCRIPT section. But I had done that before, and it still didn't work (it gave me some gibberish text on the iphone before it crashed...).

But then I took your advice and changed the .m4v extension to a .mp4 extension, and now it works like a charm!!!

Now here is the interesting thing: QuicktimePro automatically created the m4v file when it exported the movie for the iphone. And in my "old" website version, where people had to click on the grey box to play the clip, it worked fine. But with the detection of the userAgent, it didn't work... Who knew (definitely not I lol).

To make it more complicated: Both .mp4 and .m4v are mp4 files. But m4v files open in iTunes by default, and are the ones quicktime exports as when exporting for iphone. BUT: if the m4v file contain a3c audio, and you change the extension from m4v to mp4, you won't be able to play in on a iphone or ipod.....

It is confusing....

Finally; thank you for your advice about the danger of making it more complicated for 'normal' users just to placate iphone users. I had already taken care of that by redirecting everybody on the index page. If one goes to my with an iphone, he/she will be redirected to i_index.html (and then to i_bio.html, i_reel.html etc etc). 'Normal' users never see the i_reel.html page, but they will see the page where the clips are already embedded. Hope that makes sense...

Sorry for the long reply, it's just that I am so very happy that it finally works after so many fruitless hours... Thanks to you!

Dominik
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top