Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

center a youtube movie window in web viewer

Featured Replies

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

  • Author

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?

  • Author

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

  • Author

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]

  • Author

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

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

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

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

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

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

Oh no, that does work, but if you want other html content around it...

Ahh ok....Just had to come at it from the opposite direction.

Edit: Or not. :

Edited by Guest

Though i suppose you could always just shove it in an iframe:

""

  • Author

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

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

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

Hello,

Have you tried the "Reset" button from Action -> Reset (from the Web Viewer) option?

  • Newbies

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

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.

  • Newbies

Thanks for the reminder, that works!

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

"

You seem to be missing a few quotes. Try the following.


"data:text/html," &



"





















" 

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

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

I have just served up the Youtube file on FMSA9 & it does not work in IWP either.

Is there nobody who can help me with this ne?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.