Configure player

Close

WWDC Index does not host video files

If you have access to video files, you can configure a URL pattern to be used in a video player.

URL pattern

preview

Use any of these variables in your URL pattern, the pattern is stored in your browsers' local storage.

$id
ID of session: wwdc2000-302
$eventId
ID of event: wwdc2000
$eventContentId
ID of session without event part: 302
$eventShortId
Shortened ID of event: wwdc00
$year
Year of session: 2000
$extension
Extension of original filename: mov
$filenameAlmostEvery
Filename from "(Almost) Every..." gist: ...

WWDC00 • Session 302

QuickTime: Server Techniques and Scripting

Digital Media • 1:07:38

Learn to take advantage of web server and QuickTime interaction to customize your users' experience. We include discussions on technologies such as QuickTime embed tags, SMIL, CGI scripts, and WebObjects.

Speakers: Ian Ritchie, Jim Batson, Ron Lue-Sang, Matthew Peterson

Unlisted on Apple Developer site

Transcript

This transcript was generated using Whisper, it may have transcription errors.

Please welcome Ian Ritchie. Well, hello, everybody, and welcome to WWDC. I always look forward to this conference every year. The whole QuickTime engineering team always puts a lot of effort into what we're going to be showing you. A lot of different ways to use QuickTime. And also, have a lot of fun with it. I'm encouraged that so many of you made it safely across the street to come over here and join us in the Civic Auditorium. OK. This morning when you got up, or most mornings when you get up, do you find yourself gravitating over to the computer?

turning on your browser, perhaps much to the chagrin of your wife or children, and checking out your customized news page. Mine happens to be an Excite page that tells me what I'm interested in, mostly in technology, some of the sports, the basketball playoffs, follow that. Absolutely no horoscope is on my page.

And yet my sister goes out to a web page, And I think all her page is is astrology and horoscope and kittens and these type of things and noose of the weird. So basically what's going on in these situations is unlike the early days where I'd go out to a web page and it'd be the same thing every day I'd go back to it. Even a few minutes after that I'd go back. It's the same. And nowadays I can come back to some of these-- like Excite or Yahoo, Microsoft. They have customized web pages that change for me every time I come there. So I'm going to go back to these sites more often because it's a better experience for me.

So the way that you've set up your own custom pages and your preferences for your own experiences on the web, we want to show you a little bit today how to do the same thing with QuickTime so that your multimedia experience for yourself or for your clients is much more beneficial.

So I'm sure everyone here has played movies from the web. Typical response is you'll go out and click on one of the trailers or click on a page. And a request is sent from your browser or from QuickTime Player out to the server. Hey, I want this movie. And then it plays and everything's really good. And that's the end of that conversation.

Sometimes you'll be using CGI's and it'll go out, talk to that application, it'll send data down. So we're going to go through some of these techniques that, on the server side of things, and somewhat inside of movies, that you can-- not necessarily tricks, but techniques and the technology that's there today, so that you can take advantage of it. So let's look at a typical URL. This is what you send up to the server from your machine.

And first part, let's break it down. When you're having a conversation with someone else, you always want to make sure that you're speaking the same language. So the HTTP is a protocol that we're using. And we're going to the server at apple.com, so we know what machine we're going to be talking to. And then we'd also like to know what file we're requesting. So when this happens, we get the file back, and that's the end of the conversation. Here's another very common URL using a CGI. Common gateway interface, whatever, CGI. It's an application that's out there on the server that's going to take your request and do something with it.

So once again, HTTP is the protocol that we're using. We're going at this time, the search engine Google, or the search site, and we're asking for their-- search.cgi application running on that server to respond to the parameters that we pass into them. And so it'll take that. It's just an application. It's very simple. And it will run. And then it sends us back something.

Now, usually we don't know what we're going to be getting back. So let's look at a typical request for a web page. We send out, we say I would like my web page dot html, and we send this information up to the server. This is what it gets. And it says, OK.

I now have this data. I'm going to send it to you. But first, let me tell you what type of data it is. This is HTML in the format of text. And then you see after the return, the head, and the meta name, and the rest of it following down. So we know how to respond to this on the other side. Another request, we often get GIFs.

And in this case, it tells us the image is of type GIF. And so now on the client end, we know how to respond to that differently. So the idea here is that we request for something from the server, and then it responds to us, often in predictable ways and often not. Let's go through some of the requests and responses that we can get. I'd like to bring Jim Batson out. He's our chief QuickTime architect, longtime friend, and the guy leading the QuickTime effort now.

So now we're going to talk about things that relate more closely with QuickTime. So let's skip the redirect for right now and go down to some of the MIME types. Now the first two are common, just binary versions of data that will come down that you play inside QuickTime. There's video slash QuickTime, which says it's a QuickTime movie. Please play it.

