Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

center a youtube movie window in web viewer


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

Recommended Posts

Posted

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

Posted

You mean no one in this place has an answer about centering a video from a web page in webviewer? Many must come across this problem. Is there no answer?

Posted

http://fmforums.com/forum/showpost.php?post/214480/

i borrowed the file from this link and found that I can center the video from you tube but It doesn't play

try it and see. Maybe someone knows how to make this work.

Thanks

Dave

WebViewer_modified.zip

Posted

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]

Posted

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

Posted

Lol, I'll make it easy for you. See the attached. The method for embedding is pretty straight forward - just check out the source for the web viewer.

I've included a few vids for your entertainment :

youtube.zip

Posted

Darn beaten to the draw! : I was just about to post a sample reference on embedding youtube.

Posted

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. :

Posted (edited)

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
Posted

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

Posted (edited)

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
Posted (edited)

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
  • 4 months later...
  • Newbies
Posted

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

  • Newbies
Posted

That didn't work other than resetting the current page. The sound from the previous record's URL continues to play.

Posted

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.

  • 1 year later...
Posted

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">

"
Posted (edited)

You have just solved one of my greatest FM mysteries. Thank you.

But ... Do you know why it does not work in IWP?

Edited by Guest
Posted

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

This topic is 5700 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.