Create and configure an iframe portal (advanced)
For an even more advanced configuration, please contact support that will explain what you can do to go further.
Once the portal’s url received (in the above example it will be https://domain.momindum.com/fr/portal/video), you can integrate it on any page able to handle iframe, javascript and CSS. The advantage of this integration (instead of using a basic iframe) is that it will add some more features to your portal, that are described on “settings”.
Integration code
CSS
<style type="text/css">
iframe#momindum_portal {
width:100%;
height: 100%;
overflow: auto;
border:0;
}
</style> |
Javascript + HTML
<iframe src="" id="momindum_portal" webkitallowfullscreen mozallowfullscreen allowfullscreen msallowfullscreen></iframe>
<script type="text/javascript">
MOMINDUM_PORTAL_URL = 'https://domain.momindum.com/fr/portal/video';
MOMINDUM_IFRAME_HTML_ID = 'momindum_portal';
MOMINDUM_ADAPT_IFRAME = true;
MOMINDUM_ALLOW_SHARE = true;
MOMINDUM_SHARING_URL = window.location.href;
MOMINDUM_DYNAMIC_SHARING_URL = true;
MOMINDUM_CHECK_3RDPARTY_COOKIE = true;
MOMINDUM_SHOW_LOADING_IMAGE_DURING_FIRST_LOAD = true;
MOMINDUM_UNLOAD_EVENT = "beforeunload"
MOMINDUM_DOMAIN_URL = 'https://domain.momindum.com/';
MOMINDUM_JS_BASE_URL = MOMINDUM_DOMAIN_URL + 'bundles/portal/js/';
MOMINDUM_CSS_BASE_URL = MOMINDUM_DOMAIN_URL + 'bundles/portal/css/';
</script>
<script src="https://domain.momindum.com/bundles/portal/js/iframe.js"></script> |
Don’t forget to replace "domain.momindum.com" by the custom domain sent by Momindum and "domain.momindum.com/fr/portal/video" by the portal url !
Settings
Variable | Type | Défaut | Commentaire |
---|---|---|---|
MOMINDUM_PORTAL_URL* | string | Portal url (e.g. "domaine.momindum.com") | |
MOMINDUM_IFRAME_HTML_ID* | string | id (HTML) of the <iframe> element | |
MOMINDUM_ALLOW_SHARE | bool | false | Are we allowing sharing through the top right button on videos ? A modification of this parameter involve cookies deletion to be seen. |
MOMINDUM_SHARING_URL | string | window.location.href | Base url of the share (if we want to show the sharing button on the videos). We advise you to use the value window.location.href in order to share an url that will be based on the page that will contains the iframe |
MOMINDUM_DYNAMIC_SHARING_URL | bool | true | Do we have to add hashtage on the page that will host the ifrmae ? (you will get url such as https://www.momindum.com/fr/momindum-tv#/fr/portal/video/categories ) |
MOMINDUM_CHECK_3RDPARTY_COOKIE | bool | false | Do we have to check third party cookies ? (useful if you have security restriction on cookies).Doit-on vérifier si les cookies tiers sont autorisés ? (utile si vous avez une sécurité restrictive sur ces cookies). |
MOMINDUM_ADAPT_IFRAME | bool | false | Do we have to adapt automatically the height of the iframe ? (the height of the page hosting the iframe will therefore vary) |
MOMINDUM_SHOW_LOADING_IMAGE | bool | true | Do we have to show an image during the first load ? (for example, avoid that if we have to show your SSO as it could be hidden behind this image) |
MOMINDUM_JS_BASE_URL | string | JS path (advanced usage) | |
MOMINDUM_CSS_BASE_URL | string | CSS path (advanced usage) | |
MOMINDUM_UNLOAD_EVENT | string | beforeunload | Event to listen to, in order to detect page change (advanced usage) |
* : mandatory