Image, xQuickTime, is for image.qti kind of files, QuickTime image format files. And there are the other ones. So We'll skip the binary ones, because those are typically hard to generate from a CGI script. Instead, we're going to talk about things that are more natural to CGI's. And the first one is a redirect, where you go to one place and you jump somewhere else. And the other three are text types. There's HTML, plain text, and small files. We're going to go over those individually. So let's take a quick look at what a redirect looks like.

So what'll happen is you do a request, and in the head of the request you say, I wanna go some player specific. I want this file from the net. In this case it's from QuickTime.com. It's imagine we're calling a CGI, randomMovie.cgi, and we set it the parameter genre is comedy. And then a redirect could just come back and say, well, Instead of the URL you originally thought, go to this one. In this case, a movie with Laurie Anderson. So how does this happen in an HTML request? First there's the request, and in that is, once again, here, mywebpage.html.

And what comes back is a 302 redirect, which is in the header of the response. And here we can see there's the location. And it doesn't have to stay on the same webpage, excuse me, the website or server. It can go totally somewhere else, in this case, xyz.com, and different file name. Okay, so we're going to show an example of redirect here.

First I'm going to go ahead and get demo machine one. Great, thank you. OK, I'm going to just open a URL. And I'm gonna drag and drop here. And so let's look at that request. First of all, HTTP. Here's the server. and here's the CGI we're running, which just happens to be on this machine here, and here's the parameter to that. So it sends it and redirects to this movie. We'll play it. A leader has to be able to take responsibility without letting it turn his head. Now, some fellas, when given a little authority, they seem to change. Some in one way, some in another.

Okay, so let's open that same URL again. It's time to get redirected somewhere else. I know, dear, but I'm thinking of something else, too. It'll take a little conspiracy. Conspiracy? A nice little conspiracy. Okay. Of course, we can just keep doing that over and over again. We'll just get another movie. This contemporary home shows how modern asbestos materials can be adapted to any style or design. Notice how the asbestos cement side walls help add dignity and charm. So back to slides, please. So hopefully that was informative as well as entertaining. Back to slides, please.

So let's talk a little bit about the text data that comes back in the form of HTML. So HTML is the format that you get data for a web browser. So how does that relate to QuickTime? Well, QuickTime will play inside a web browser through a web page with href tags or embed tags.

And embed tags are what you use to actually embed a movie right in the middle of your web page. So you see that all the time, right? You go to movie trailers, you play a movie, it'll come down. So the standard form of the embed tag is embed source equals, and in this case, the name of the movie, hip.move. Okay, so what can go wrong? Well, QuickTime has to get the movie, has to get the data in order for us to actually see the movie and play it, and hopefully life is all good. But unfortunately that's not true, put in all cases. There are two reasons you might not get that. One is that QuickTime's not installed at all. And the second is that someone's hijacked the MIME type.

Okay? And the user's machine is not properly configured, and instead of QuickTime getting the movie, video slash QuickTime then goes, jumps off to some other application that can't even read that movie. So let's take a look at solving that first problem. How do you check for QuickTime on your pages? First thing you can do is you can just run some JavaScript, okay?

You have to figure out what OS am I running on. So your choice is Mac or Windows. If you're on the Mac, then you need to check the browser, okay? and then if you find out you're running Netscape or IE5, then you can run some JavaScript to check for the plug-in.

And then if you have the plugins there, you know you've got QuickTime installed. If it's not there, QuickTime's not installed. Now in the case that it's not IE5, or some earlier version of IE, you can just assume yes on the Mac platform. 'Cause the other choice is just say, "Well, I don't know what to do."

Now on Windows, slightly different situation. On Netscape, you do the same thing. You can run some JavaScript to check your plugins. It's kind of cool that the same technology, technique works for both, but not for IE. So for IE on Windows, what you have to do is, until QuickTime 4.1.1, you're kind of out of luck, okay? Because there was no way that you could really see if QuickTime was installed. With 4.1.1, we've shipped an OCX called QuickTimeCheck, which you use to invoke, actually instantiate it from a VB script and call it, and that will do the checking for you, and it will return that, well, QuickTime is installed or not. So this has answered the question, is QuickTime around at all? So the next thing you have to do is worry about is it configured?

OK. And there really isn't a great solution in terms of making sure the machine's always configured for QuickTime. And so you can just use source equals movie. And the problem is that there's no real web etiquette for MIME-type management. What will happen is that whoever installed last wins.

So the solution we have is to kind of work around the problem by using a file type that you ask for, which at this point anyway, no one else has hijacked. So that type is the.QTS file, the QTI file, excuse me. So what's happening, if you look at the embed tag, is that you say source equals some file name dot QTI. Now this file doesn't actually have to be an image.

