Source language: Translate to:

Javascript Gurus: Help!

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Javascript Gurus: Help!

Postby David de Argentina » Wed Aug 15, 2012 12:57 pm

Hi all,

I'm doing a program to watch internet tv.

The goal of this program is i normalize the tv pages with the same sizes, and, when is possible, clear the ads.

I use this page as sample:

url:
http://www.elgrantv.com/canal9free.html

I discovered streamming servers insert tags into the original html code as you can see on the image 1:

Image

I need handle this code.
On the sample, you can see the new tags that really does the job of show the tv channel.

Image

Usually, this tags does not have Id's.

I tryed with:

var node = document.getElementsByTagName('script')[0];

to get the new root tree... but i can't get the childs of this.

Any ideas ?

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby David de Argentina » Thu Aug 16, 2012 8:42 pm

Finally, I can get the added code.

Now, i get this tag:


<script type='text/javascript'>
var so = new SWFObject('player/player-licensed.swf','mpl','720','440','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('autostart','true');
so.addVariable('mute','false');
so.addVariable('stretching','exactfit');
so.addVariable('repeat','always');
so.addVariable('logo.file', 'http://stremingtotaltv.com/images/stremingtotaltv.png');
so.addVariable('skin','player/skin6/skin.xml');
so.addVariable('logo.hide','false');
so.addVariable('logo.position','top-right');
//so.addVariable('logo.out','1');
so.addVariable('logo.link','http://www.yocast.tv/view.php?live=plusacchd');
so.addVariable('abouttext','yocast Player');
so.addVariable('aboutlink','http://www.yocast.tv');
so.addVariable('file','plusacchd');
so.addVariable('streamer','rtmp://cdn.yocast.tv/yocast');
so.write('player');
</script>

I'm interesting on this line:

var so = new SWFObject('player/player-licensed.swf','mpl','720','440','9');

I need change the '720' and '420' values with '600' '400'

Are there any way to change this line ?

Any ideas ?

Thanks in advance,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Postby Gaev » Fri Aug 17, 2012 5:56 am

David de Argentina:

You might try these ...

so.addParam('width','600');
so.addVariable('height','600');

Another possibility to explore ...

a) fetch the line that creates the so object i.e. ...
var so = new SWFObject('player/player-licensed.swf','mpl','720','440','9');

b) delete the existing so object

c) create a new one with the desired width/height

... the fact that you have to create the object in the iframe might make it even more complicated (to invoke from NeoBook) than it already is ... but if you are already accessing this object (with the so.addParam() commands) then you might already have cracked this issue.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby David de Argentina » Fri Aug 17, 2012 8:39 am

Thanks Gaev,

It was more easy i supose...

mpl.width = 600;
mpl.height = 400;

in fact, i had cracked the webpage. now, the measures, layout and color are correct and no ads.

There are 12 streamers webpage more waiting for me....

Greetings from Buenos Aires,
David de Argentina
User avatar
David de Argentina
 
Posts: 1553
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina


Return to NeoBook Functions - VBScript & JavaScript

Who is online

Users browsing this forum: No registered users and 0 guests