Jump to content

center a youtube movie window in web viewer


hartmut

This topic is 5448 days old. Please don't post here. Open a new topic instead.

Recommended Posts

It is so nice to be able to get a movie into webviewer. The problem is you always have to scroll to get the movie centered. Is there any way to script this so we can find an exact location on a web page that has all their objects in the same places each time?

Thanks

Link to comment
Share on other sites

HELLO

I have not had any responses to this post. I wonder why. I am writing this to see if anyone here interested in centering a youtube video within their webviewer could write a request to help us filemaker people use it in our databases the way web devs. use it on their web pages. They can give you an embed code for a web page. I think they might be able to do that for our webviewers. Maybe if we all write in to them it could happen.

[email protected]

Link to comment
Share on other sites

Hello

Just me again. I found a javascript someone has developed. I am not sure it works with safari. I don't know how to enable another browser to work with webviewer. but this is at least a script ( I have no idea how to implement it) I found at :

http://userstyles.org/styles/1504

// ==UserScript==

// @name YouTube Video Only

// @namespace http://userstyles.org

// @description Removes everything except for the video and title on YouTube. Inspired by Youtube - Just the video please by pile0nades

// @author Stupid Head

// @homepage http://userstyles.org/styles/1504

// @include http://www.youtube.com/watch*

// @include http://youtube.com/watch*

// ==/UserScript==

var css = "@namespace url(http://www.w3.org/1999/xhtml); div:not(:first-child),td:not(:first-child),#logoTagDiv{display:none!important;} #baseDiv{width:auto!important;text-align:center!important;}";

if (typeof GM_addStyle != "undefined") {

GM_addStyle(css);

} else if (typeof addStyle != "undefined") {

addStyle(css);

} else {

var heads = document.getElementsByTagName("head");

if (heads.length > 0) {

var node = document.createElement("style");

node.type = "text/css";

node.innerHTML = css;

heads[0].appendChild(node);

}

}

Maybe someone can help me find a way to make this work.

Thanks

Dave

Link to comment
Share on other sites

But how do you center the Video window? If you try to shrink the webviewer field to the same size as the youtube video window, it's off center.

Never thought to make a YouTube file....lol. But then again the last thing I need is everyone at work watching youtube videos. :

Link to comment
Share on other sites

Its not off center - there's a body margin and a the table has cellpadding and spacing that make it take up more room than it seems, make tbe webviewer bigger instead.

Anyway:

put that up the top and add a closing body tag down the bottom.

Edited by Guest
Link to comment
Share on other sites

I think that there may be a shortcut maybe?

Set the web viewer to:

"http://www.youtube.com/watch?v=" & WebViewer::VideoID

Where the VideoID field would store the Youtube ID. It seems to work fine. I tested with these three IDs.

AY9qcDCFeVI

E8uU8oSTo84

qqsG_Quyf-k

Link to comment
Share on other sites

Thanks everyone.

btw. they run all the time. to fix that I made a script to go to layout and back to browse and they stop playing. That is the way i was viewing them before. but now after these answers I don't need to do that. I am so excited about this.

I really appreciate the help.

Dave

Edited by Guest
Link to comment
Share on other sites

Hi Dave,

What do you mean when you say they "run all the time"?

Oh you mean if you start one playing and go to the next one the previous one is still playing... Yeh, that's weird. I wouldn't go into layout mode though, better to go to a different layout and come back.

(to anyone who's thinking I'm crazy, Set Web Viewer only works on the current record).

Edited by Guest
Link to comment
Share on other sites

  • 4 months later...
  • Newbies

Thanks for all the great help here on the forum.

One of the layouts in the database has a web viewer. As you hit the next record button a different web page will load based on a stored URL field. If any of the web pages displayed have sound or music, the sound continues to play after you hit the next record button and a different URL is displayed. Is there a way to stop the music and reset the viewer for each new record loaded?

Thanks,

Mike

Link to comment
Share on other sites

Reset web viewer only works on the web viewer in the current record - As i suggested in an earlier post, create a script:

Goto Layout[ some other layout]

Goto Layout[original layout]

That should stop all web viewers.

Link to comment
Share on other sites

  • 1 year later...

Thank you for this fantastic thread. This is really inspiring as as solution that I am looking for to get round IWP QT file limitations. ... But I am struggling to get this to work for a web server I have.

I have rearranged what I understand to be right for my purposes but FM says that there is a problem with "/" & I can't see why. The only real difference with the Youtube version & mine is that my URL is made up from a calc field PMW COMMERCIALS TALENT::File1_Calc . I know the calc field works, as I use it as a button to download file QT files. Naturally, what I want to to view them within FM & more importantly IWP.

Below is my version of the script. Can anyone see what I am doing wrong?

Many thanks

"data:text/html," &

"

"">

"" type="application/quicktime" wmode="transparent" width="425" height="350">

"
Link to comment
Share on other sites

I am a little stumped. I have tried loads browsers but the qt file does not show up in IWP. I have attached 2 pix that graphically show the result between FM & IWP. I also have another layout with another webviewer taken from a url & that works great, so why not the script?

Any ideas are welcome.

Picture_6.png

Picture_7.png

Link to comment
Share on other sites

This topic is 5448 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.