It could just be zero length. It just has to exist on the server. And then QT source. In this situation, then, the plug-in will get it. And then with the QT source added to the embed tag, QuickTime will play that movie. So now that you've been able to actually make sure QuickTime's going to be invoked with your embed tag, there's some interesting things you can do. There's a whole list of different kinds of things you can add to your embed tags. But one of the cool ones is QT Next. So the first example here is it allows you to just chain movies. So you can easily put together a little page that then will play movie one, two, and three, and stop. There's all sorts of things you can do. And the second example is where you say, doing the same kind of thing. I'm going to start with an intro movie. And then I'm actually going to call CGI, which will generate a random movie. And then the special interpretation of goTo1 will then go to reload Qt Next 1.

So what will happen then is then we'll just play the movie again. But this time, since we're using a CGI that we just showed before, you get a long playing, infinitely long playing movie inside the browser. Can we go back to, go to demo one please? So first let's look at the HTML page.

And here it is, standard kind of HTML looking. Probably a little bit light for everybody. And here it is. Here's the source. We're just using QTI to make sure that QuickTime gets a chance to play the file. And here's the real movie. It's that same CGI we were using before. And one thing to note is that width and height applies to source and QTSource. If you're in a situation that QuickTime isn't there, the source file will try to play. And in fact, what will happen is you'll get a broken icon. That's why it's really important to make sure that QuickTime 4 is installed on that machine. And this will just reload Qt source. So go ahead and play that in the browser.

This is the American dream of freedom on wheels. An automotive age, traveling on time-saving super highways. Futurama's free-flowing channels of concrete and steel. For while metal coins are handy for dealing in small amounts of money, when transactions require larger amounts, paper money is far more practical. A five dollar bill, for example, is much easier to handle than, say, five dollars in dimes. And just imagine buying something that costs $100 and paying for it with $0.0010,000. Important information for all to keep in mind. Back to slides, please.

So let's go back to some of the other types that we talked about that are really applicable to CGI's because they're textual in nature. And the next one is-- text, plain text that will come down. This is very similar to just having a text file on your local machine that you just then open with QuickTime Player. QuickTime Player will import that file and just show you the text. It was first kind of started for doing subtitling. And but the text can be styled, have color and size, and do other interesting things. And actually, Ian's back up to show us, because he's the master of all text movies. I remember a few years ago I met a bunch of developers at a conference, and they said, oh, you work on QuickTime. That's cool. Oh, text, huh? Well, someone has to.

And I, I tried to feel good about myself. Actually, there's, there's an awful lot of text in everything that we're doing with the Internet these days, so there's almost a resurgence of text inside of QuickTime. And some of the stuff has been laying dormant there that you can take advantage of. Let's show first a simple text file with simple text. And let's open up QuickTime Player and import this file.

And typically what you get is the 12-point Helvetica text. You know, you can go from one slide to the next. And typically we used it for closed captioning, or for subtitling your text. But you can go in and add a lot more to the text. Up here, it's a little bit complicated, but you can create your simple text file and export it with the text descriptor settings, and all this will play out for you. And we also have a web page up that will show you how to use all the text descriptors. But the idea is, I took that same text that we had, and we went in here and we added different sizes. Like we can make this one-- Make it really big. And then you can change the text color.

We can make it all red. So then when we take this file and import it into QuickTime again-- It just takes on the attributes of whatever you put inside the text file. The great thing is your CGI's can automatically generate text real easy, and in this format, and pass it down into QuickTime. And it can be embedded as data, or it can be tagged as of type move. And we'll just play it automatically as though it's a movie. You'll see more on this later being used in the WebObjects demo. Each one of these have URLs. associated with them. So if you click on them, it will go to various URLs, or in this case, go into WebObjects CGI, which you'll see more on that later. OK, Jim.

OK, now we're going to move on to Smile files. The other type of file that will come down for you that's really useful in the context of CGI's and server side stuff is Smile. Because Smile allows you to create presentations where you compose the temporal data, okay, so you can play movie after movie or image after image or lay out audio tracks in any order that you want, and also spatially for image-related things. So let's take a quick look at the structure of a smile file. For, if you know anything about HTML, this looks pretty familiar. Smile is XML-based and thus has, pretty related to HTML. So you see there's a head and a body inside of a smile document.

And typically in a head, you'll have a layout area which describes the presentation area. There's--if there's no visual aspect of it, there--you don't need to have a layout area. But there's a root layout which defines the complete enclosing area. And then you have to define regions inside that root layout that you have images or videos play into. And so what you can do is you can have one root layout and create a bunch of different regions and then play into them.

Now, inside the body portion is where you say what media you're gonna play, okay? And... In this case, we have a couple of videos that are playing in sequence. The default in the body section is that this is sequential playback. So first intro.move will play, then main.move will play.

So that's an implicit sequential block. If you want to make it explicit, you just add the seek tags. And once you have this section of seek, it becomes like its own block. That will become evident later. Now, if you want to do something where you do things in parallel, use the pair tags. Here we have an image, the picture.jpeg, that's being displayed at the same time we're playing audio. And instead of using image or audio, you could put in a block of sequence-- of seeks, of a sequential section, and just play another sequence of stuff. So we're gonna go to demo and do a quick example of smile.

