Solved

Using Onload to stream video

Posted on 2008-10-05
10
477 Views
Last Modified: 2010-04-21
Here is the scenario:

I have email to send a notice to watch a video.

Because of e-mail client setting, javascript is disabled.

I do not want to embed the video because of flash loading times....I want to use my streaming service.

Seems like an easy  solution...just <a href> to the url of the streaming service.

My issue is that when I do that, it opens a whole page and shows a video of 247x207...plenty of white space.

Well...I can build a page and nest the video there...pretty graphics, etc....but what I really want is for the small viewer to pop up upon a click in the e-mail.

So, my logic dictates that I need to place the javascript on a webpage, and give the URL of that page.

Upon loading of THAT page, use onload to call the window.open function that has all of the specifications of the video player.

I have the window.open code assembled.

Can someone help me with the onload code?

Again, the logic:

Receive e-mail -->  Click link -->  Go to url that has onload script that will automatically run window.open script--> streaming video service launches and video begins --> the Onload page is closed down, leaving the e-mail page and the small video playing. Again, I have the window.open script.
0
Comment
Question by:3rdLifeWebDev
  • 7
  • 3
10 Comments
 
LVL 3

Expert Comment

by:frindo
ID: 22646666
I think it would be better if you used

<script>
self.resizeTo(100,200);
</script>

which would resize the first window you open which plays the video. Most browsers block javascript which opens windows automatically.
0
 

Author Comment

by:3rdLifeWebDev
ID: 22646706
So if I use that script in the <head> then the page will resize itself?

Then I can stream the video in an <iframe></iframe> with that being the only code in the <body>

0
 
LVL 3

Expert Comment

by:frindo
ID: 22646715
Yep. It's a tiny bit annoying to have it resize on you from a user's perspective, but it does work.
0
 

Author Comment

by:3rdLifeWebDev
ID: 22646718
I will try it.

Thanks for the sage wisdom.
0
 

Author Comment

by:3rdLifeWebDev
ID: 22646729
OK...just tried it.

What code would I use to have ONLY the Title Bar of the new page displayed? I need to ensure that no matter what toolbars the user has, that the Window will always load the same...regardless of toolbars, etc.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:3rdLifeWebDev
ID: 22654065
frindo,

Did you see this last question? If you can advise, I am ready to close this out. Thanks again for the expert help.

I appreciate it!
0
 

Author Comment

by:3rdLifeWebDev
ID: 22664383
Does any one else care to chime in on this subject?

I appreciate it.
0
 
LVL 3

Accepted Solution

by:
frindo earned 125 total points
ID: 22664574
It's not possible to remove the toolbars of a window that is already open. If you need to have the toolbars then you need to load a page and then have the user click a link on that page to open a new window.

Auto loading windows will be blocked by most browsers as popups.

So can either do what I suggested orignally, load a page and open a window automatically (hoping that popup blockers are not too strict), or open a new page and have a link which opens a new window.

Let me know which solution you'd prefer and I'll write some code for it....
0
 

Author Comment

by:3rdLifeWebDev
ID: 22664924
Is it possible to code in the <a> tag (located in the body of the e-mail) that the new window opened should display nothing but the title bar?
0
 

Author Closing Comment

by:3rdLifeWebDev
ID: 31503266
After further research, I accept your first solution as the best.

Thank you for your help.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Javascript create file issue 4 49
Replace &lt; with < 14 57
How can i get the length? 7 18
execute script based on HTML event 7 0
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now