473,748 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem getting the length of a rtsp streamed movie clip

I have a problem when I use javascript to get the length and position
of a movie I recieve from a rtsp stream. The length and position is
extremely high and not the actual length and position of the movie.
When I try Real Player and it's methods I recieve a length and position

of 0.
Can anyone see what I am doing wrong?
I have two players that I give the same absolute position. I hide one
and play the other. When the player have almost reached the end of the
clip, I start the clip in the other player, and hide the first player.
That is the idea, and it works on local movie files on my computer.
code :
function changeVisibilit y(id,action) {
switch (action) {
case "show":
if (layerobject)
document.layers[''+id+''].visibility = "show";
else if (allobject)
document.all[''+id+''].style.visibili ty = "visible";
else if (dom)
document.getEle mentById(''+id+ '').style.visib ility = "visible";
break;
case "hide":
if (layerobject)
document.layers[''+id+''].visibility = "hide";
else if (allobject)
document.all[''+id+''].style.visibili ty = "hidden";
else if (dom)
document.getEle mentById(''+id+ '').style.visib ility = "hidden";
break;
default:return;
}
return;

}
/* define function that calls QuickTime's "Play" method */
function PlayIt(anObj)
{
anObj.Play();
}
/* define function that calls QuickTime's "Stop" method */
function StopIt(anObj)
{
anObj.Stop();
}
function changeIfEnd(anO bj) {
var movieEnd=docume nt.movie1.GetEn dTime();
var movieNow=docume nt.movie1.GetTi me();

//Start up the other player 500 milliseconds before the end of the
//first movie
timeUntilSwitch =setTimeout("sw itchMovie()",(m ovieEnd-movieNow-500));

}
function switchMovie() {
PlayIt(document .movie1);
for (var i = 1; i <= 100000; i++) {} //A small delay for startup.
changeVisibilit y('movie1','sho w');
changeVisibilit y('movie2','hid e');
}

Oct 15 '05 #1
1 3326

torbs wrote:
I have a problem when I use javascript to get the length and position
of a movie I recieve from a rtsp stream. The length and position is
extremely high and not the actual length and position of the movie.
When I try Real Player and it's methods I recieve a length and position

of 0.
Can anyone see what I am doing wrong?
I have two players that I give the same absolute position. I hide one
and play the other. When the player have almost reached the end of the
clip, I start the clip in the other player, and hide the first player.
That is the idea, and it works on local movie files on my computer.


If I understand you correctly, your script works correctly for a movie
stored on the same ordinary html server on which the script works.
Streaming the movie in this way is sometimes called progressive
download. The movie is actually downloaded to the viewing browser, but
starts playing after a brief buffering time to allow the download to
get ahead of the playing of the movie. The download is kept in the
temporary cache of the viewing computer and allows the movie to be
played back again without re-downloading the next time you click on the
URL for the movie, unless the temporary cache is erased.

It sounds as if the rtsp stream you mention is the movie on a special
streaming server remote from the server on which you have your script.
A streaming server has the advantage that it keeps a more steady
download stream than a regular html server and limits the number of
viewers at any one time to keep the download steady. It is also
necessary for a stream without breaks, such as live radio or video.
Thus the video can be played back without downloading the whole movie
in a temporary cache as it plays. For example, for a real meida .rm
video file on a streaming server, you link to it through a redirector
..ram file which just directs to the streaming server using an address
starting with rtsp rather than html. Of course the real player can be
used to play other video formats than the Real .rm ones.

I am guessing that when you link to a streaming server, through a
redirector file, you can not access the properties of the movie. In
fact, with a video file on a streaming server, you can not usually even
download the movie to your computer. There likely is some additional
information about this on the vast Real developer site. Finding the
information in that maze could take quite a bit of time.

Oct 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3844
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following beautiful script "http://javascript.internet.com/navigation/toolbar-menu.html". It works like a charm. I made my webpage in frames, where the nav-frame shows the menubar, so whenever I click a link in the menubar, it opens in the frame below. But...
0
2134
by: Dionysusmtl | last post by:
I'm working on a flash portfolio that loads examples of our work (jpgs) into a movie. For example, it started off using an xml list to display certain images but I found it necessary to draw info from the database and pass some variables in the querystring to change the source of the images in the movie depending on which client is clicked. Here is the problem. I have tweaked the code and it should work fine - and sometimes it does. ...
10
4906
elamberdor
by: elamberdor | last post by:
Hello All! Well, I can load in swf's just loverly, but what I have is a sliding menu, with buttons in it, that when pressed, load an image into an empty movieclip. I really just need to know how to target back to the _root of the whole movie. It works great when the buttons and empty movieclip in the same stage or same movie clip, however I need to work out the right script to target right back to the root where i want the image to sit,...
4
3080
by: rajesh619 | last post by:
I'm new to programming. I have created a servlet which retrieves values from the database after a value is put into the HTML page to which it is attached. But during compilation, it shows two errors. Please help me in solving this error. import java.io.*; import java.util.Enumeration; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import java.net.*;
2
3678
by: robtyketto | last post by:
Greetings, I have workable code to allow movie clips to be dragged around. However I can't find an example of a drag n drop where the movie clip has to be placed with a certain range/xy cordinates on a movie clip. For example I have a .gif of a grid of 2x2 squares how do I setup different instances of movie clips for each square to be able to detect when a object and has been dropped into it (A bit like when you can define hit areas on...
0
1624
by: snibliman | last post by:
Dear readers, I am currently making a flash based role playing game, I use flash 8 basic. I am using very simple code to deal with collisions. while (_root.wall.hitTest(_root.pc._x-pc_radius, pc._y, true)) { now first off pc stands for the player character. Second off when you move him instead of him moving everything else moves to create a scrolling world! Now the source code I used had this exact same code. As you guessed there are...
29
4093
by: Chris Riesbeck | last post by:
I have an image with a class and the class defines a clip rectangle. In Firefox 2 and 3, and Opera 9, I can access the rectangle with document.defaultView.getComputedStyle(). But that doesn't seem to work in Safari for Windows 3, nor when I use image.currentStyle.clip in IE 7. Is there a way to do this in those browsers? Am I doing something stupid?
1
5457
by: gusheneshin | last post by:
hi everyone im Using this code to Creat a Movie Clip and load a movie "SWF" into this Flash ------------ stop(); loady._x = 226.4;this.createEmptyMovieClip("loady",5);
1
3000
by: angelicdevil | last post by:
ok wat i m trying to do it get flash to read a xml file and load the titles in xml as a button into the imagetitles movie clip made on stage in flash . so that when i click on a title it displays the corresponding image, name and description form the xml onto the stage in respective movie clips. but its not loading the xml titles into the imagetitles movie clip i m uploading the zip file of the xml that i have at present ...plz check and...
0
8822
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9528
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6792
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6072
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3298
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.