Depending on what state I'm in, I'll-- more of a lot of-- OK, so here's a relatively complicated one. I'm going to go ahead and tear this down a bit and just create something which is a little simpler to start with. One thing that is kind of interesting with smile is that anything that's past the /smile tag is supposed to be ignored. So we can go ahead and throw a lot of this stuff away. And what I want to first show you is kind of like a very simple-- that all it's going to do is play some audio. Okay, so I just save that. I can open it. And we can play it.

this section you'll notice the chapels change over So this is one way to set up the slider inside of a smile document. Let's go back to the full-blown thing here before. And we'll take a look at this. There's a lot of these extension tags we'll talk about in a minute.

Here's the layout information in the head section. We're using a meta tag here to give it a name. And we just have one region for an image. And here's the image down here. So we have a sequence of audio tracks. And then in parallel, we're going to show an image. All I have to do is save it, go back out, drop it on QuickTime Player, and here we have basically an album cover with the tracks in there, and we can use the chapter tracks to go between the tracks.

So there's go back to slides, please. Now, there's the basic layout of ordering your media, putting it on the screen, and also just in time. QuickTime's added some extensions to Smile, which we find really useful for doing QuickTime presentations. And how that gets expressed in the smile document is in the smile tag at the top, is you have this XMLNS, which means XML namespace, and you're saying, giving it a name. Here it's QT. And then you have this URL, which then specifies that extension uniquely across different presentations, so between any smile file. Now the QT is something that you get to make up. I conventionally just always just use QT, but you can make that foo. And then when you use that down below, and like for the autoplay, so saying QT colon autoplay could be foo colon autoplay.

And so what are some of these extensions? There's some attributes that apply to the root, which is to the whole presentation. There's autoplay, which says when I open the movie, as soon as you can, start playing it. There's next, which is just like QT next that we saw in the embed tags for HTML pages. There's time slider, which lets you control whether to use the time slider, because sometimes, depending on the kind of presentation you put together with the smile file, You see in the time slider, it's very confusing, it's very erratic, and so you just don't even want to see that. The things that we've shown today are, you know, they make sense, you can see the time slider, but sometimes they don't. And there's chapter mode that says, when you give me a time slider, give me something which is for the whole movie, or only show me the slider for when I'm inside this chapter. So I'll see when I'm at the beginning and end of the chapter, and when I go to the next chapter, I'd go back to the beginning of the time slider.

There's also media attributes that you can set, which you can have our attached time base and chapter. Attached time base is used when you have something like a sprite movie or a wired action movie that you don't want a time base attached to it, because then they'll just confuse the movie. And there's also chapter, which allows you to define what the chapter name is. And that's how the pop-up-- not the pop-up, but the chapter names work in the controller in the previous example. You can also do anchor tags so that you can click on an area and then you'll jump to a URL. And the other very useful one is a target of QuickTime Player. That way, wherever this movie is played, if it's in the browser or your email app or whatever, you then click on it and then you launch, go to URL, it'll open it in the QuickTime Player. OK. We'll show this a little bit more in smile.

Here's an example which actually defines three different regions and puts in-- so we have left half, right top quarter, right bottom quarter, and then it's using href tags. And this is all shown in parallel, so-- play it, you can see that you have the three regions, and these are actually click-throughs to those places. So if we click here, actually go to the page. It's critically low, I wonder why. Okay, so, and then finally I want to show you an example which kind of ties us all together.

Here's a smile file that does something you might not expect. But this is an example where it kind of all these different things we've been talking about together. The small file is actually just laying out two movies. This bottom portion of the movie is a wired action movie. And so I can-- Click on the button and things change. Notice that every time I get to play, a new movie comes up. So that's actually using that redirect technique by going to the CGI and saying, give me the next movie. And let's play-- You can increase your profit. You can bring many potential customers into your store. You can add dollars to your volume.

The interesting thing with this guy is that we've got these thumbs up, thumbs down buttons. So you can say, oh, I like that movie. which then sends another CGI request of the same-- another request of that same CGI, which will then tell us how many other people like the movie. And this is actually coming back in a small form with some embedded text, which gives us some formatting capabilities and some colorization of the text. So we can go to the next one.

Okay, so we'll go ahead and click here. And you can see that it's live by, well, we're the only one that watched it. So let's pretend we liked it this time. So we just click here, and it loads it again. It just changed. OK. Back to slides. And I think it's time for Ian. Thank you, Jim.

As you've noticed over the last few years, in particular in this session, QuickTime has taken a lot of steps to take advantage of people being connected to the web. Here at WWDC, the WebObjects team has, I believe, 18 different sessions going on. And we are lucky to snag one of their engineers to come show us how they've-- written some small export components and tied it in with WebObjects and interact with QuickTime. And there'll be more of this shown in tomorrow's interactivity session, but we asked him to come give us a glimpse here. So if you could welcome Ron Lue-Sang, WebObjects engineer. Thanks Ian. So I started off with WebObjects and wanted to hook it up to, to QuickTime using Smile. So I wrote a simple little framework, semi-simple, that actually brings all the power of WebObjects and all the power of QuickTime together using Smile.

So putting them together, we have the, we have what I call client server movies. So what I want to show you is how I got WebObjects talking to QuickTime without necessarily using any smile, but generating QuickTime compatible content. Some of the QT text stuff that, that was shown earlier. And the point of this was to actually bring some interactivity to the client just by making the movies dynamic and talk to the server. Whereas the WebObjects and stuff that I did was kind of geared towards generating the movie dynamically versus having dynamic movies. Two opposite, two different things in my mind. So, So let me show you on demo one here. my idea of making movies dynamic. Let's see if I can get this up. So I've got Live Stage Pro here. demo version of Live Stage, and got a movie track and a sprite track.

If you can see here, there's a little icon here. That's the actual sprite. The whole--the sole purpose of the sprite is to go out to the net and load a movie. The URL that it goes to, actually, is the URL of a WebObjects app that I've got. running. Simple little thing. A lot of you probably know how to do this already. Let's see, so And the cool part about this is each time you click, you'll end up getting a new movie.

So, is it an extra six? Oh, thank you. Lovely demos. Okay. I can show you this. I have my app running here. And what should happen is but isn't happening. Hello. Well, OK. What should happen is that each time you click, you bring up a new movie. It's similar to what was shown before, but talking directly to WebObjects. Demo errors. Oh well.

OK. Back with the slides, though. I can, so that's, what should have happened there was, every time you click, it goes out to the WebObjects application. The specific URL that the sprite action, the sprite invokes, or goes to, is a trigger to WebObjects to go into the database, look for all of the movies with a certain genre, and then, oh, Okay, back up a little. So I've got a small database here where I've put in some information about some QuickTime movies that I've got on a streaming server. So things like the title, the artist, duration of the movie, and URL on the streaming server to go to. Could I have the slides back up, please?

So what WebObjects will do, that URL triggers some logic to go through the database, find all of the movies that are pop rock music videos, and deliver one of those movies at random back to the, thank you, back to the QuickTime engine, so in live stage. Let's see. So for dynamic movies, my idea is that the user asks for the resources and talks to the server, versus dynamically making movies, creating movies dynamically on the fly, where the layout of the movie, the resources of the movie, change depending on some state, either user defined or something in your business logic, in the database, of day, you know, shades of the moon, all that stuff. So back on demo one, and demo, actually demo four, please. Thank you. So this is my WebObjects application. The main thing is there is a framework loaded-- navigating windows, beautiful.

So how many of you are familiar with WebObjects, actually? Oh, good. Very cool. Have you guys tried connecting QuickTime and WebObjects before? How many? Ah, very cool. You're on the right track. Very good. Um... So... So what I've done in my framework, I've got some code and some resources that actually implements a lot of the elements in the Smile spec. A lot of the classes, the root layout, regions, media elements of the media objects. And what this lets you do is build an app, a WebObjects application, include this framework in your web app, and you're able to layout Smile documents using our very cool WebObjectsBuilder. So here's a video page I've got.

It's already up. Now, the unfortunate thing is, because WebObjects was kind of, and WebObjects Builder is kind of geared more towards, originally geared towards developing webpages, the UI for XML isn't that great. But you can see here all of the elements that go into my smile movie. And what happens is a lot, a lot of these elements are bound at runtime to things in your business logic, you know, on the app server side. So here I can figure out the artist and title from the database. What the next song is.

URL for the next song. And you get a lot of this stuff for free with WebObjects, whereas you could do it in CGI's normally. You get things like session management for free, using WebObjects. You get things like resource management, connections to the databases for free, being able to tie in a lot of really advanced technologies into the cool QuickTime technology that we've got. Let's see if I could have the slides, please. Thank you. So.

There we go. So that's the whole point of trying to use WebObjects to generate smile content for QuickTime, using WebObjects as your server side scripting solution. I'll actually have the framework and a working example up on enterprise.apple.com/wwdc2000 about Thursday. I've actually got another session, a WebObjects specific session 4.11, if anyone's interested for going further into detail at how WebObjects is doing all this stuff and larger examples of using QuickTime with WebObjects. And plus, because WebObjects is now on sale for ninety-eight percent off, there's no reason to not try it out. You should go out and, you've all got demo versions of WebObjects, and once you pick up my framework, you should be able to try this out, I think you'll be very happy with it. With that, I'll hand it over. Thank you. Thank you, John. Excellent. So when you think about it, 98% off. We're all going to rush out and buy one right now. Just think of the gentleman that bought it Friday.

Like, yeah. And that purchase order is going to come through in six weeks. He's like, a lot of explaining to do. sure they'll figure it out. So some of us here in the QuickTime group have written-- in fact, Kevin Calhoun wrote a CGI with HyperCard, which is some things that you can do today with very-- I wouldn't say basic tools.

It's actually pretty extensive. But a longtime friend, I guess, is how you think of HyperCard. And so you can see that tomorrow in the interactivity session. We'll show slides afterwards for the roadmap. with a lot of excellent things that people are doing with Smile and using QuickTime. So we look forward to that. And get it in the hands of you guys, because we thought-- in the QuickTime group, we sort of looked at it as-- Not the rogue group, but sort of that connotation within Apple, that you go out and do your own thing, and you're thinking out of the box. And we thought we were a bunch of crazy and sometimes clever individuals. And then we come across a gentleman that's more crazy and more of a lunatic than any of the rest of us on the team. This guy just takes quick time to the next level. We go, man, you're just insane. I mean, it's great, brilliant, wonderful. Definitely thinking out of the box. And this individual is Matthew Peterson, a neuroscientist from Berkeley. And we'd like to welcome him now to show us some things he's been working on.

It's pretty bright out here. I'm going to get a suntan on the back of my neck. Apple. So I'm going to be talking about QuickTime applications. So I'm not gonna be comparing QuickTime to Reel or Windows Media Player. It's more on the same par as Java and what you can do with Shockwave. And, and mostly what I'm gonna be showing you is just a bunch of demos.

So what is a--what is a QuickTime application? Well, here--the quintessential desktop accessory is a calculator. So this is all a QuickTime movie. and it has these extendable regions, and it can do tangent functions and square roots. Um, so... this is just to show, this is all, and also all what I'm gonna show you, all the movies I'm gonna show you, were all done, all created with Live Stage, Live Stage Pro, and you should get it if you wanna do anything like any of this stuff I'm gonna show you. Um, so... This top, today's topic is how to interact with the server.

How does QuickTime movies interact with the server? So this doesn't really interact with the server. But I'm going to, oh here's another little application. It's a little URL launcher. So let me launch up a freeze here? Okay. So this is coming off of France. So maybe it's a little bit slow. Um... Are you still there? Okay, good. So this right here is a little clock. And, um, how does this clock interact with the server? Well, I can set the alarm.

And if I close the movie, and I reopen it, should remember my setting. So it saved this into a little cookie. There's a lot of ways that you can have a information in the movie saved. Either it can be saved on the server, saved locally in a cookie file, or it can-- you can actually-- there's ways to save things on little text files on the local drive. And I'm going to be getting a little bit more into that.

And one other way to pass information to a movie is what I'm gonna show you in here, is... Zero. There's not very many ways to communicate with a movie, but one way is you can just send, have the server send you a little movie. So in this, in this one, this little, this thing right here, this is a, this is a movie that contains a bunch of sounds for each number. And when I type in a number here, Can we increase the volume for that? Did you hear that? I don't think the volume is working here. So let me enter a number.

87.6. So this right here is this text field. This is a HTML text field. And then when I type in a number right here, 87,425.5. It requests a small movie to be sent, and that movie passes information to this top movie, which is a bigger movie and contains all of the sounds, and also the logic to put the sounds together to speak out this movie. This is something a little bit more-- so this is used in conjunction with this next thing I'm going to show you.

That's correct. This right here is, oops, it's not coming. OK, good. So this right here is data coming from my lab in UC Berkeley. And it's being passed into the movie. Instead of, in the other demo I just showed you, the movie was being passed into a little frame. A little, you can make that invisible frame, but I let you see a little blip of the QuickTime loading. In this one, data is being passed directly into the movie, into a movie file. It's not a movie file, into a movie track. And the server just keeps on passing data into that movie track, and that movie, that data gets sent off to a local sprite track, which calculates the height of bars, and it puts those bars up on this graph. And in this way I can monitor an experiment from anywhere in the world.

And in fact, I can also turn off the CO2 in my experiment, and you can watch the change of that. Instead of plotting temperature, I can change plot pulse I can change the humidity and the stroke. And this is all a movie. This is all, like, just a QuickTime movie, and it can run anywhere a QuickTime movie can run.

Next thing I'd like to show you is, all these things are little applications, and a lot of you maybe aren't interested in having QuickTime work as an application. But you are interested in having QuickTime show movies, which is what it was originally intended to do. And why would you want to have all these application features in just a normal movie? Well, what I'm gonna show you here is something I developed with iFilm. And this movie is an intelligent movie. You haven't purchased this movie yet, and so it knows that. And as soon as you launch this movie, it says, do you want to watch the preview, which it allows you to watch?

would you like to purchase the movie? So let's purchase the movie. It goes off to a web page, and I hope this is a little bit quicker this time. Maybe not. So right-- it's usually faster. So right now it's launching a URL on my site, and it's going to give you a web-- a form to enter in your credit card information. Let me take out my wallet real quick.

And you can purchase this movie. And in fact, the other movie doesn't even have to be open in order for me to purchase the movie. Let me enter my name real quick. Good, now, all right, my cut-head number. Purchased it. And now my movie has been purchased. And now this machine will be enabled to watch this movie.

movie it says watch movie and now you can watch the whole movie and fast forward rewind change the volume Things like that. So this is putting application into just a, so it gives you a DVD style movie and it talks with the server, says is this computer enabled to watch this movie, and therefore we've implemented pay-per-view downloads all within the QuickTime applications, all within the QuickTime framework.

We don't have to invent any new media type or any new methods like Microsoft is doing. All, QuickTime already has the ability to do all that. It's got all this wired sprites and the ability to talk to servers, and you can build custom, novel applications that other people haven't built before. Here is something where a movie actually returns something to the user. So that one, the server was talking to the-- the movie was talking to the server to see if this computer is allowed to watch a certain movie. And what I'm gonna show you right now is the server is going to return a file to the user based on what the user does. So here, this is a simple drawing program. Just make a little interesting drawing. There, how's that? I'm not an artist. There you go. And then when I click on this PDF button, it should load-- oh, state file.

And it just saved the file to my disk. And that was the drawing that I just-- launch Code Warrior. Sorry about that. And there's my drawing. Now, a drawing is, yeah, sure, there's a lot of things that can make drawings, and, well, not that many that can write PDF files unless you have a distiller on it, but there are lots of drawing applications. Why would you want to have QuickTime do your drawing? Well, you don't have to do a drawing.

You could design, like, a T-shirt, and the person says, oh, I want my logo here, and I want this here, or greeting cards. They want to have, like, business cards made up, and they said, I want my logo here, I want my name here, and they can do all that within a QuickTime, within a QuickTime movie, and say, "Click this, "I want that," and they send you back a PDF, say, "Is this what you want?" You say, "Yes," and they produce it and send it to you. So there's a lot of e-commerce applications for this. Basically, a movie can send something to the server, and the server can send you back a file, and that opens a lot of doors.

But why would you want QuickTime to do that? Well, QuickTime has a unique property that it is, I'm going to make a new word that I coined last year, is ploppable. It's the most ploppable thing I've ever seen. You can take a movie, you can stick it into a PDF file, you can stick it into a word processing file, you can stick it into a web page, you can stick it in all these places. You can't stick Java application inside of a PDF, well, maybe you can, but not at a standard Acrobat reader, you can't stick Java in a PDF file. You definitely can't stick Reel in Windows Media Player. You can't stick many applications. But, or, so here's an example of using my drawing program in a real-world situation. Let's see, where is that? you In this application I'm using at UC Berkeley, I'm a neuro... scientist and I study how the brain works and one of the things that we need to do is we need to know where for medical applications we know where they're where a lesion is inside of a image of a brain and there are people that are experts at finding lesions in slices of brain and so those those experts aren't necessarily next door sometimes they're across the country or across the world and you'd like to send of a slice of this cortex and say, where on this cortex is a lesion? Where does it start and where does it end? And these people are often busy and so if you tell them, will you please launch Photoshop and draw on there where you think the lesion starts and ends, save this Photoshop file and send it back to me. It'd take weeks to do that. But a email, and here they can draw, it says, that lesion started there, ended there.

This right here is the border between area 17 and 18. That's what you wanted to know. If I made a mistake, you can undo it and say, oh, it was really here, and then submit it. And when I push that submit button, it sends the information to my database. It doesn't send anything back. It sends the information to my database and automatically updates the database, and it a couple of seconds and it's push technology right inside the person's email client.

That's why you might want to use QuickTime to do applications. Okay. Where are we now? Looks like I'm going fast. That's okay. So I'm gonna get, okay, another place you can put a QuickTime movie is in a PDF file. Here's a PDF file from my friend, Joe Nowak, who will be entering the demo in a little bit. And he said, okay, I got your Lego robot ready. Everyone knows what these Lego Mindstorm robots are, right? How many people here have one of these? Okay, cool. You'll like the demo coming up. So he says, I got it. And when you're giving this talk, just page me. And to page me, just click on this button. And here's a little QuickTime type in a thing, so RoboTime. And I just hit Enter, and it says, oop, page set. And so this is a simple little application that talks to the server, and basically it's using a little email module that I have that I use with QuickTime. So you can actually make a whole email client in QuickTime if you want. But here, this is just a little pager. that person can send you a, like a technician can send you little technical specs on something and say, if these aren't right, just page me and tell me what, or like, just page me and tell me what your phone number is or something like this, and put that into a PDF file, put that into a word processing file or into the email client. They don't have to give you their pager number. And also, I can have it so that it only works once. So you have one time to page me and that's it. And then leave me alone. So, so you're saying, OK, you can have a movie talk to a server, and you can have a server talk back to a movie.

Can't we have interactive games in QuickTime? Two people on different QuickTime movies, both talking to the servers, servers talking and telling you what each other are doing. And sure, you can do that. So here is a, this is not a game, but this is a little chat program that I made completely done in QuickTime. See how many people are on this chat.

Nine people. Joe, see there's RCX Joe. He's sitting on there waiting for me to come see what-- Bruiser didn't have much to say. So, um, how is this useful? Well, again, instead of putting a PDF-- putting a pager inside of a PDF document... You can stick a chat. These guys are taking over. How do we know? They don't believe me. What? Of course you... Okay, the audience says hi. Did you say hi? Say hi.

So you could put a chat client in a PDF thing, or you can put a chat client within a movie, within a streaming movie, a live streaming movie. You can have-- MTV could have this new band replacing NSYNC, and they're going to have this new live video. And you can talk to them while they're performing the video or whatever. I guess they don't perform videos.

So this is a pretty powerful thing, and it shows that you can have interactive movies that are more than just a one user experience. You can have multiple people watching the same movie and interacting. They're using color. And one cool-- so I'm going to say goodbye, guys. So one cool thing about this is that you can have custom interfaces that are pulled in on the fly. So when I click that Info button, it pulled a new movie off of the server stuck it into that frame. And this movie can be any, any movie that, it could be actually a whole nother chat client, right, inside this little frame right here.

This is a movie in itself. Um, I'd like to thank Brad Smith for helping me make these nice Aqua graphics. Um, and so when I go back to the chat, everything should be still there. Um, alright, so now we're going on to the um, Now the LEGO Robot demo. here it comes. I'm going to close this. I'm going to exit. Oh. I just love quick time. Thanks Joe. Okay. So I log off. Now, okay.

I'm about to show you here, is gonna blow your minds if you guys like LEGOs like I do. So what I've made right here is a, well, I don't have the whole interface here for you, but what I, what we've made is a complete LEGO programming interface all within QuickTime.

Many of you know that when LEGO decided to come out with their fancy Mindstorms robot, they said, oh, we'll just make it PC only. And they came out with a Windows version of this Lego thing, and Onnit CD didn't have any Mac version, which made me mad, since I was one of the first people to get one, and I don't have a Windows machine. I said, I can't program my Legos. So I built a QuickTime Lego programmer. And it has all the same functions.

And it's a little buggy, so I didn't put the whole thing, but I have two pre-built movies. Very simple. I didn't want anything to go wrong, so I just have to go forward, on, turn the motor on, wait for a little while, and turn off. There's the first movie. Let's try it. OK, let's see. Program 1. Here it goes, loading. Run.

Oh, there it goes. It took a couple of seconds. Oh, Bill Gates. Wait, what's he doing there? He says now, now he's sad, because now Mac people can play with robots remotely. I have to tell you that this, this streaming server is coming from Chicago. My friend Joe is in Chicago, and he helped me set this up. And this robot is also in Chicago, obviously. So let's run that program again. It was a little bit faster. So this shows that the program downloaded, and it should get executed. Oh, there's, who's that, Janet Reno? And now, um, let's go the other--reverse direction. Program two, it says turn the motors to reverse. On, wait.

and turn off. Go back again to Bill Gates. Okay. So, um... basically... ten minutes. It's close enough. So basically this is what I had to show you. And I hope that opens your minds a little bit about what QuickTime can do, and the possibilities, and how you might want to use QuickTime, QuickTime in ways that you haven't thought of before. And it can talk to a server. And it does it in a most awesome way.

We didn't let you down, did we? The guy's incredible. And on behalf of at least four QuickTime engineers, myself included, we ran out and bought the LEGO Mindstorms when it first came out. And we also have the boxes sitting around our offices going, OK, now what? So thank you, Matthew.

So to recap, a lot of what we discussed today you can find in Steve Gooley's book, Quick Time for the Web. I'm usually not a salesman pushing this, but this is like a great book. I have a torn up copy in my office that was before it went to press and all kind of pages all over. It's Quick Time for the Web, and this is just out. And it comes with CD and examples in the bag. It's just wonderful. I highly recommend it.

So a few more QuickTime sessions coming up later this afternoon and tomorrow morning. There's actually another one tomorrow afternoon. And WebObjects, like I said, every day, all day, in Hall J, You know, drop by, pick up your copy. Oh, so in case you have questions about this, and you go, ooh, I want to know more. I'm all excited. I want to control my robot across the country, you know, and maybe make a submersible. Contact Jeff Lowe. with the impressive title of QuickTime Technology Manager. He will answer all your questions and direct you in the right path. And thank you for coming.